libc++ C++2a Status

In July 2017, the C++ standard committee created a draft for the next version of the C++ standard, known here as "C++2a" (probably to be C++20).

This page shows the status of libc++; the status of clang's support of the language features is here.

Reminder: Features in unreleased drafts of the standard are subject to change.

The groups that have contributed papers:

Paper Status

Paper #GroupPaper NameMeetingStatusFirst released version
P0463R1LWGEndian just EndianTorontoComplete7.0
P0674R1LWGExtending make_shared to Support ArraysToronto
P0020R6LWGFloating Point AtomicAlbuquerque
P0053R7LWGC++ Synchronized Buffered OstreamAlbuquerque
P0202R3LWGAdd constexpr modifiers to functions in <algorithm> and <utility> HeadersAlbuquerqueIn Progress7.0
P0415R1LWGConstexpr for std::complexAlbuquerqueIn Progress7.0
P0439R0LWGMake std::memory_order a scoped enumerationAlbuquerqueComplete
P0457R2LWGString Prefix and Suffix CheckingAlbuquerqueComplete6.0
P0550R2LWGTransformation Trait remove_cvrefAlbuquerqueComplete6.0
P0600R1LWGnodiscard in the LibraryAlbuquerqueIn Progress7.0
P0616R0LWGde-pessimize legacy algorithms with std::moveAlbuquerque
P0653R2LWGUtility to convert a pointer to a raw pointerAlbuquerqueComplete6.0
P0718R2LWGAtomic shared_ptrAlbuquerque
P0767R1CWGDeprecate PODAlbuquerqueComplete7.0
P0768R1CWGLibrary Support for the Spaceship (Comparison) OperatorAlbuquerqueComplete
P0777R1LWGTreating Unnecessary decayAlbuquerqueComplete7.0
P0122R7LWG<span>JacksonvilleComplete7.0
P0355R7LWGExtending chrono to Calendars and Time ZonesJacksonvilleIn progress
P0551R3LWGThou Shalt Not Specialize std Function Templates!Jacksonville
P0753R2LWGManipulators for C++ Synchronized Buffered OstreamJacksonville
P0754R2LWG<version>JacksonvilleComplete7.0
P0809R0LWGComparing Unordered ContainersJacksonville
P0858R0LWGConstexpr iterator requirementsJacksonville
P0905R1CWGSymmetry for spaceshipJacksonville
P0966R1LWGstring::reserve Should Not ShrinkJacksonvilleComplete8.0
P0019R8LWGAtomic RefRapperswil
P0458R2LWGChecking for Existence of an Element in Associative ContainersRapperswil
P0475R1LWGLWG 2511: guaranteed copy elision for piecewise constructionRapperswil
P0476R2LWGBit-casting object representationsRapperswil
P0528R3CWGThe Curious Case of Padding Bits, Featuring Atomic Compare-and-ExchangeRapperswil
P0542R5CWGSupport for contract based programming in C++Rapperswil
P0556R3LWGIntegral power-of-2 operationsRapperswilIn Progress
P0619R4LWGReviewing Deprecated Facilities of C++17 for C++20Rapperswil
P0646R1LWGImproving the Return Value of Erase-Like AlgorithmsRapperswil
P0722R3CWGEfficient sized delete for variable sized classesRapperswilComplete9.0
P0758R1LWGImplicit conversion traits and utility functionsRapperswilComplete
P0759R1LWGfpos RequirementsRapperswil
P0769R2LWGAdd shift to <algorithm>Rapperswil
P0788R3LWGStandard Library Specification in a Concepts and Contracts WorldRapperswil
P0879R0LWGConstexpr for swap and swap related functions Also resolves LWG issue 2800.Rapperswil
P0887R1LWGThe identity metafunctionRapperswilComplete8.0
P0892R2CWGexplicit(bool)Rapperswil
P0898R3LWGStandard Library ConceptsRapperswil
P0935R0LWGEradicating unnecessarily explicit default constructors from the standard libraryRapperswil
P0941R2CWGIntegrating feature-test macros into the C++ WDRapperswilIn progress
P1023R0LWGconstexpr comparison operators for std::arrayRapperswilComplete8.0
P1025R1CWGUpdate The Reference To The Unicode StandardRapperswil
P1120R0CWGConsistency improvements for <=> and other comparison operatorsRapperswil
P0318R1LWGunwrap_ref_decay and unwrap_referenceSan DiegoComplete8.0
P0356R5LWGSimplified partial function applicationSan Diego
P0357R3LWGreference_wrapper for incomplete typesSan DiegoComplete8.0
P0482R6CWGchar8_t: A type for UTF-8 characters and stringsSan Diego
P0487R1LWGFixing operator>>(basic_istream&, CharT*) (LWG 2499)San DiegoComplete8.0
P0591R4LWGUtility functions to implement uses-allocator constructionSan Diego
P0595R2CWGP0595R2 std::is_constant_evaluated()San DiegoComplete9.0
P0602R4LWGvariant and optional should propagate copy/move trivialitySan DiegoComplete8.0
P0608R3LWGA sane variant converting constructorSan Diego
P0655R1LWGvisit<R>: Explicit Return Type for visitSan Diego
P0771R1LWGstd::function move constructor should be noexceptSan DiegoComplete6.0
P0896R4LWGThe One Ranges ProposalSan Diego
P0899R1LWGP0899R1 - LWG 3016 is not a defectSan DiegoNothing to do
P0919R3LWGHeterogeneous lookup for unordered containersSan Diego
P0972R0LWG<chrono> zero(), min(), and max() should be noexceptSan DiegoComplete8.0
P1006R1LWGConstexpr in std::pointer_traitsSan DiegoComplete8.0
P1007R3LWGstd::assume_alignedSan Diego
P1020R1LWGSmart pointer creation with default initializationSan Diego
P1032R1LWGMisc constexpr bitsSan Diego
P1085R2LWGShould Span be Regular?San DiegoComplete8.0
P1123R0LWGEditorial Guidance for merging P0019r8 and P0528r3San Diego
P1148R0LWGCleaning up Clause 20San Diego
P1165R1LWGMake stateful allocator propagation more consistent for operator+(basic_string)San Diego
P1209R0LWGAdopt Consistent Container Erasure from Library Fundamentals 2 for C++20San DiegoComplete8.0
P1210R0LWGCompleting the Rebase of Library Fundamentals, Version 3, Working DraftSan Diego
P1236R1CWGAlternative Wording for P0907R4 Signed Integers are Two's ComplementSan Diego
P1248R1LWGRemove CommonReference requirement from StrictWeakOrdering (a.k.a Fixing Relations)San Diego
P1285R0LWGImproving Completeness Requirements for Type TraitsSan Diego
P1353R0CWGMissing feature test macrosSan Diego
P0339R6LWGpolymorphic_allocator<> as a vocabulary typeKona
P0340R3LWGMaking std::underlying_type SFINAE-friendlyKona
P0738R2LWGI Stream, You Stream, We All Stream for istream_iteratorKona
P0811R3LWGWell-behaved interpolation for numbers and pointersKonaComplete9.0
P0920R2LWGPrecalculated hash values in lookupKona
P1001R2LWGTarget Vectorization Policies from Parallelism V2 TS to C++20Kona
P1024R3LWGUsability Enhancements for std::spanKonaComplete9.0
P1164R1LWGMake create_directory() IntuitiveKona
P1227R2LWGSigned ssize() functions, unsigned size() functions KonaComplete9.0
P1252R2LWGRanges Design CleanupKona
P1286R2CWGContra CWG DR1778Kona
P1357R1LWGTraits for [Un]bounded ArraysKonaComplete9.0
P1458R1LWGMandating the Standard Library: Clause 16 - Language support libraryKona
P1459R1LWGMandating the Standard Library: Clause 18 - Diagnostics libraryKona
P1462R1LWGMandating the Standard Library: Clause 20 - Strings libraryKona
P1463R1LWGMandating the Standard Library: Clause 21 - Containers libraryKona
P1464R1LWGMandating the Standard Library: Clause 22 - Iterators libraryKona

