C++ 2023 ISO C++ 2023 In this implementation the -std=gnu++23 or -std=c++23 flag must be used to enable language and library features. See dialect options. The pre-defined symbol __cplusplus is used to check for the presence of the required flag. This section describes the C++23 and library TS support in mainline GCC, not in any particular release. The following table lists new library features that have been accepted into the C++23 working draft. The "Proposal" column provides a link to the ISO C++ committee proposal that describes the feature, while the "Status" column indicates the first version of GCC that contains an implementation of this feature (if it has been implemented). A dash (—) in the status column indicates that the changes in the proposal either do not affect the code in libstdc++, or the changes are not required for conformance. The "SD-6 Feature Test / Notes" column shows the corresponding macro or header from SD-6: Feature-testing recommendations for C++ (where applicable) or any notes about the implementation. C++ 2023 Library Features Library Feature Proposal Status SD-6 Feature Test / Notes Ranges and Views Range constructor for std::string_view P1989R2 11.1 join_view should join all views of ranges P2328R1 11.2 Clarifying range adaptor objects P2281R1 11.1 Views should not be required to be default constructible P2325R3 11.3 __cpp_lib_ranges >= 202106L Conditionally borrowed ranges P2017R1 11.1 Require span & basic_string_view to be Trivially Copyable P2251R1 Yes Repairing input range adaptors and counted_iterator P2259R1 12.1 Superior String Splitting P2210R2 12.1 What is a view? P2415R2 12.1 __cpp_lib_ranges >= 202110L Fix istream_view P2432R1 12.1 starts_with and ends_with P1659R3 __cpp_lib_ranges_starts_ends_with >= 202106L zip P2321R2 __cpp_lib_ranges_zip >= 202110L Compile-time programming A proposal for a type trait to detect scoped enumerations P1048R1 11.1 __cpp_lib_is_scoped_enum >= 202011L std::to_underlying for enumerations P1682R3 11.1 __cpp_lib_to_underlying >= 202102L Missing constexpr in std::optional and std::variant P2231R1 11.3 (optional) 12.1 (variant) __cpp_lib_constexpr_optional >= 202106L __cpp_lib_variant >= 202106L Making std::unique_ptr constexpr P2273R3 12.1 __cpp_lib_constexpr_memory >= 202202L Making std::type_info::operator== constexpr P1328R1 12.1 __cpp_lib_constexpr_typeinfo >= 202106L constexpr for <cmath> and <cstdlib> P0533R9 __cpp_lib_constexpr_cmath >= 202202L Deprecate std::aligned_storage and std::aligned_union P1413R3 A type trait to detect reference binding to temporary P2255R2 __cpp_lib_reference_from_temporary >= 202202L Strings and text string contains function P1679R3 11.1 __cpp_lib_string_contains >= 202011L Prohibit std::basic_string and std::basic_string_view construction from nullptr P2166R1 12.1 basic_string::resize_and_overwrite P1072R10 12.1 __cpp_lib_resize_and_overwrite >= 202110L A strstream replacement using span<charT> as buffer P0448R4 12.1 __cpp_lib_spanstream >= 202106L Containers Iterator pair constructors for stack and queue P1425R4 12.1 __cpp_lib_adaptor_iterator_pair_constructor >= 202106L Stop overconstraining allocators in container deduction guides P1518R2 12.1 Heterogeneous erasure overloads for associative containers P2077R3 __cpp_lib_associative_heterogeneous_erasure >= 202110L Miscellaneous Inheriting from std::variant P2162R2 11.3 __cpp_lib_variant >= 202102L Printing volatile Pointers P1147R1 11.3 A Proposal to add stacktrace library P0881R7 12.1 __cpp_lib_stacktrace >= 202011L Add a pmr alias for std::stacktrace P2301R1 12.1 std::expected P0323R12 12.1 __cpp_lib_expected >= 202202L Monadic operations for std::optional P0798R8 12.1 __cpp_lib_optional >= 202110L move_only_function P0288R9 12.1 __cpp_lib_move_only_function >= 202110L invoke_r P2136R3 12.1 __cpp_lib_invoke_r >= 202106L Byteswapping for fun&&nuf P1272R4 12.1 __cpp_lib_byteswap >= 202110L Function to mark unreachable code P0627R6 12.1 __cpp_lib_unreachable >= 202202L Add a conditional noexcept specification to std::exchange P2401R0 12.1 Support C atomics in C++ P0943R6 12.1 __cpp_lib_stdatomic_h >= 202011L Clarifying the status of the "C headers" P2340R1 Yes Relax Requirements for time_point::clock P2212R2 Yes Removing Garbage Collection Support P2186R2 12.1