An open API service indexing awesome lists of open source software.

https://github.com/mericluc/cpp20-features-tests

A repository to test the exciting new features of the C++20 standard !
https://github.com/mericluc/cpp20-features-tests

cpp20

Last synced: 7 months ago
JSON representation

A repository to test the exciting new features of the C++20 standard !

Awesome Lists containing this project

README

          

# C++20 Features tests ![Language](https://img.shields.io/badge/language-C++20-orange.svg) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md)

This repository contains a list of **small tests** regarding enhancements brought by the **_c++20 standard_**.

--------

## Core language

### Modules

- [An example worth 1000 words](modules/)

### Concepts

- TODO So much to say...

### Attributes

- [\[\[likely\]\]](attributes/likely_unlikely.cpp)
- [\[\[unlikely\]\]](attributes/likely_unlikely.cpp)
- [\[\[nodiscard\]\]](attributes/nodiscard.cpp)
- [\[\[no_unique_address\]\]](attributes/no_unique_address.cpp)

### Keywords

- [consteval](keywords/consteval.cpp)
- [constinit](keywords/constinit.cpp)

### Lambdas

- [Using template parameters](lambdas/template-params.cpp)
- [Implicit copy of `this`](lambdas/implicit-this.cpp)
- [Unevaluated contexts](lambdas/unevaluated-contexts.cpp)

### Designated initialization

- [Aggregate initialization](designated_initialization/aggregate_initialization.cpp)
- [Named initialization](designated_initialization/named_initialization.cpp)

### Templates

- [Conditionally explicit constructors](templates/cond-exp-cstr.cpp)
- [Non type template parameters](templates/non-type-params.cpp)

### Spaceship operator

- [Ordering pre-c++20](ordering/ordering-before.cpp)
- [Ordering now](ordering/ordering-since.cpp)
- [The compiler-generated `<=>`](ordering/compiler-generated.cpp)
- [The pointer case](ordering/pointer-case.cpp)
- [Comparisons at compile-time](ordering/compile-time.cpp)
- [Priorities](ordering/priorities.cpp)

### Miscellaneous

- [`volatile` type qualifier deprecation](misc/volatile.cpp)
- [Range-based for loop with initializers](misc/range-based.cpp)
- [virtual `constexpr` functions](misc/virtual-constexpr.cpp)
- [`enum` in local scopes](misc/enum-local.cpp)

--------

## Standard library

### std::span

- [generalities](stl/span/generalities.cpp)
- [automatic size deduction](stl/span/automatic-size-deduction.cpp)
- [reallocations management](stl/span/reallocations_management.cpp)
- [initialization from pointer and size](stl/span/init_from_pointer.cpp)
- [modifying underlying elements](stl/span/modifying_elems.cpp)
- [addressing underlying elements](stl/span/addressing_elems.cpp)

### Containers improvments

- [std::erase_if](stl/containers/erase_if.cpp)
- [std::string(_view) prefix/suffix](stl/containers/string_prefix_suffix.cpp)
- [std::contains - associative containers](stl/containers/contains_associative_containers.cpp)
- [constexpr improvments](stl/containers/constexpr-improvments.cpp)
- [std::array creation](stl/containers/array-creation.cpp)

### std::ranges library

- [range and view concepts](stl/ranges/concepts.cpp)
- [range adaptors](stl/ranges/adaptors.cpp)
- [range algorithms on STL containers](stl/ranges/algo-on-containers.cpp)
- [projections](stl/ranges/projections.cpp)

### Arithmetic utilities

- [Mathematical constants](stl/arithmetic/math-constants.cpp)
- [Midpoint and linear interpolation](stl/arithmetic/midpoint-linear.cpp)
- [Safe comparison of integers](stl/arithmetic/safe-comparison.cpp)
- [Bit manipulation](stl/arithmetic/bit-manipulation.cpp)

### Time and calendar

- [Time of day](stl/time/time-of-day.cpp)
- [Calendar dates](stl/time/calendar-dates.cpp)
- [TIme zones](stl/time/time-zones.cpp)

### std::format library

- [Principles](stl/format/principles.cpp)
- [Extensibility](stl/format/extensibility.cpp)

--------

## Concurrency

--------