Namespaces
Variants

Compiler support for C++26

From cppreference.com

* - hover over a cell marked with the star * to see additional pop-up notes.
DRnn - the number nn after "DR" denotes target C++ revision the Defect Report is applied to, e.g., DR20 → C++20.

C++26 core language features

C++26 feature

 
Paper(s)

 
GCC
Clang
MSVC
Apple Clang
EDG eccp
Intel C++
Nvidia HPC C++ (ex PGI)*
Nvidia nvcc
Cray
DR98: Removing undefined behavior from lexing P2621R3 Yes 3.3 16.0.0*
DR98: Making non-encodable string literals ill-formed P1854R4 14 14 16.0.0*
Unevaluated strings P2361R6 14 17 (partial)*
18
16.0.0*
Adding @, $, and ` to the basic character set P2558R2 15 Yes 16.0.0*
constexpr cast from void*  (FTM)* P2738R1 14 17
DR20: On the ignorability of standard attributes P2552R3 15 Yes
DR11: Static storage for braced initializers P2752R3 14
User-generated static_assert messages  (FTM)* P2741R3 14 17
Placeholder variables with no name  (FTM)* P2169R4 14 18
Pack indexing  (FTM)* P2662R3 15 19
Removing deprecated arithmetic conversion on enumerations P2864R2 14 18
DR11/20: Template parameter initialization P2308R1 9 18
Disallow binding a returned reference to a temporary P2748R5 14 19
Attributes for structured bindings  (FTM)* P0609R3 15 19
Erroneous behavior for uninitialized reads, [[indeterminate]] attribute P2795R5
P3684R1
16
= delete("reason");  (FTM)* P2573R2 15 19
Variadic friends  (FTM)* P2893R3 15 20
DR98: Clarifying rules for brace elision in aggregate initialization P3106R1 Yes 17
DR20: Disallow module declarations to be macros P3034R1 15
DR11: Trivial infinite loops are not undefined behavior P2809R3 14 19
constexpr placement new  (FTM)*  (FTM)* P2747R2 15 20
Structured binding declaration as a condition  (FTM)* P0963R3 15 6 (partial)*
21
Ordering of constraints involving fold expressions  (FTM)* P2963R3 19
Deleting a pointer to an incomplete type should be ill-formed P3144R2 15 19 6.7
Structured bindings can introduce a pack  (FTM)* P1061R10 16 21
constexpr structured bindings and references to constexpr variables P2686R5 16* 6.7
constexpr exceptions  (FTM)* P3068R6 16
Oxford variadic comma P3176R1 15 20
Removing deprecated array comparisons P2865R6 15 20
#embed  (FTM)* P1967R14 15 19*
Concept and variable-template template-parameters  (FTM)* P2841R7
Trivial unions  (FTM)* P3074R7
P3726R2
Observable checkpoints P1494R5 16
Contracts  (FTM)* P2900R14 16
Reflection  (FTM)* P2996R13
P3394R4
P3293R3
P3096R12
P3795R2
16*
Expansion statements  (FTM)* P1306R5 16
constexpr virtual inheritance  (FTM)* P3533R2 16
Diagnosing Preprocessor Errors P2843R3 16
Allowing attaching main to the global module P3618R0 16
DR20: Allowing #line before module declarations P3868R1
DR17: Class template argument deduction for type template template parameters P3865R3
Const-ification of splice expressions in contract assertions P3598R0
 

C++26 feature
 

Paper(s)
GCC
Clang
MSVC
Apple Clang
EDG eccp
Intel C++
Nvidia HPC C++ (ex PGI)*
Nvidia nvcc
Cray

C++26 library features

C++26 feature

 
Paper(s)

 
GCC libstdc++
Clang libc++
MSVC STL
Apple Clang*
Testing for success or failure of <charconv> functions  (FTM)* P2497R0 14 18 16.0.0*
std::text_encoding: text encodings identification  (FTM)* P1885R12
P2862R1
14
Arithmetic overloads of std::to_string and std::to_wstring use std::format  (FTM)* P2587R3 14
Type checking format args  (FTM)* P2757R3 15
Formatting pointers  (FTM)* P2510R3 14* 17* 19.40**
Hashing support for std::chrono value classes  (FTM)* P2592R3 16
<rcu>: Read-Copy Update  (FTM)* P2545R4
<hazard_pointer>: Hazard Pointers  (FTM)* P2530R3
ADL-proof std::projected P2538R1 14* 18* 19.38** 16.0.0*
constexpr stable sorting  (FTM)* P2562R1 15 21
Member std::basic_format_arg::visit()  (FTM)* P2637R3 15 19
Member std::variant::visit()  (FTM)* P2637R3 15 18
std::is_within_lifetime  (FTM)* P2641R4
P3450R1
Extending associative containers with the remaining heterogeneous overloads  (FTM)* P2363R5 16
Enabling the use of std::weak_ptr as keys in unordered associative containers  (FTM)* P1901R2 16
Native handles in file streams  (FTM)* P1759R6 14 18 16.0.0*
Interfacing string streams with std::string_view  (FTM)* P2495R3 16 19
Interfacing std::bitset with std::string_view  (FTM)* P2697R1 16 18 16.0.0*
More constexpr for <cmath> and <complex>  (FTM)*  (FTM)* P1383R2 4.6 (partial)*
Adding the new 2022 SI prefixes on ratios: std::quecto, std::ronto, std::ronna, and std::quetta  (FTM)* P2734R0 14 17*
std::function_ref: type-erased callable reference  (FTM)* P0792R14
P3961R1
16
std::copyable_function  (FTM)* P2548R6 16
std::bind_front, std::bind_back, and std::not_fn to NTTP callables  (FTM)*  (FTM)*  (FTM)* P2714R1 16
std::submdspan()  (FTM)* P2630R4
P3355R1
P3663R3
P3982R2
16
Freestanding Language: Optional ::operator new P2013R5 19.38*
Freestanding std::char_traits, std::errc and facilities in: <charconv>, <cstdlib>, <cstring>, <cwchar>  (FTM)*  (FTM)*  (FTM)*  (FTM)*  (FTM)*  (FTM)* P2338R4 19.38*
More freestanding facilities  (FTM)*  (FTM)*  (FTM)*  (FTM)*  (FTM)*  (FTM)*  (FTM)*  (FTM)* P2198R7 19.38*
Saturation Arithmetic  (FTM)* P0543R3
P4052R0
14
16*
18 16.0.0*
<debugging>: Debugging support  (FTM)* P2546R5
P2810R4
16*
<linalg>: A free function linear algebra interface based on the BLAS  (FTM)* P1673R13
P3050R2
P3222R0
P3371R5
Making assert() macro user friendly P2264R7 yes*
Dynamic format strings  (FTM)* P2918R2
P3953R3
14*
16*
18 16.0.0*
std::span::at()  (FTM)* P2821R5 14 18 16.0.0*
Added tuple protocol to std::complex  (FTM)* P2819R2 15 19
A new specification for std::generate_canonical P0952R2 16 19.42*
Removing deprecated typedef std::allocator::is_always_equal P2868R3 15 18 16.0.0*
Removing function overload of std::basic_string::reserve() that takes no argument P2870R3 18 16.0.0*
Removing deprecated Unicode conversion facets (<codecvt>) P2871R3 18 16.0.0*
Freestanding: removing std::strtok  (FTM)* P2937R0 14 19.40*
Freestanding Library: Partial Classes  (FTM)*  (FTM)*  (FTM)*  (FTM)*  (FTM)* P2407R5 14 19.42*
Freestanding Library: std::inout, std::expected, std::span  (FTM)*  (FTM)*  (FTM)*  (FTM)* P2833R2 14 19.42*
DR23: std::basic_const_iterator should follow its underlying type’s convertibility  (FTM)* P2836R1
P2950R0
14 19.40*
DR20: std::make_format_args now accepts only lvalue references instead of forwarding references P2905R2 14 18 19.40* 16.0.0*
DR20: Fix formatting of code units as integers  (FTM)* P2909R4 13.3 18 19.40* 16.0.0*
views::concat  (FTM)* P2542R8 15
Concatenation of strings and string views  (FTM)* P2591R5 15 19
Enabling list-initialization for algorithms  (FTM)* P2248R8
P3217R0
P3787R2
15
std::ranges::generate_random  (FTM)* P1068R11
Comparisons for std::reference_wrapper, and constraints for comparisons of std::pair, std::tuple, std::optional, and std::variant  (FTM)*  (FTM)* P2944R3 14 19 (partial)*
Padded mdspan layouts  (FTM)* P2642R6 16
New CTAD for std::span and std::mdspan with integral constants P3029R1 16 19
Atomic maximum and minimum  (FTM)* P0493R5 16
std::formatter<std::filesystem::path>  (FTM)* P2845R8 16
Printing Blank Lines with std::println()  (FTM)* P3142R0 14* 19* 19.41**
Undeprecate std::polymorphic_allocator::destroy P2875R4 14.3* 15 19.41*
Removing deprecated strstreams P2867R2 19
Removing deprecated std::shared_ptr Atomic Access APIs P2869R4
Removing std::wstring_convert P2872R3 19
DR23: Permit an efficient implementation of std::print  (FTM)* P3107R5
P3235R3
16 19.43*
Execution control library  (FTM)* P2300R10
P3396R0
P3570R2
P3481R5
P3433R1
P3682R0
P3388R3
P3887R1
Additional execution control library fixes P3826R5
P4159R0
P4154R0
P3373R4
P3986R1
std::inplace_vector: dynamically-resizable vector with fixed capacity  (FTM)* P0843R14
P3981R2
P4022R0
16 (partial)*
std::philox_engine: counter-based random number engine  (FTM)* P2075R6 16
std::optional range support  (FTM)* P3168R2
P3913R1
16
std::is_virtual_base_of: type trait for detecting virtual base classes  (FTM)* P2985R0 15 20
std::dims for std::mdspan  (FTM)* P2389R2 16 19
DR11: Formal specification of the type of std::ignore P2968R2 15 19 19.42*
DR20: Removing the common reference requirement from the indirectly invocable concepts  (FTM)* P2997R1 15 19 19.42*
Deprecating std::is_trivial and std::is_trivial_v P3247R2 15 21
DR20: Algorithm function objects P3136R1 Yes Yes 19.39* Yes
std::ranges::cache_latest_view  (FTM)* P3138R5 15
Constraining std::expected equality operators  (FTM)* P3379R0 15
std::aligned_accessor: an std::mdspan accessor expressing pointer over-alignment  (FTM)* P2897R7 16
std::is_sufficiently_aligned: checks a pointer’s alignment precondition  (FTM)* P2897R7 16
std::atomic_ref::address()  (FTM)* P2835R7 16
DR11/20: cv-qualified types in std::atomic and std::atomic_ref P3323R1 16 19.44*
constexpr std::atomic and std::atomic_ref  (FTM)* P3309R3
constexpr for specialized memory algorithms  (FTM)* P3508R0
P3369R0
15
<stdbit.h> and <stdckdint.h>  (FTM)*  (FTM)* P3370R1 15*
16
<simd>: data-parallel types  (FTM)* P1928R15
P3430R3
P3441R2
P3287R3
P2876R3
P3480R6
P3691R1
P3922R1
16 (partial)*
A utility for creating execution environments P3325R5
constexpr for exception types, e.g. std::bad_alloc, std::bad_cast etc.  (FTM)* P3068R6
P3378R2
P3842R2
16
Bit operations support in std::simd  (FTM)* P2933R4
Interleaved std::complex values support in std::simd  (FTM)* P2663R7
Defang and deprecate std::memory_order::consume P3475R1
Put std::monostate in <utility> P0472R3 15 21 19.50*
std::indirect  (FTM)* P3019R14 16
std::polymorphic  (FTM)* P3019R14 16
More constexpr containers and adaptors  (FTM)* P3372R2 16 (partial)*
constexpr std::inplace_vector for non-trivial types  (FTM)* P3074R7
std::ranges::as_input_view  (FTM)* P3137R3
P3828R1
15*
16*
std::ranges::approximately_sized_range and std::ranges::reserve_hint  (FTM)* P2846R6
<hive>: A bucket-based container that re-uses memory locations from erased elements  (FTM)* P0447R28
Library support for observable checkpoints  (FTM)* P1494R5
P3641R0
16
<contracts>: Contract-violation handling support  (FTM)* P2900R14
P3819R0
16
Standard library hardening P3471R4
P3697R1
P3878R1
15 (partial)* 19.44* (partial)* 19.50* (partial)*
Freestanding library: <algorithm>, <numeric> and <random>  (FTM)*  (FTM)*  (FTM)*  (FTM)*  (FTM)* P2976R1
DR20: Converting contiguous iterators to pointers P3349R0 15 19.51*
<meta>: Library support for reflection  (FTM)* P2996R13
P3394R4
P3293R3
P3096R12
P3795R2
P4156R0
16 (partial)*
constexpr exceptions as error handling in reflection  (FTM)* P3560R2 16
std::define_static_object, std::define_static_array, std::define_static_string  (FTM)* P3491R3 16
std::optional<T&>  (FTM)*  (FTM)* P2988R12
P3836R2
16
std::string::subview()  (FTM)* P3044R2 16
constexpr std::shared_ptr and friends  (FTM)* P3037R6
Coroutine task types  (FTM)* P3552R3
P3980R1
P3927R2
P3941R4
P4151R1
Async scopes: creating scopes for non-sequential concurrency  (FTM)* P3149R11
P3815R1
Parallel scheduler  (FTM)* P2079R10
P3804R2
High-quality sender diagnostics with constexpr exceptions P3557R3
execution::write_env and execution::unstoppable Sender Adaptors P3284R4
std::views::indices  (FTM)* P3060R3 16
Parallel range algorithms  (FTM)* P3179R9
P3709R2
Atomic floating-point min/max  (FTM)* P3008R6
Atomic reduction operations  (FTM)* P3111R8
Permutation API for std::simd  (FTM)* P2664R11
std::mdspan::at() P3383R3 16
std::exception_ptr_cast()  (FTM)* P2927R3
P3748R0
P3981R2
16
Standardized constexpr type ordering  (FTM)* P2830R10
P3778R0
P4140R0
16
std::constant_wrapper  (FTM)* P2781R9
P3978R3
16
Removed return type deduction in std::apply and added related type traits P1317R2
Making type-erased allocator use in std::promise and std::packaged_task consistent P3503R3 19.51*
std::filesystem::path::display_string() and std::filesystem::path::native_encoded_string()  (FTM)* P2319R5
Making std::istream::ignore() less surprising P3223R2 16 19.50*
Resolved inconsistencies in begin/end for std::valarray and std::initializer_list  (FTM)*  (FTM)* P3016R6 19.51*
std::flat_meow fixes  (FTM)*  (FTM)* P3567R2 19.51*
Making std::integer_sequence usable in structured bindings and expansion statements  (FTM)* P1789R3 16
constexpr text formatting  (FTM)* P3391R2
std::start_lifetime  (FTM)* P3726R2
std::is_structural: type trait for detecting structural types  (FTM)* P3856R8 16
std::constant_wrapper used as a std::function_ref constructor argument P3948R1
Supporting signed char and unsigned char in random number generation P4037R1
Implementation-defined replaceability detection of the contract-

violation handler using feature macro  (FTM)*

P3886R0 16
DR20: Making user-defined constructors of view iterators/sentinels private P3059R2 Yes
DR20: Filter view extensions for safer use  (FTM)* P3725R3 16
 

C++26 feature
 

Paper(s)
GCC libstdc++
Clang libc++
MSVC STL
Apple Clang*