TODO
# New language features
3-way comparison (opens new window) operator and <=>operator==() = default (opens new window)
init-statements and initializers in range-
for
(opens new window)New attributes (opens new window): , ,
[[no_unique_address]]``[[likely]]``[[unlikely]]
pack-expansions
(opens new window) in lambda init-captures (opens new window)removed the requirement to use to disambiguate types in many contexts
typename
further relaxed constexpr
signed integers are 2's complement
aggregate initialization (opens new window) using parentheses
DR: array new (opens new window) can deduce array size
New library features
# New headers
concepts
(opens new window)coroutine
(opens new window)compare
(opens new window)version
(opens new window)source_location
(opens new window)format
(opens new window)span
(opens new window)ranges
(opens new window)bit
(opens new window)numbers
(opens new window)syncstream
(opens new window)
in Thread support library (opens new window):
stop_token
(opens new window)semaphore
(opens new window)latch
(opens new window)barrier
(opens new window)
# Library features
Calendar (opens new window) and Time Zone (opens new window) library
array support for
make_shared
(opens new window)floating-point atomics
(opens new window),shared_ptr atomics
(opens new window)thread-coordination classes:
barrier
(opens new window),latch
(opens new window), andcounting_semaphore
(opens new window)jthread
(opens new window) andthread cancellation
(opens new window) classes:stop_token
(opens new window),stop_source
(opens new window), andstop_callback
(opens new window)u8string
(opens new window) and otherchar8_t
(opens new window) usesconstexpr for
](https://en.cppreference.com/w/cpp/header/algorithm), [
(opens new window), `` (opens new window)string::starts_with
(opens new window) /ends_with
(opens new window) andstring_view::starts_with
(opens new window) /ends_with
(opens new window)make_shared_for_overwrite
(opens new window)/make_unique_for_overwrite
(opens new window)heterogeneous lookup in unordered associative containers
polymorphic_allocator
(opens new window) with additional member functions andbyte
(opens new window) as its default template argumentis_bounded_array
(opens new window),is_unbounded_array
(opens new window)uniform container erasure: std::erase (opens new window)/std::erase_if (opens new window), e.g.
std::erase(std::list)
(opens new window) orerase_if(std::map)
(opens new window) etcMathematical constants (opens new window) in `` (opens new window)