[ Note: "Nothing to do" means that no library changes were needed to implement this change -- end note]

The missing bits in P0600 are in [mem.res.class], [mem.poly.allocator.class], and [container.node.overview]

The missing bits in P0202 are in copy, copy_backwards, move, and move_backwards (and the ones that call them: copy_n, rotate_copy, merge, set_union, set_difference, and set_symmetric_difference). This is because the first four algorithms have specializations that call memmove which is not constexpr. See Bug 25165

Library Working group Issues Status

Issue #Issue NameMeetingStatus
2070allocate_shared should use allocator_traits<A>::constructTorontoResolved by P0674R1
2444Inconsistent complexity for std::sort_heapToronto
2593Moved-from state of AllocatorsToronto
2597std::log misspecified for complex numbersToronto
2783stack::emplace() and queue::emplace() should return decltype(auto)TorontoComplete
2932Constraints on parallel algorithm implementations are underspecifiedToronto
2937Is equivalent("existing_thing", "not_existing_thing") an errorTorontoComplete
2940result_of specification also needs a little cleanupToronto
2942LWG 2873's resolution missed weak_ptr::owner_beforeTorontoComplete
2954Specialization of the convenience variable templates should be prohibitedTorontoComplete
2961Bad postcondition for set_default_resourceToronto
2966Incomplete resolution of US 74TorontoNothing to do
2974Diagnose out of bounds tuple_element/variant_alternativeTorontoComplete
2779[networking.ts] Relax requirements on buffer sequence iteratorsAlbuquerque
2870Default value of parameter theta of polar should be dependentAlbuquerqueComplete
2935What should create_directories do when p already exists but is not a directory?Albuquerque
2941[thread.req.timing] wording should apply to both member and namespace-level functionsAlbuquerqueNothing to do
2944LWG 2905 accidentally removed requirement that construction of the deleter doesn't throw an exceptionAlbuquerqueNothing to do
2945Order of template parameters in optional comparisonsAlbuquerqueComplete
2948unique_ptr does not define operator<< for stream outputAlbuquerqueComplete
2950std::byte operations are misspecifiedAlbuquerqueComplete
2952iterator_traits should work for pointers to cv TAlbuquerqueComplete
2953LWG 2853 should apply to deque::erase tooAlbuquerqueComplete
2958Moves improperly defined as deletedAlbuquerqueWe already do this
2964Apparently redundant requirement for dynamic_pointer_castAlbuquerque
2965Non-existing path::native_string() in filesystem_error::what() specificationAlbuquerqueNothing to do
2972What is is_trivially_destructible_v<int>?AlbuquerqueComplete
2976Dangling uses_allocator specialization for packaged_taskAlbuquerqueComplete
2977unordered_meow::merge() has incorrect Throws: clauseAlbuquerqueNothing to do
2978Hash support for pmr::string and friendsAlbuquerque
2979aligned_union should require complete object typesAlbuquerqueComplete
2980Cannot compare_exchange empty pointersAlbuquerque
2981Remove redundant deduction guides from standard libraryAlbuquerque
2982Making size_type consistent in associative container deduction guidesAlbuquerque
2988Clause 32 cleanup missed one typenameAlbuquerque
2993reference_wrapper conversion from T&&Albuquerque
2998Requirements on function objects passed to {forward_,}list-specific algorithmsAlbuquerqueNothing to do
3001weak_ptr::element_type needs remove_extent_tAlbuquerque
3024variant's copies must be deleted instead of disabled via SFINAEAlbuquerqueComplete
2164What are the semantics of vector.emplace(vector.begin(), vector.back())?JacksonvilleComplete
2243istream::putback problemJacksonvilleComplete
2816resize_file has impossible postconditionJacksonvilleNothing to do
2843Unclear behavior of std::pmr::memory_resource::do_allocate()JacksonvilleComplete
2849Why does !is_regular_file(from) cause copy_file to report a "file already exists" error?JacksonvilleNothing to do
2851std::filesystem enum classes are now underspecifiedJacksonvilleNothing to do
2946LWG 2758's resolution missed further correctionsJacksonvilleComplete
2969polymorphic_allocator::construct() shouldn't pass resource()Jacksonville
2975Missing case for pair construction in scoped and polymorphic allocatorsJacksonville
2989path's stream insertion operator lets you insert everything under the sunJacksonvilleCompleted
3000monotonic_memory_resource::do_is_equal uses dynamic_cast unnecessarilyJacksonville
3002[networking.ts] basic_socket_acceptor::is_open() isn't noexceptJacksonville
3004§[string.capacity] and §[vector.capacity] should specify time complexity for capacity()JacksonvilleNothing to do
3005Destruction order of arrays by make_shared/allocate_shared only recommended?Jacksonville
3007allocate_shared should rebind allocator to cv-unqualified value_type for constructionJacksonville
3009Including <string_view> doesn't provide std::size/empty/dataJacksonvilleComplete
3010[networking.ts] uses_executor says "if a type T::executor_type exists"Jacksonville
3013(recursive_)directory_iterator construction and traversal should not be noexceptJacksonvilleComplete
3014More noexcept issues with filesystem operationsJacksonvilleComplete
3015copy_options::unspecified underspecifiedJacksonvilleNothing to do
3017list splice functions should use addressofJacksonvilleComplete
3020[networking.ts] Remove spurious nested value_type buffer sequence requirementJacksonville
3026filesystem::weakly_canonical still defined in terms of canonical(p, base)JacksonvilleComplete
3030Who shall meet the requirements of try_lock?JacksonvilleNothing to do
3034P0767R1 breaks previously-standard-layout typesJacksonvilleComplete
3035std::allocator's constructors should be constexprJacksonvilleComplete
3039Unnecessary decay in thread and packaged_taskJacksonvilleComplete
3041Unnecessary decay in reference_wrapperJacksonvilleComplete
3042is_literal_type_v should be inlineJacksonvilleComplete
3043Bogus postcondition for filesystem_error constructorJacksonvilleComplete
3045atomic<floating-point> doesn't have value_type or difference_typeJacksonville
3048transform_reduce(exec, first1, last1, first2, init) discards execution policyJacksonville
3051Floating point classifications were inadvertently changed in P0175JacksonvilleNothing to do
3075basic_string needs deduction guides from basic_string_viewJacksonvilleComplete
2139What is a user-defined type?Rapperswil
2970Return type of std::visit misspecifiedRapperswil
3058Parallel adjacent_difference shouldn't require creating temporariesRapperswil
3062Unnecessary decay_t in is_execution_policy_v should be remove_cvref_tRapperswil
3067recursive_directory_iterator::pop must invalidateRapperswilNothing to do
3071[networking.ts] read_until still refers to "input sequence"RapperswilNothing to do
3074Non-member functions for valarray should only deduce from the valarrayRapperswil
3076basic_string CTAD ambiguityRapperswilComplete
3079LWG 2935 forgot to fix the existing_p overloads of create_directoryRapperswil
3080Floating point from_chars pattern specification breaks round-trippingRapperswil
3083What should ios::iword(-1) do?RapperswilNothing to do
3094[time.duration.io]p4 makes surprising claims about encodingRapperswil
3100Unnecessary and confusing "empty span" wordingRapperswilNothing to do
3102Clarify span iterator and const_iterator behaviorRapperswilComplete
3104Fixing duration divisionRapperswilComplete
2183Muddled allocator requirements for match_results constructorsSan DiegoComplete
2184Muddled allocator requirements for match_results assignmentsSan DiegoComplete
2412promise::set_value() and promise::get_future() should not raceSan Diego
2499operator>>(basic_istream&, CharT*) makes it hard to avoid buffer overflowsSan DiegoResolved by P0487R1
2682filesystem::copy() won't create a symlink to a directorySan DiegoNothing to do
2697[concurr.ts] Behavior of future/shared_future unwrapping constructor when given an invalid futureSan Diego
2797Trait precondition violationsSan DiegoResolved by 1285R0
2936Path comparison is defined in terms of the generic formatSan DiegoComplete
2943Problematic specification of the wide version of basic_filebuf::openSan DiegoNothing to do
2960[fund.ts.v3] nonesuch is insufficiently uselessSan DiegoComplete
2995basic_stringbuf default constructor forbids it from using SSO capacitySan Diego
2996Missing rvalue overloads for shared_ptr operationsSan Diego
3008make_shared (sub)object destruction semantics are not specifiedSan Diego
3022is_convertible<derived*, base*> may lead to ODRSan DiegoResolved by 1285R0
3025Map-like container deduction guides should use pair<Key, T>, not pair<const Key, T>San Diego
3031Algorithms and predicates with non-const reference argumentsSan Diego
3037polymorphic_allocator and incomplete typesSan Diego
3038polymorphic_allocator::allocate should not allow integer overflow to create vulnerabilitiesSan Diego
3054uninitialized_copy appears to not be able to meet its exception-safety guaranteeSan Diego
3065LWG 2989 missed that all path's other operators should be hidden friends as wellSan DiegoComplete
3096path::lexically_relative is confused by trailing slashesSan DiegoComplete
3116OUTERMOST_ALLOC_TRAITS needs remove_reference_tSan Diego
3122__cpp_lib_chrono_udls was accidentally droppedSan DiegoComplete
3127basic_osyncstream::rdbuf needs a const_castSan Diego
3128strstream::rdbuf needs a const_castSan DiegoNothing to do
3129regex_token_iterator constructor uses wrong pointer arithmeticSan Diego
3130§[input.output] needs many addressofSan Diego
3131addressof all the thingsSan Diego
3132Library needs to ban macros named expects or ensuresSan DiegoNothing to do
3134[fund.ts.v3] LFTSv3 contains extraneous [meta] variable templates that should have been deleted by P09961San DiegoResolved by P1210R0
3137Header for __cpp_lib_to_charsSan DiegoComplete
3145file_clock breaks ABI for C++17 implementationsSan DiegoComplete
3147Definitions of "likely" and "unlikely" are likely to cause problemsSan Diego
3148<concepts> should be freestandingSan Diego
3153Common and common_type have too little in commonSan Diego
3154Common and CommonReference have a common defectSan Diego
3012atomic<T> is unimplementable for non-is_trivially_copy_constructible TKona
3040basic_string_view::starts_with Effects are incorrectKonaComplete
3077(push|emplace)_back should invalidate the end iteratorKonaNothing to do
3087One final &x in §[list.ops]KonaNothing to do
3101span's Container constructors need another constraintKonaComplete
3112system_error and filesystem_error constructors taking a string may not be able to meet their postconditionsKona
3119Program-definedness of closure typesKonaNothing to do
3133Modernizing numeric type requirementsKona
3144span does not have a const_pointer typedefKonaComplete
3173Enable CTAD for ref-viewKona
3179subrange should always model RangeKona
3180Inconsistently named return type for ranges::minmax_elementKona
3182Specification of Same could be clearerKona

Last Updated: 29-Apr-2018