diff options
Diffstat (limited to 'libcxx')
623 files changed, 22681 insertions, 3726 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 5162963bafd6..a119850cd808 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -361,8 +361,7 @@ endif() if (NOT LIBCXX_ENABLE_RTTI AND LIBCXX_ENABLE_EXCEPTIONS) message(FATAL_ERROR "Libc++ cannot be built with exceptions enabled but RTTI" " disabled, since that configuration is broken. See" - " https://github.com/llvm/llvm-project/issues/66117" - " for details.") + " https://llvm.org/PR66117 for details.") endif() if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT) diff --git a/libcxx/docs/ABIGuarantees.rst b/libcxx/docs/ABIGuarantees.rst index c7d5afe1080b..4d4674c7756a 100644 --- a/libcxx/docs/ABIGuarantees.rst +++ b/libcxx/docs/ABIGuarantees.rst @@ -44,6 +44,10 @@ This removes the ``iterator`` base class from ``back_insert_iterator``, ``front_ This doesn't directly affect the layout of these types in most cases, but may result in more padding being used when they are used in combination, for example ``reverse_iterator<reverse_iterator<T>>``. +``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` +------------------------------------------------- +This removes a second member in ``reverse_iterator`` that is unused after LWG2360. + ``_LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION`` ------------------------------------------------- This changes the index type used inside ``variant`` to the smallest required type to reduce the datasize of variants in diff --git a/libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst b/libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst index 02cbc162318e..e52b625fae8b 100644 --- a/libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst +++ b/libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst @@ -22,9 +22,10 @@ to port headers to platforms with reduced functionality. A disadvantage is that users unknowingly depend on these transitive includes. Thus removing an include might break their build after upgrading a newer -version of libc++. For example, ``<algorithm>`` is often forgotten but using -algorithms will still work through those transitive includes. This problem is -solved by modules, however in practice most people do not use modules (yet). +version of libc++ by reducing the set of declarations provided by a header. +For example, ``<algorithm>`` is often forgotten but using algorithms will +still work through those transitive includes. This problem is solved by modules, +however in practice most people do not use modules (yet). To ease the removal of transitive includes in libc++, libc++ will remove unnecessary transitive includes in newly supported C++ versions. This means @@ -33,21 +34,34 @@ newer version of the Standard. Libc++ also reserves the right to remove transitive includes at any other time, however new language versions will be used as a convenient way to perform bulk removals of transitive includes. -For libc++ developers, this means that any transitive include removal must be -guarded by something of the form: +However, libc++ intends not to gratuitously break users on stable versions of +the Standard. Hence, we intend to maintain backwards compatibility of the +declarations we provide in a header, within reason. We reserve the right to +break such backwards compatibility in the future, however we will strive to +do it in a user-friendly way, again within reason. For libc++ developers, this +means that any transitive include removal of a public header must be guarded by +something of the form: .. code-block:: cpp - #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 + #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 23 # include <algorithm> # include <iterator> # include <utility> #endif -When users define ``_LIBCPP_REMOVE_TRANSITIVE_INCLUDES``, libc++ will not -include transitive headers, regardless of the language version. This can be -useful for users to aid the transition to a newer language version, or by users -who simply want to make sure they include what they use in their code. +Occasionally, private headers may also be included transitively for backwards +compatibility in the same manner. We currently strive to provide backwards +compatibility on the set of declarations provided by a header in all Standard +modes starting with **C++23**. Note that this is very difficult to actually +enforce, so this is done only on a best effort basis. + +When users define ``_LIBCPP_REMOVE_TRANSITIVE_INCLUDES``, libc++ will not include +transitive headers, regardless of the language version. This can be useful for users +to aid the transition to a newer language version, or by users who simply want to +make sure they include what they use in their code. However, note that defining this +macro means that the set of declarations and transitive includes provided by the library +may change from release to release, which can break your code. Rationale diff --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst b/libcxx/docs/DesignDocs/VisibilityMacros.rst index e9f88118b7ef..db54b35386b1 100644 --- a/libcxx/docs/DesignDocs/VisibilityMacros.rst +++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst @@ -31,7 +31,9 @@ Visibility Macros Mark a symbol as being part of our ABI. This includes functions that are part of the libc++ library, type information and other symbols. On Windows, this macro applies `dllimport`/`dllexport` to the symbol, and on other - platforms it gives the symbol default visibility. + platforms it gives the symbol default visibility. This macro should never be + used on class templates. On classes it should only be used if the vtable + lives in the built library. **_LIBCPP_OVERRIDABLE_FUNC_VIS** Mark a symbol as being exported by the libc++ library, but allow it to be diff --git a/libcxx/docs/Modules.rst b/libcxx/docs/Modules.rst index ebd851fed95f..c8f3e6194fd8 100644 --- a/libcxx/docs/Modules.rst +++ b/libcxx/docs/Modules.rst @@ -72,7 +72,7 @@ Some of the current limitations * Clang: * Including headers after importing the ``std`` module may fail. This is hard to solve and there is a work-around by first including all headers - `bug report <https://github.com/llvm/llvm-project/issues/61465>`__. + `bug report <https://llvm.org/PR61465>`__. Blockers ~~~~~~~~ @@ -88,8 +88,7 @@ Blockers * Clang - * Some concepts do not work properly - `bug report <https://github.com/llvm/llvm-project/issues/62943>`__. + * Some concepts do not work properly `bug report <https://llvm.org/PR61465>`__. Using in external projects diff --git a/libcxx/docs/ReleaseNotes/22.rst b/libcxx/docs/ReleaseNotes/22.rst index a26c5476d421..e56f0a88db13 100644 --- a/libcxx/docs/ReleaseNotes/22.rst +++ b/libcxx/docs/ReleaseNotes/22.rst @@ -38,8 +38,9 @@ What's New in Libc++ 22.0.0? Implemented Papers ------------------ -- P2321R2: ``zip`` (`Github <https://github.com/llvm/llvm-project/issues/105169>`__) (The paper is partially implemented. ``zip_transform_view`` is implemented in this release) -- P3168R2: Give ``std::optional`` Range Support (`Github <https://github.com/llvm/llvm-project/issues/105430>`__) +- P2321R2: ``zip`` (`Github <https://llvm.org/PR105169>`__) (The paper is partially implemented. ``zip_transform_view`` + is implemented in this release) +- P3168R2: Give ``std::optional`` Range Support (`Github <https://llvm.org/PR105430>`__) Improvements and New Features ----------------------------- @@ -50,10 +51,17 @@ Improvements and New Features - The performance of ``unordered_set::operator=(const unordered_set&)`` has been improved by up to 5x. - The performance of ``map::erase`` and ``set::erase`` has been improved by up to 2x - The performance of ``find(key)`` in ``map``, ``set``, ``multimap`` and ``multiset`` has been improved by up to 2.3x -- Some reallocations are now avoided in `std::filesystem::path::lexically_relative`, resulting in a performance improvement of up to 1.7x. -- The performance of the ``(iterator, iterator)`` constructors of ``multimap`` and ``multiset`` +- Some reallocations are now avoided in `std::filesystem::path::lexically_relative`, resulting in a performance + improvement of up to 1.7x. +- The performance of the ``(iterator, iterator)`` constructors of ``map``, ``set``, ``multimap`` and ``multiset`` has been improved by up to 3x -- The performance of ``insert(iterator, iterator)`` of ``multimap`` and ``multiset`` has been improved by up to 2.5x +- The performance of ``insert(iterator, iterator)`` of ``map``, ``set``, ``multimap`` and ``multiset`` has been improved + by up to 2.5x +- The performance of ``erase(iterator, iterator)`` in the unordered containers has been improved by up to 1.9x +- The performance of ``map::insert_or_assign`` has been improved by up to 2x + +- ``ofstream::write`` has been optimized to pass through large strings to system calls directly instead of copying them + in chunks into a buffer. Deprecations and Removals ------------------------- @@ -61,11 +69,25 @@ Deprecations and Removals Potentially breaking changes ---------------------------- +- The algorithm for ``multi{map,set}::find`` has been modified such that it doesn't necessarily return an iterator to + the first equal element in the container. This was never guaranteed by the Standard, but libc++ previously happened to + always return the first equal element, like other implementations do. Starting with this release, code relying on the + first element being returned from ``find`` will be broken, and ``lower_bound`` or ``equal_range`` should be used + instead. + +- The ABI flag ``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` has been split off from + ``_LIBCPP_ABI_NO_ITERATOR_BASES``. If you are using this flag and care about ABI stability, you should set + ``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` as well. + Announcements About Future Releases ----------------------------------- ABI Affecting Changes --------------------- +- The ABI flag ``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` has been split off from + ``_LIBCPP_ABI_NO_ITERATOR_BASES``. If you are using this flag and care about ABI stability, you should set + ``_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER`` as well. + Build System Changes -------------------- diff --git a/libcxx/docs/Status/Cxx17Issues.csv b/libcxx/docs/Status/Cxx17Issues.csv index 15f4b28575b6..4e8cbf9abb89 100644 --- a/libcxx/docs/Status/Cxx17Issues.csv +++ b/libcxx/docs/Status/Cxx17Issues.csv @@ -1,315 +1,315 @@ "Issue #","Issue Name","Meeting","Status","First released version","Notes" -"`LWG2016 <https://wg21.link/LWG2016>`__","Allocators must be no-throw swappable","2014-11 (Urbana)","|Complete|","","" -"`LWG2118 <https://wg21.link/LWG2118>`__","``unique_ptr``\ for array does not support cv qualification conversion of actual argument","2014-11 (Urbana)","|Complete|","","" -"`LWG2170 <https://wg21.link/LWG2170>`__","Aggregates cannot be ``DefaultConstructible``\ ","2014-11 (Urbana)","|Complete|","","" -"`LWG2340 <https://wg21.link/LWG2340>`__","Replacement allocation functions declared as inline","2014-11 (Urbana)","|Complete|","","" -"`LWG2354 <https://wg21.link/LWG2354>`__","Unnecessary copying when inserting into maps with braced-init syntax","2014-11 (Urbana)","|Complete|","","" -"`LWG2377 <https://wg21.link/LWG2377>`__","``std::align``\ requirements overly strict","2014-11 (Urbana)","|Complete|","","" -"`LWG2396 <https://wg21.link/LWG2396>`__","``underlying_type``\ doesn't say what to do for an incomplete enumeration type","2014-11 (Urbana)","|Complete|","","" -"`LWG2399 <https://wg21.link/LWG2399>`__","``shared_ptr``\ 's constructor from ``unique_ptr``\ should be constrained","2014-11 (Urbana)","|Complete|","","" -"`LWG2400 <https://wg21.link/LWG2400>`__","``shared_ptr``\ 's ``get_deleter()``\ should use ``addressof()``\ ","2014-11 (Urbana)","|Complete|","","" -"`LWG2401 <https://wg21.link/LWG2401>`__","``std::function``\ needs more noexcept","2014-11 (Urbana)","|Complete|","","" -"`LWG2404 <https://wg21.link/LWG2404>`__","``mismatch()``\ 's complexity needs to be updated","2014-11 (Urbana)","|Complete|","","" -"`LWG2408 <https://wg21.link/LWG2408>`__","SFINAE-friendly ``common_type``\ / ``iterator_traits``\ is missing in C++14","2014-11 (Urbana)","|Complete|","","" -"`LWG2106 <https://wg21.link/LWG2106>`__","``move_iterator``\ wrapping iterators returning prvalues","2014-11 (Urbana)","|Complete|","","" -"`LWG2129 <https://wg21.link/LWG2129>`__","User specializations of ``std::initializer_list``\ ","2014-11 (Urbana)","|Complete|","21","" -"`LWG2212 <https://wg21.link/LWG2212>`__","``tuple_size``\ for ``const pair``\ request <tuple> header","2014-11 (Urbana)","|Complete|","","" -"`LWG2217 <https://wg21.link/LWG2217>`__","``operator==(sub_match, string)``\ slices on embedded '\0's","2014-11 (Urbana)","|Complete|","","" -"`LWG2230 <https://wg21.link/LWG2230>`__","""see below"" for ``initializer_list``\ constructors of unordered containers","2014-11 (Urbana)","|Complete|","","" -"`LWG2233 <https://wg21.link/LWG2233>`__","``bad_function_call::what()``\ unhelpful","2014-11 (Urbana)","|Complete|","","" -"`LWG2266 <https://wg21.link/LWG2266>`__","``vector``\ and ``deque``\ have incorrect insert requirements","2014-11 (Urbana)","|Complete|","","" -"`LWG2325 <https://wg21.link/LWG2325>`__","``minmax_element()``\ 's behavior differing from ``max_element()``\ 's should be noted","2014-11 (Urbana)","|Complete|","","" -"`LWG2361 <https://wg21.link/LWG2361>`__","Apply 2299 resolution throughout library","2014-11 (Urbana)","|Complete|","","" -"`LWG2365 <https://wg21.link/LWG2365>`__","Missing noexcept in ``shared_ptr::shared_ptr(nullptr_t)``\ ","2014-11 (Urbana)","|Complete|","","" -"`LWG2376 <https://wg21.link/LWG2376>`__","``bad_weak_ptr::what()``\ overspecified","2014-11 (Urbana)","|Complete|","","" -"`LWG2387 <https://wg21.link/LWG2387>`__","More nested types that must be accessible and unambiguous","2014-11 (Urbana)","|Complete|","","" +"`LWG2016 <https://wg21.link/LWG2016>`__","Allocators must be no-throw swappable","2014-11 (Urbana)","|Complete|","","`#103224 <https://github.com/llvm/llvm-project/issues/103224>`__","" +"`LWG2118 <https://wg21.link/LWG2118>`__","``unique_ptr``\ for array does not support cv qualification conversion of actual argument","2014-11 (Urbana)","|Complete|","","`#103225 <https://github.com/llvm/llvm-project/issues/103225>`__","" +"`LWG2170 <https://wg21.link/LWG2170>`__","Aggregates cannot be ``DefaultConstructible``\ ","2014-11 (Urbana)","|Complete|","","`#103226 <https://github.com/llvm/llvm-project/issues/103226>`__","" +"`LWG2340 <https://wg21.link/LWG2340>`__","Replacement allocation functions declared as inline","2014-11 (Urbana)","|Complete|","","`#103227 <https://github.com/llvm/llvm-project/issues/103227>`__","" +"`LWG2354 <https://wg21.link/LWG2354>`__","Unnecessary copying when inserting into maps with braced-init syntax","2014-11 (Urbana)","|Complete|","","`#103228 <https://github.com/llvm/llvm-project/issues/103228>`__","" +"`LWG2377 <https://wg21.link/LWG2377>`__","``std::align``\ requirements overly strict","2014-11 (Urbana)","|Complete|","","`#103229 <https://github.com/llvm/llvm-project/issues/103229>`__","" +"`LWG2396 <https://wg21.link/LWG2396>`__","``underlying_type``\ doesn't say what to do for an incomplete enumeration type","2014-11 (Urbana)","|Complete|","","`#103230 <https://github.com/llvm/llvm-project/issues/103230>`__","" +"`LWG2399 <https://wg21.link/LWG2399>`__","``shared_ptr``\ 's constructor from ``unique_ptr``\ should be constrained","2014-11 (Urbana)","|Complete|","","`#103231 <https://github.com/llvm/llvm-project/issues/103231>`__","" +"`LWG2400 <https://wg21.link/LWG2400>`__","``shared_ptr``\ 's ``get_deleter()``\ should use ``addressof()``\ ","2014-11 (Urbana)","|Complete|","","`#103232 <https://github.com/llvm/llvm-project/issues/103232>`__","" +"`LWG2401 <https://wg21.link/LWG2401>`__","``std::function``\ needs more noexcept","2014-11 (Urbana)","|Complete|","","`#103233 <https://github.com/llvm/llvm-project/issues/103233>`__","" +"`LWG2404 <https://wg21.link/LWG2404>`__","``mismatch()``\ 's complexity needs to be updated","2014-11 (Urbana)","|Complete|","","`#103234 <https://github.com/llvm/llvm-project/issues/103234>`__","" +"`LWG2408 <https://wg21.link/LWG2408>`__","SFINAE-friendly ``common_type``\ / ``iterator_traits``\ is missing in C++14","2014-11 (Urbana)","|Complete|","","`#103235 <https://github.com/llvm/llvm-project/issues/103235>`__","" +"`LWG2106 <https://wg21.link/LWG2106>`__","``move_iterator``\ wrapping iterators returning prvalues","2014-11 (Urbana)","|Complete|","","`#103236 <https://github.com/llvm/llvm-project/issues/103236>`__","" +"`LWG2129 <https://wg21.link/LWG2129>`__","User specializations of ``std::initializer_list``\ ","2014-11 (Urbana)","|Complete|","21","`#103237 <https://github.com/llvm/llvm-project/issues/103237>`__","" +"`LWG2212 <https://wg21.link/LWG2212>`__","``tuple_size``\ for ``const pair``\ request <tuple> header","2014-11 (Urbana)","|Complete|","","`#103238 <https://github.com/llvm/llvm-project/issues/103238>`__","" +"`LWG2217 <https://wg21.link/LWG2217>`__","``operator==(sub_match, string)``\ slices on embedded '\0's","2014-11 (Urbana)","|Complete|","","`#103239 <https://github.com/llvm/llvm-project/issues/103239>`__","" +"`LWG2230 <https://wg21.link/LWG2230>`__","""see below"" for ``initializer_list``\ constructors of unordered containers","2014-11 (Urbana)","|Complete|","","`#103240 <https://github.com/llvm/llvm-project/issues/103240>`__","" +"`LWG2233 <https://wg21.link/LWG2233>`__","``bad_function_call::what()``\ unhelpful","2014-11 (Urbana)","|Complete|","","`#103241 <https://github.com/llvm/llvm-project/issues/103241>`__","" +"`LWG2266 <https://wg21.link/LWG2266>`__","``vector``\ and ``deque``\ have incorrect insert requirements","2014-11 (Urbana)","|Complete|","","`#103242 <https://github.com/llvm/llvm-project/issues/103242>`__","" +"`LWG2325 <https://wg21.link/LWG2325>`__","``minmax_element()``\ 's behavior differing from ``max_element()``\ 's should be noted","2014-11 (Urbana)","|Complete|","","`#103243 <https://github.com/llvm/llvm-project/issues/103243>`__","" +"`LWG2361 <https://wg21.link/LWG2361>`__","Apply 2299 resolution throughout library","2014-11 (Urbana)","|Complete|","","`#103244 <https://github.com/llvm/llvm-project/issues/103244>`__","" +"`LWG2365 <https://wg21.link/LWG2365>`__","Missing noexcept in ``shared_ptr::shared_ptr(nullptr_t)``\ ","2014-11 (Urbana)","|Complete|","","`#103246 <https://github.com/llvm/llvm-project/issues/103246>`__","" +"`LWG2376 <https://wg21.link/LWG2376>`__","``bad_weak_ptr::what()``\ overspecified","2014-11 (Urbana)","|Complete|","","`#103247 <https://github.com/llvm/llvm-project/issues/103247>`__","" +"`LWG2387 <https://wg21.link/LWG2387>`__","More nested types that must be accessible and unambiguous","2014-11 (Urbana)","|Complete|","","`#103248 <https://github.com/llvm/llvm-project/issues/103248>`__","" "","","","","","" -"`LWG2059 <https://wg21.link/LWG2059>`__","C++0x ambiguity problem with map::erase","2015-05 (Lenexa)","|Complete|","","" -"`LWG2063 <https://wg21.link/LWG2063>`__","Contradictory requirements for string move assignment","2015-05 (Lenexa)","|Complete|","","" -"`LWG2076 <https://wg21.link/LWG2076>`__","Bad CopyConstructible requirement in set constructors","2015-05 (Lenexa)","|Complete|","","" -"`LWG2160 <https://wg21.link/LWG2160>`__","Unintended destruction ordering-specification of resize","2015-05 (Lenexa)","|Complete|","","" -"`LWG2168 <https://wg21.link/LWG2168>`__","Inconsistent specification of uniform_real_distribution constructor","2015-05 (Lenexa)","|Complete|","","" -"`LWG2239 <https://wg21.link/LWG2239>`__","min/max/minmax requirements","2015-05 (Lenexa)","|Complete|","","" -"`LWG2364 <https://wg21.link/LWG2364>`__","deque and vector pop_back don't specify iterator invalidation requirements","2015-05 (Lenexa)","|Complete|","","" -"`LWG2369 <https://wg21.link/LWG2369>`__","constexpr max(initializer_list) vs max_element","2015-05 (Lenexa)","|Complete|","","" -"`LWG2378 <https://wg21.link/LWG2378>`__","Behaviour of standard exception types","2015-05 (Lenexa)","|Complete|","","" -"`LWG2403 <https://wg21.link/LWG2403>`__","stof() should call strtof() and wcstof()","2015-05 (Lenexa)","|Complete|","","" -"`LWG2406 <https://wg21.link/LWG2406>`__","negative_binomial_distribution should reject p == 1","2015-05 (Lenexa)","|Complete|","","" -"`LWG2407 <https://wg21.link/LWG2407>`__","packaged_task(allocator_arg_t, const Allocator&, F&&) should neither be constrained nor explicit","2015-05 (Lenexa)","|Complete|","","" -"`LWG2411 <https://wg21.link/LWG2411>`__","shared_ptr is only contextually convertible to bool","2015-05 (Lenexa)","|Complete|","","" -"`LWG2415 <https://wg21.link/LWG2415>`__","Inconsistency between unique_ptr and shared_ptr","2015-05 (Lenexa)","|Complete|","","" -"`LWG2420 <https://wg21.link/LWG2420>`__","function<void(ArgTypes...)> does not discard the return value of the target object","2015-05 (Lenexa)","|Complete|","","" -"`LWG2425 <https://wg21.link/LWG2425>`__","``operator delete(void*, size_t)``\ doesn't invalidate pointers sufficiently","2015-05 (Lenexa)","|Complete|","","" -"`LWG2427 <https://wg21.link/LWG2427>`__","Container adaptors as sequence containers, redux","2015-05 (Lenexa)","|Complete|","","" -"`LWG2428 <https://wg21.link/LWG2428>`__","""External declaration"" used without being defined","2015-05 (Lenexa)","|Complete|","","" -"`LWG2433 <https://wg21.link/LWG2433>`__","``uninitialized_copy()``\ /etc. should tolerate overloaded operator&","2015-05 (Lenexa)","|Complete|","","" -"`LWG2434 <https://wg21.link/LWG2434>`__","``shared_ptr::use_count()``\ is efficient","2015-05 (Lenexa)","|Complete|","","" -"`LWG2437 <https://wg21.link/LWG2437>`__","``iterator_traits::reference``\ can and can't be void","2015-05 (Lenexa)","|Complete|","","" -"`LWG2438 <https://wg21.link/LWG2438>`__","``std::iterator``\ inheritance shouldn't be mandated","2015-05 (Lenexa)","|Complete|","","" -"`LWG2439 <https://wg21.link/LWG2439>`__","``unique_copy()``\ sometimes can't fall back to reading its output","2015-05 (Lenexa)","|Complete|","","" -"`LWG2440 <https://wg21.link/LWG2440>`__","``seed_seq::size()``\ should be noexcept","2015-05 (Lenexa)","|Complete|","","" -"`LWG2442 <https://wg21.link/LWG2442>`__","``call_once()``\ shouldn't DECAY_COPY()","2015-05 (Lenexa)","|Complete|","","" -"`LWG2448 <https://wg21.link/LWG2448>`__","Non-normative Container destructor specification","2015-05 (Lenexa)","|Complete|","","" -"`LWG2454 <https://wg21.link/LWG2454>`__","Add ``raw_storage_iterator::base()``\ member","2015-05 (Lenexa)","|Complete|","","" -"`LWG2455 <https://wg21.link/LWG2455>`__","Allocator default construction should be allowed to throw","2015-05 (Lenexa)","|Complete|","","" -"`LWG2458 <https://wg21.link/LWG2458>`__","N3778 and new library deallocation signatures","2015-05 (Lenexa)","|Complete|","","" -"`LWG2459 <https://wg21.link/LWG2459>`__","``std::polar``\ should require a non-negative rho","2015-05 (Lenexa)","|Complete|","","" -"`LWG2464 <https://wg21.link/LWG2464>`__","``try_emplace``\ and ``insert_or_assign``\ misspecified","2015-05 (Lenexa)","|Complete|","","" -"`LWG2467 <https://wg21.link/LWG2467>`__","``is_always_equal``\ has slightly inconsistent default","2015-05 (Lenexa)","|Complete|","","" -"`LWG2470 <https://wg21.link/LWG2470>`__","Allocator's destroy function should be allowed to fail to instantiate","2015-05 (Lenexa)","|Complete|","","" -"`LWG2482 <https://wg21.link/LWG2482>`__","[c.strings] Table 73 mentions nonexistent functions","2015-05 (Lenexa)","|Complete|","","" -"`LWG2488 <https://wg21.link/LWG2488>`__","Placeholders should be allowed and encouraged to be constexpr","2015-05 (Lenexa)","|Complete|","","" +"`LWG2059 <https://wg21.link/LWG2059>`__","C++0x ambiguity problem with map::erase","2015-05 (Lenexa)","|Complete|","","`#103249 <https://github.com/llvm/llvm-project/issues/103249>`__","" +"`LWG2063 <https://wg21.link/LWG2063>`__","Contradictory requirements for string move assignment","2015-05 (Lenexa)","|Complete|","","`#103250 <https://github.com/llvm/llvm-project/issues/103250>`__","" +"`LWG2076 <https://wg21.link/LWG2076>`__","Bad CopyConstructible requirement in set constructors","2015-05 (Lenexa)","|Complete|","","`#103251 <https://github.com/llvm/llvm-project/issues/103251>`__","" +"`LWG2160 <https://wg21.link/LWG2160>`__","Unintended destruction ordering-specification of resize","2015-05 (Lenexa)","|Complete|","","`#103252 <https://github.com/llvm/llvm-project/issues/103252>`__","" +"`LWG2168 <https://wg21.link/LWG2168>`__","Inconsistent specification of uniform_real_distribution constructor","2015-05 (Lenexa)","|Complete|","","`#103253 <https://github.com/llvm/llvm-project/issues/103253>`__","" +"`LWG2239 <https://wg21.link/LWG2239>`__","min/max/minmax requirements","2015-05 (Lenexa)","|Complete|","","`#103254 <https://github.com/llvm/llvm-project/issues/103254>`__","" +"`LWG2364 <https://wg21.link/LWG2364>`__","deque and vector pop_back don't specify iterator invalidation requirements","2015-05 (Lenexa)","|Complete|","","`#103255 <https://github.com/llvm/llvm-project/issues/103255>`__","" +"`LWG2369 <https://wg21.link/LWG2369>`__","constexpr max(initializer_list) vs max_element","2015-05 (Lenexa)","|Complete|","","`#103256 <https://github.com/llvm/llvm-project/issues/103256>`__","" +"`LWG2378 <https://wg21.link/LWG2378>`__","Behaviour of standard exception types","2015-05 (Lenexa)","|Complete|","","`#103257 <https://github.com/llvm/llvm-project/issues/103257>`__","" +"`LWG2403 <https://wg21.link/LWG2403>`__","stof() should call strtof() and wcstof()","2015-05 (Lenexa)","|Complete|","","`#103258 <https://github.com/llvm/llvm-project/issues/103258>`__","" +"`LWG2406 <https://wg21.link/LWG2406>`__","negative_binomial_distribution should reject p == 1","2015-05 (Lenexa)","|Complete|","","`#103259 <https://github.com/llvm/llvm-project/issues/103259>`__","" +"`LWG2407 <https://wg21.link/LWG2407>`__","packaged_task(allocator_arg_t, const Allocator&, F&&) should neither be constrained nor explicit","2015-05 (Lenexa)","|Complete|","","`#103260 <https://github.com/llvm/llvm-project/issues/103260>`__","" +"`LWG2411 <https://wg21.link/LWG2411>`__","shared_ptr is only contextually convertible to bool","2015-05 (Lenexa)","|Complete|","","`#103261 <https://github.com/llvm/llvm-project/issues/103261>`__","" +"`LWG2415 <https://wg21.link/LWG2415>`__","Inconsistency between unique_ptr and shared_ptr","2015-05 (Lenexa)","|Complete|","","`#103262 <https://github.com/llvm/llvm-project/issues/103262>`__","" +"`LWG2420 <https://wg21.link/LWG2420>`__","function<void(ArgTypes...)> does not discard the return value of the target object","2015-05 (Lenexa)","|Complete|","","`#103263 <https://github.com/llvm/llvm-project/issues/103263>`__","" +"`LWG2425 <https://wg21.link/LWG2425>`__","``operator delete(void*, size_t)``\ doesn't invalidate pointers sufficiently","2015-05 (Lenexa)","|Complete|","","`#103264 <https://github.com/llvm/llvm-project/issues/103264>`__","" +"`LWG2427 <https://wg21.link/LWG2427>`__","Container adaptors as sequence containers, redux","2015-05 (Lenexa)","|Complete|","","`#103265 <https://github.com/llvm/llvm-project/issues/103265>`__","" +"`LWG2428 <https://wg21.link/LWG2428>`__","""External declaration"" used without being defined","2015-05 (Lenexa)","|Complete|","","`#103266 <https://github.com/llvm/llvm-project/issues/103266>`__","" +"`LWG2433 <https://wg21.link/LWG2433>`__","``uninitialized_copy()``\ /etc. should tolerate overloaded operator&","2015-05 (Lenexa)","|Complete|","","`#103267 <https://github.com/llvm/llvm-project/issues/103267>`__","" +"`LWG2434 <https://wg21.link/LWG2434>`__","``shared_ptr::use_count()``\ is efficient","2015-05 (Lenexa)","|Complete|","","`#103268 <https://github.com/llvm/llvm-project/issues/103268>`__","" +"`LWG2437 <https://wg21.link/LWG2437>`__","``iterator_traits::reference``\ can and can't be void","2015-05 (Lenexa)","|Complete|","","`#103269 <https://github.com/llvm/llvm-project/issues/103269>`__","" +"`LWG2438 <https://wg21.link/LWG2438>`__","``std::iterator``\ inheritance shouldn't be mandated","2015-05 (Lenexa)","|Complete|","","`#103270 <https://github.com/llvm/llvm-project/issues/103270>`__","" +"`LWG2439 <https://wg21.link/LWG2439>`__","``unique_copy()``\ sometimes can't fall back to reading its output","2015-05 (Lenexa)","|Complete|","","`#103271 <https://github.com/llvm/llvm-project/issues/103271>`__","" +"`LWG2440 <https://wg21.link/LWG2440>`__","``seed_seq::size()``\ should be noexcept","2015-05 (Lenexa)","|Complete|","","`#103272 <https://github.com/llvm/llvm-project/issues/103272>`__","" +"`LWG2442 <https://wg21.link/LWG2442>`__","``call_once()``\ shouldn't DECAY_COPY()","2015-05 (Lenexa)","|Complete|","","`#103274 <https://github.com/llvm/llvm-project/issues/103274>`__","" +"`LWG2448 <https://wg21.link/LWG2448>`__","Non-normative Container destructor specification","2015-05 (Lenexa)","|Complete|","","`#103276 <https://github.com/llvm/llvm-project/issues/103276>`__","" +"`LWG2454 <https://wg21.link/LWG2454>`__","Add ``raw_storage_iterator::base()``\ member","2015-05 (Lenexa)","|Complete|","","`#103277 <https://github.com/llvm/llvm-project/issues/103277>`__","" +"`LWG2455 <https://wg21.link/LWG2455>`__","Allocator default construction should be allowed to throw","2015-05 (Lenexa)","|Complete|","","`#103278 <https://github.com/llvm/llvm-project/issues/103278>`__","" +"`LWG2458 <https://wg21.link/LWG2458>`__","N3778 and new library deallocation signatures","2015-05 (Lenexa)","|Complete|","","`#103279 <https://github.com/llvm/llvm-project/issues/103279>`__","" +"`LWG2459 <https://wg21.link/LWG2459>`__","``std::polar``\ should require a non-negative rho","2015-05 (Lenexa)","|Complete|","","`#103280 <https://github.com/llvm/llvm-project/issues/103280>`__","" +"`LWG2464 <https://wg21.link/LWG2464>`__","``try_emplace``\ and ``insert_or_assign``\ misspecified","2015-05 (Lenexa)","|Complete|","","`#103281 <https://github.com/llvm/llvm-project/issues/103281>`__","" +"`LWG2467 <https://wg21.link/LWG2467>`__","``is_always_equal``\ has slightly inconsistent default","2015-05 (Lenexa)","|Complete|","","`#103282 <https://github.com/llvm/llvm-project/issues/103282>`__","" +"`LWG2470 <https://wg21.link/LWG2470>`__","Allocator's destroy function should be allowed to fail to instantiate","2015-05 (Lenexa)","|Complete|","","`#103283 <https://github.com/llvm/llvm-project/issues/103283>`__","" +"`LWG2482 <https://wg21.link/LWG2482>`__","[c.strings] Table 73 mentions nonexistent functions","2015-05 (Lenexa)","|Complete|","","`#103284 <https://github.com/llvm/llvm-project/issues/103284>`__","" +"`LWG2488 <https://wg21.link/LWG2488>`__","Placeholders should be allowed and encouraged to be constexpr","2015-05 (Lenexa)","|Complete|","","`#103285 <https://github.com/llvm/llvm-project/issues/103285>`__","" "","","","","","" -"`LWG1169 <https://wg21.link/LWG1169>`__","``num_get``\ not fully compatible with ``strto*``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2072 <https://wg21.link/LWG2072>`__","Unclear wording about capacity of temporary buffers","2015-10 (Kona)","|Complete|","","" -"`LWG2101 <https://wg21.link/LWG2101>`__","Some transformation types can produce impossible types","2015-10 (Kona)","|Complete|","","" -"`LWG2111 <https://wg21.link/LWG2111>`__","Which ``unexpected``\ /``terminate``\ handler is called from the exception handling runtime?","2015-10 (Kona)","|Complete|","","" -"`LWG2119 <https://wg21.link/LWG2119>`__","Missing ``hash``\ specializations for extended integer types","2015-10 (Kona)","|Complete|","","" -"`LWG2127 <https://wg21.link/LWG2127>`__","Move-construction with ``raw_storage_iterator``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2133 <https://wg21.link/LWG2133>`__","Attitude to overloaded comma for iterators","2015-10 (Kona)","|Complete|","","" -"`LWG2156 <https://wg21.link/LWG2156>`__","Unordered containers' ``reserve(n)``\ reserves for ``n-1``\ elements","2015-10 (Kona)","|Complete|","","" -"`LWG2218 <https://wg21.link/LWG2218>`__","Unclear how containers use ``allocator_traits::construct()``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2219 <https://wg21.link/LWG2219>`__","``*INVOKE*``\ -ing a pointer to member with a ``reference_wrapper``\ as the object expression","2015-10 (Kona)","|Complete|","","" -"`LWG2224 <https://wg21.link/LWG2224>`__","Ambiguous status of access to non-live objects","2015-10 (Kona)","|Complete|","","" -"`LWG2234 <https://wg21.link/LWG2234>`__","``assert()``\ should allow usage in constant expressions","2015-10 (Kona)","|Complete|","","" -"`LWG2244 <https://wg21.link/LWG2244>`__","Issue on ``basic_istream::seekg``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2250 <https://wg21.link/LWG2250>`__","Follow-up On Library Issue 2207","2015-10 (Kona)","|Complete|","","" -"`LWG2259 <https://wg21.link/LWG2259>`__","Issues in 17.6.5.5 rules for member functions","2015-10 (Kona)","|Complete|","","" -"`LWG2273 <https://wg21.link/LWG2273>`__","``regex_match``\ ambiguity","2015-10 (Kona)","|Complete|","","" -"`LWG2336 <https://wg21.link/LWG2336>`__","``is_trivially_constructible``\ /``is_trivially_assignable``\ traits are always false","2015-10 (Kona)","|Complete|","","" -"`LWG2353 <https://wg21.link/LWG2353>`__","``std::next``\ is over-constrained","2015-10 (Kona)","|Complete|","","" -"`LWG2367 <https://wg21.link/LWG2367>`__","``pair``\ and ``tuple``\ are not correctly implemented for ``is_constructible``\ with no args","2015-10 (Kona)","|Complete|","","" -"`LWG2380 <https://wg21.link/LWG2380>`__","May ``<cstdlib>``\ provide ``long ::abs(long)``\ and ``long long ::abs(long long)``\ ?","2015-10 (Kona)","|Complete|","","" -"`LWG2384 <https://wg21.link/LWG2384>`__","Allocator's ``deallocate``\ function needs better specification","2015-10 (Kona)","|Complete|","","" -"`LWG2385 <https://wg21.link/LWG2385>`__","``function::assign``\ allocator argument doesn't make sense","2015-10 (Kona)","|Complete|","","" -"`LWG2435 <https://wg21.link/LWG2435>`__","``reference_wrapper::operator()``\ 's Remark should be deleted","2015-10 (Kona)","|Complete|","","" -"`LWG2447 <https://wg21.link/LWG2447>`__","Allocators and ``volatile``\ -qualified value types","2015-10 (Kona)","|Complete|","","" -"`LWG2462 <https://wg21.link/LWG2462>`__","``std::ios_base::failure``\ is overspecified","2015-10 (Kona)","|Complete|","","" -"`LWG2466 <https://wg21.link/LWG2466>`__","``allocator_traits::max_size()``\ default behavior is incorrect","2015-10 (Kona)","|Complete|","","" -"`LWG2469 <https://wg21.link/LWG2469>`__","Wrong specification of Requires clause of ``operator[]``\ for ``map``\ and ``unordered_map``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2473 <https://wg21.link/LWG2473>`__","``basic_filebuf``\ 's relation to C ``FILE``\ semantics","2015-10 (Kona)","|Complete|","","" -"`LWG2476 <https://wg21.link/LWG2476>`__","``scoped_allocator_adaptor``\ is not assignable","2015-10 (Kona)","|Complete|","","" -"`LWG2477 <https://wg21.link/LWG2477>`__","Inconsistency of wordings in ``std::vector::erase()``\ and ``std::deque::erase()``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2483 <https://wg21.link/LWG2483>`__","``throw_with_nested()``\ should use ``is_final``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2484 <https://wg21.link/LWG2484>`__","``rethrow_if_nested()``\ is doubly unimplementable","2015-10 (Kona)","|Complete|","","" -"`LWG2485 <https://wg21.link/LWG2485>`__","``get()``\ should be overloaded for ``const tuple&&``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2486 <https://wg21.link/LWG2486>`__","``mem_fn()``\ should be required to use perfect forwarding","2015-10 (Kona)","|Complete|","","" -"`LWG2487 <https://wg21.link/LWG2487>`__","``bind()``\ should be ``const``\ -overloaded, not *cv*-overloaded","2015-10 (Kona)","|Complete|","","" -"`LWG2489 <https://wg21.link/LWG2489>`__","``mem_fn()``\ should be ``noexcept``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2492 <https://wg21.link/LWG2492>`__","Clarify requirements for ``comp``\ ","2015-10 (Kona)","|Complete|","","" -"`LWG2495 <https://wg21.link/LWG2495>`__","There is no such thing as an Exception Safety element","2015-10 (Kona)","|Complete|","","" +"`LWG1169 <https://wg21.link/LWG1169>`__","``num_get``\ not fully compatible with ``strto*``\ ","2015-10 (Kona)","|Complete|","","`#103286 <https://github.com/llvm/llvm-project/issues/103286>`__","" +"`LWG2072 <https://wg21.link/LWG2072>`__","Unclear wording about capacity of temporary buffers","2015-10 (Kona)","|Complete|","","`#103287 <https://github.com/llvm/llvm-project/issues/103287>`__","" +"`LWG2101 <https://wg21.link/LWG2101>`__","Some transformation types can produce impossible types","2015-10 (Kona)","|Complete|","","`#103288 <https://github.com/llvm/llvm-project/issues/103288>`__","" +"`LWG2111 <https://wg21.link/LWG2111>`__","Which ``unexpected``\ /``terminate``\ handler is called from the exception handling runtime?","2015-10 (Kona)","|Complete|","","`#103289 <https://github.com/llvm/llvm-project/issues/103289>`__","" +"`LWG2119 <https://wg21.link/LWG2119>`__","Missing ``hash``\ specializations for extended integer types","2015-10 (Kona)","|Complete|","","`#103290 <https://github.com/llvm/llvm-project/issues/103290>`__","" +"`LWG2127 <https://wg21.link/LWG2127>`__","Move-construction with ``raw_storage_iterator``\ ","2015-10 (Kona)","|Complete|","","`#103291 <https://github.com/llvm/llvm-project/issues/103291>`__","" +"`LWG2133 <https://wg21.link/LWG2133>`__","Attitude to overloaded comma for iterators","2015-10 (Kona)","|Complete|","","`#103292 <https://github.com/llvm/llvm-project/issues/103292>`__","" +"`LWG2156 <https://wg21.link/LWG2156>`__","Unordered containers' ``reserve(n)``\ reserves for ``n-1``\ elements","2015-10 (Kona)","|Complete|","","`#103293 <https://github.com/llvm/llvm-project/issues/103293>`__","" +"`LWG2218 <https://wg21.link/LWG2218>`__","Unclear how containers use ``allocator_traits::construct()``\ ","2015-10 (Kona)","|Complete|","","`#103294 <https://github.com/llvm/llvm-project/issues/103294>`__","" +"`LWG2219 <https://wg21.link/LWG2219>`__","``*INVOKE*``\ -ing a pointer to member with a ``reference_wrapper``\ as the object expression","2015-10 (Kona)","|Complete|","","`#103295 <https://github.com/llvm/llvm-project/issues/103295>`__","" +"`LWG2224 <https://wg21.link/LWG2224>`__","Ambiguous status of access to non-live objects","2015-10 (Kona)","|Complete|","","`#103296 <https://github.com/llvm/llvm-project/issues/103296>`__","" +"`LWG2234 <https://wg21.link/LWG2234>`__","``assert()``\ should allow usage in constant expressions","2015-10 (Kona)","|Complete|","","`#103297 <https://github.com/llvm/llvm-project/issues/103297>`__","" +"`LWG2244 <https://wg21.link/LWG2244>`__","Issue on ``basic_istream::seekg``\ ","2015-10 (Kona)","|Complete|","","`#103312 <https://github.com/llvm/llvm-project/issues/103312>`__","" +"`LWG2250 <https://wg21.link/LWG2250>`__","Follow-up On Library Issue 2207","2015-10 (Kona)","|Complete|","","`#103313 <https://github.com/llvm/llvm-project/issues/103313>`__","" +"`LWG2259 <https://wg21.link/LWG2259>`__","Issues in 17.6.5.5 rules for member functions","2015-10 (Kona)","|Complete|","","`#103314 <https://github.com/llvm/llvm-project/issues/103314>`__","" +"`LWG2273 <https://wg21.link/LWG2273>`__","``regex_match``\ ambiguity","2015-10 (Kona)","|Complete|","","`#103315 <https://github.com/llvm/llvm-project/issues/103315>`__","" +"`LWG2336 <https://wg21.link/LWG2336>`__","``is_trivially_constructible``\ /``is_trivially_assignable``\ traits are always false","2015-10 (Kona)","|Complete|","","`#103316 <https://github.com/llvm/llvm-project/issues/103316>`__","" +"`LWG2353 <https://wg21.link/LWG2353>`__","``std::next``\ is over-constrained","2015-10 (Kona)","|Complete|","","`#103317 <https://github.com/llvm/llvm-project/issues/103317>`__","" +"`LWG2367 <https://wg21.link/LWG2367>`__","``pair``\ and ``tuple``\ are not correctly implemented for ``is_constructible``\ with no args","2015-10 (Kona)","|Complete|","","`#103318 <https://github.com/llvm/llvm-project/issues/103318>`__","" +"`LWG2380 <https://wg21.link/LWG2380>`__","May ``<cstdlib>``\ provide ``long ::abs(long)``\ and ``long long ::abs(long long)``\ ?","2015-10 (Kona)","|Complete|","","`#103319 <https://github.com/llvm/llvm-project/issues/103319>`__","" +"`LWG2384 <https://wg21.link/LWG2384>`__","Allocator's ``deallocate``\ function needs better specification","2015-10 (Kona)","|Complete|","","`#103320 <https://github.com/llvm/llvm-project/issues/103320>`__","" +"`LWG2385 <https://wg21.link/LWG2385>`__","``function::assign``\ allocator argument doesn't make sense","2015-10 (Kona)","|Complete|","","`#103321 <https://github.com/llvm/llvm-project/issues/103321>`__","" +"`LWG2435 <https://wg21.link/LWG2435>`__","``reference_wrapper::operator()``\ 's Remark should be deleted","2015-10 (Kona)","|Complete|","","`#103322 <https://github.com/llvm/llvm-project/issues/103322>`__","" +"`LWG2447 <https://wg21.link/LWG2447>`__","Allocators and ``volatile``\ -qualified value types","2015-10 (Kona)","|Complete|","","`#103323 <https://github.com/llvm/llvm-project/issues/103323>`__","" +"`LWG2462 <https://wg21.link/LWG2462>`__","``std::ios_base::failure``\ is overspecified","2015-10 (Kona)","|Complete|","","`#103324 <https://github.com/llvm/llvm-project/issues/103324>`__","" +"`LWG2466 <https://wg21.link/LWG2466>`__","``allocator_traits::max_size()``\ default behavior is incorrect","2015-10 (Kona)","|Complete|","","`#103325 <https://github.com/llvm/llvm-project/issues/103325>`__","" +"`LWG2469 <https://wg21.link/LWG2469>`__","Wrong specification of Requires clause of ``operator[]``\ for ``map``\ and ``unordered_map``\ ","2015-10 (Kona)","|Complete|","","`#103326 <https://github.com/llvm/llvm-project/issues/103326>`__","" +"`LWG2473 <https://wg21.link/LWG2473>`__","``basic_filebuf``\ 's relation to C ``FILE``\ semantics","2015-10 (Kona)","|Complete|","","`#103327 <https://github.com/llvm/llvm-project/issues/103327>`__","" +"`LWG2476 <https://wg21.link/LWG2476>`__","``scoped_allocator_adaptor``\ is not assignable","2015-10 (Kona)","|Complete|","","`#103328 <https://github.com/llvm/llvm-project/issues/103328>`__","" +"`LWG2477 <https://wg21.link/LWG2477>`__","Inconsistency of wordings in ``std::vector::erase()``\ and ``std::deque::erase()``\ ","2015-10 (Kona)","|Complete|","","`#103329 <https://github.com/llvm/llvm-project/issues/103329>`__","" +"`LWG2483 <https://wg21.link/LWG2483>`__","``throw_with_nested()``\ should use ``is_final``\ ","2015-10 (Kona)","|Complete|","","`#103330 <https://github.com/llvm/llvm-project/issues/103330>`__","" +"`LWG2484 <https://wg21.link/LWG2484>`__","``rethrow_if_nested()``\ is doubly unimplementable","2015-10 (Kona)","|Complete|","","`#103331 <https://github.com/llvm/llvm-project/issues/103331>`__","" +"`LWG2485 <https://wg21.link/LWG2485>`__","``get()``\ should be overloaded for ``const tuple&&``\ ","2015-10 (Kona)","|Complete|","","`#103332 <https://github.com/llvm/llvm-project/issues/103332>`__","" +"`LWG2486 <https://wg21.link/LWG2486>`__","``mem_fn()``\ should be required to use perfect forwarding","2015-10 (Kona)","|Complete|","","`#103333 <https://github.com/llvm/llvm-project/issues/103333>`__","" +"`LWG2487 <https://wg21.link/LWG2487>`__","``bind()``\ should be ``const``\ -overloaded, not *cv*-overloaded","2015-10 (Kona)","|Complete|","","`#103334 <https://github.com/llvm/llvm-project/issues/103334>`__","" +"`LWG2489 <https://wg21.link/LWG2489>`__","``mem_fn()``\ should be ``noexcept``\ ","2015-10 (Kona)","|Complete|","","`#103335 <https://github.com/llvm/llvm-project/issues/103335>`__","" +"`LWG2492 <https://wg21.link/LWG2492>`__","Clarify requirements for ``comp``\ ","2015-10 (Kona)","|Complete|","","`#103336 <https://github.com/llvm/llvm-project/issues/103336>`__","" +"`LWG2495 <https://wg21.link/LWG2495>`__","There is no such thing as an Exception Safety element","2015-10 (Kona)","|Complete|","","`#103337 <https://github.com/llvm/llvm-project/issues/103337>`__","" "","","","","","" -"`LWG2192 <https://wg21.link/LWG2192>`__","Validity and return type of ``std::abs(0u)``\ is unclear","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2276 <https://wg21.link/LWG2276>`__","Missing requirement on ``std::promise::set_exception``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2296 <https://wg21.link/LWG2296>`__","``std::addressof``\ should be ``constexpr``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2450 <https://wg21.link/LWG2450>`__","``(greater|less|greater_equal|less_equal)<void>``\ do not yield a total order for pointers","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2520 <https://wg21.link/LWG2520>`__","N4089 broke initializing ``unique_ptr<T[]>``\ from a ``nullptr``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2522 <https://wg21.link/LWG2522>`__","[fund.ts.v2] Contradiction in ``set_default_resource``\ specification","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2523 <https://wg21.link/LWG2523>`__","``std::promise``\ synopsis shows two ``set_value_at_thread_exit()``\ 's for no apparent reason","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2537 <https://wg21.link/LWG2537>`__","Constructors for ``priority_queue``\ taking allocators should call ``make_heap``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2539 <https://wg21.link/LWG2539>`__","[fund.ts.v2] ``invocation_trait``\ definition definition doesn't work for surrogate call functions","2016-02 (Jacksonville)","","","" -"`LWG2545 <https://wg21.link/LWG2545>`__","Simplify wording for ``bind``\ without explicitly specified return type","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2557 <https://wg21.link/LWG2557>`__","Logical operator traits are broken in the zero-argument case","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2558 <https://wg21.link/LWG2558>`__","[fund.ts.v2] Logical operator traits are broken in the zero-argument case","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2559 <https://wg21.link/LWG2559>`__","Error in LWG 2234's resolution","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2560 <https://wg21.link/LWG2560>`__","``is_constructible``\ underspecified when applied to a function type","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2565 <https://wg21.link/LWG2565>`__","``std::function``\ 's move constructor should guarantee nothrow for ``reference_wrapper``\ s and function pointers","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2566 <https://wg21.link/LWG2566>`__","Requirements on the first template parameter of container adaptors","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2571 <https://wg21.link/LWG2571>`__","|sect|\ [map.modifiers]/2 imposes nonsensical requirement on ``insert(InputIterator, InputIterator)``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2572 <https://wg21.link/LWG2572>`__","The remarks for ``shared_ptr::operator*``\ should apply to *cv*-qualified ``void``\ as well","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2574 <https://wg21.link/LWG2574>`__","[fund.ts.v2] ``std::experimental::function::operator=(F&&)``\ should be constrained","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2575 <https://wg21.link/LWG2575>`__","[fund.ts.v2] ``experimental::function::assign``\ should be removed","2016-02 (Jacksonville)","","","" -"`LWG2576 <https://wg21.link/LWG2576>`__","``istream_iterator``\ and ``ostream_iterator``\ should use ``std::addressof``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2577 <https://wg21.link/LWG2577>`__","``{shared,unique}_lock``\ should use ``std::addressof``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2579 <https://wg21.link/LWG2579>`__","Inconsistency wrt Allocators in ``basic_string``\ assignment vs. ``basic_string::assign``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2581 <https://wg21.link/LWG2581>`__","Specialization of ``<type_traits>``\ variable templates should be prohibited","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2582 <https://wg21.link/LWG2582>`__","|sect|\ [res.on.functions]/2's prohibition against incomplete types shouldn't apply to type traits","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2583 <https://wg21.link/LWG2583>`__","There is no way to supply an allocator for ``basic_string(str, pos)``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2585 <https://wg21.link/LWG2585>`__","``forward_list::resize(size_type, const value_type&)``\ effects incorrect","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2586 <https://wg21.link/LWG2586>`__","Wrong value category used in ``scoped_allocator_adaptor::construct()``\ ","2016-02 (Jacksonville)","|Complete|","","" -"`LWG2590 <https://wg21.link/LWG2590>`__","Aggregate initialization for ``std::array``\ ","2016-02 (Jacksonville)","|Complete|","","" +"`LWG2192 <https://wg21.link/LWG2192>`__","Validity and return type of ``std::abs(0u)``\ is unclear","2016-02 (Jacksonville)","|Complete|","","`#103338 <https://github.com/llvm/llvm-project/issues/103338>`__","" +"`LWG2276 <https://wg21.link/LWG2276>`__","Missing requirement on ``std::promise::set_exception``\ ","2016-02 (Jacksonville)","|Complete|","","`#103339 <https://github.com/llvm/llvm-project/issues/103339>`__","" +"`LWG2296 <https://wg21.link/LWG2296>`__","``std::addressof``\ should be ``constexpr``\ ","2016-02 (Jacksonville)","|Complete|","","`#103340 <https://github.com/llvm/llvm-project/issues/103340>`__","" +"`LWG2450 <https://wg21.link/LWG2450>`__","``(greater|less|greater_equal|less_equal)<void>``\ do not yield a total order for pointers","2016-02 (Jacksonville)","|Complete|","","`#103341 <https://github.com/llvm/llvm-project/issues/103341>`__","" +"`LWG2520 <https://wg21.link/LWG2520>`__","N4089 broke initializing ``unique_ptr<T[]>``\ from a ``nullptr``\ ","2016-02 (Jacksonville)","|Complete|","","`#103342 <https://github.com/llvm/llvm-project/issues/103342>`__","" +"`LWG2522 <https://wg21.link/LWG2522>`__","[fund.ts.v2] Contradiction in ``set_default_resource``\ specification","2016-02 (Jacksonville)","|Complete|","","`#103344 <https://github.com/llvm/llvm-project/issues/103344>`__","" +"`LWG2523 <https://wg21.link/LWG2523>`__","``std::promise``\ synopsis shows two ``set_value_at_thread_exit()``\ 's for no apparent reason","2016-02 (Jacksonville)","|Complete|","","`#103345 <https://github.com/llvm/llvm-project/issues/103345>`__","" +"`LWG2537 <https://wg21.link/LWG2537>`__","Constructors for ``priority_queue``\ taking allocators should call ``make_heap``\ ","2016-02 (Jacksonville)","|Complete|","","`#103346 <https://github.com/llvm/llvm-project/issues/103346>`__","" +"`LWG2539 <https://wg21.link/LWG2539>`__","[fund.ts.v2] ``invocation_trait``\ definition definition doesn't work for surrogate call functions","2016-02 (Jacksonville)","","","`#99954 <https://github.com/llvm/llvm-project/issues/99954>`__","" +"`LWG2545 <https://wg21.link/LWG2545>`__","Simplify wording for ``bind``\ without explicitly specified return type","2016-02 (Jacksonville)","|Complete|","","`#103347 <https://github.com/llvm/llvm-project/issues/103347>`__","" +"`LWG2557 <https://wg21.link/LWG2557>`__","Logical operator traits are broken in the zero-argument case","2016-02 (Jacksonville)","|Complete|","","`#103348 <https://github.com/llvm/llvm-project/issues/103348>`__","" +"`LWG2558 <https://wg21.link/LWG2558>`__","[fund.ts.v2] Logical operator traits are broken in the zero-argument case","2016-02 (Jacksonville)","|Complete|","","`#103349 <https://github.com/llvm/llvm-project/issues/103349>`__","" +"`LWG2559 <https://wg21.link/LWG2559>`__","Error in LWG 2234's resolution","2016-02 (Jacksonville)","|Complete|","","`#103350 <https://github.com/llvm/llvm-project/issues/103350>`__","" +"`LWG2560 <https://wg21.link/LWG2560>`__","``is_constructible``\ underspecified when applied to a function type","2016-02 (Jacksonville)","|Complete|","","`#103351 <https://github.com/llvm/llvm-project/issues/103351>`__","" +"`LWG2565 <https://wg21.link/LWG2565>`__","``std::function``\ 's move constructor should guarantee nothrow for ``reference_wrapper``\ s and function pointers","2016-02 (Jacksonville)","|Complete|","","`#103352 <https://github.com/llvm/llvm-project/issues/103352>`__","" +"`LWG2566 <https://wg21.link/LWG2566>`__","Requirements on the first template parameter of container adaptors","2016-02 (Jacksonville)","|Complete|","","`#103353 <https://github.com/llvm/llvm-project/issues/103353>`__","" +"`LWG2571 <https://wg21.link/LWG2571>`__","|sect|\ [map.modifiers]/2 imposes nonsensical requirement on ``insert(InputIterator, InputIterator)``\ ","2016-02 (Jacksonville)","|Complete|","","`#103354 <https://github.com/llvm/llvm-project/issues/103354>`__","" +"`LWG2572 <https://wg21.link/LWG2572>`__","The remarks for ``shared_ptr::operator*``\ should apply to *cv*-qualified ``void``\ as well","2016-02 (Jacksonville)","|Complete|","","`#103355 <https://github.com/llvm/llvm-project/issues/103355>`__","" +"`LWG2574 <https://wg21.link/LWG2574>`__","[fund.ts.v2] ``std::experimental::function::operator=(F&&)``\ should be constrained","2016-02 (Jacksonville)","|Complete|","","`#103356 <https://github.com/llvm/llvm-project/issues/103356>`__","" +"`LWG2575 <https://wg21.link/LWG2575>`__","[fund.ts.v2] ``experimental::function::assign``\ should be removed","2016-02 (Jacksonville)","","","`#99959 <https://github.com/llvm/llvm-project/issues/99959>`__","" +"`LWG2576 <https://wg21.link/LWG2576>`__","``istream_iterator``\ and ``ostream_iterator``\ should use ``std::addressof``\ ","2016-02 (Jacksonville)","|Complete|","","`#103357 <https://github.com/llvm/llvm-project/issues/103357>`__","" +"`LWG2577 <https://wg21.link/LWG2577>`__","``{shared,unique}_lock``\ should use ``std::addressof``\ ","2016-02 (Jacksonville)","|Complete|","","`#103358 <https://github.com/llvm/llvm-project/issues/103358>`__","" +"`LWG2579 <https://wg21.link/LWG2579>`__","Inconsistency wrt Allocators in ``basic_string``\ assignment vs. ``basic_string::assign``\ ","2016-02 (Jacksonville)","|Complete|","","`#103359 <https://github.com/llvm/llvm-project/issues/103359>`__","" +"`LWG2581 <https://wg21.link/LWG2581>`__","Specialization of ``<type_traits>``\ variable templates should be prohibited","2016-02 (Jacksonville)","|Complete|","","`#103360 <https://github.com/llvm/llvm-project/issues/103360>`__","" +"`LWG2582 <https://wg21.link/LWG2582>`__","|sect|\ [res.on.functions]/2's prohibition against incomplete types shouldn't apply to type traits","2016-02 (Jacksonville)","|Complete|","","`#103361 <https://github.com/llvm/llvm-project/issues/103361>`__","" +"`LWG2583 <https://wg21.link/LWG2583>`__","There is no way to supply an allocator for ``basic_string(str, pos)``\ ","2016-02 (Jacksonville)","|Complete|","","`#103362 <https://github.com/llvm/llvm-project/issues/103362>`__","" +"`LWG2585 <https://wg21.link/LWG2585>`__","``forward_list::resize(size_type, const value_type&)``\ effects incorrect","2016-02 (Jacksonville)","|Complete|","","`#103363 <https://github.com/llvm/llvm-project/issues/103363>`__","" +"`LWG2586 <https://wg21.link/LWG2586>`__","Wrong value category used in ``scoped_allocator_adaptor::construct()``\ ","2016-02 (Jacksonville)","|Complete|","","`#103364 <https://github.com/llvm/llvm-project/issues/103364>`__","" +"`LWG2590 <https://wg21.link/LWG2590>`__","Aggregate initialization for ``std::array``\ ","2016-02 (Jacksonville)","|Complete|","","`#103365 <https://github.com/llvm/llvm-project/issues/103365>`__","" "","","","","","" -"`LWG2181 <https://wg21.link/LWG2181>`__","Exceptions from seed sequence operations","2016-06 (Oulu)","|Complete|","","" -"`LWG2309 <https://wg21.link/LWG2309>`__","mutex::lock() should not throw device_or_resource_busy","2016-06 (Oulu)","|Complete|","","" -"`LWG2310 <https://wg21.link/LWG2310>`__","Public exposition only member in std::array","2016-06 (Oulu)","|Complete|","","" -"`LWG2312 <https://wg21.link/LWG2312>`__","tuple's constructor constraints need to be phrased more precisely","2016-06 (Oulu)","|Complete|","","" -"`LWG2328 <https://wg21.link/LWG2328>`__","Rvalue stream extraction should use perfect forwarding","2016-06 (Oulu)","|Complete|","","" -"`LWG2393 <https://wg21.link/LWG2393>`__","std::function's Callable definition is broken","2016-06 (Oulu)","|Complete|","","" -"`LWG2422 <https://wg21.link/LWG2422>`__","``std::numeric_limits<T>::is_modulo``\ description: ""most machines"" errata","2016-06 (Oulu)","|Complete|","","" -"`LWG2426 <https://wg21.link/LWG2426>`__","Issue about compare_exchange","2016-06 (Oulu)","|Complete|","","" -"`LWG2436 <https://wg21.link/LWG2436>`__","Comparators for associative containers should always be CopyConstructible","2016-06 (Oulu)","|Complete|","","" -"`LWG2441 <https://wg21.link/LWG2441>`__","Exact-width atomic typedefs should be provided","2016-06 (Oulu)","|Complete|","","" -"`LWG2451 <https://wg21.link/LWG2451>`__","[fund.ts.v2] optional should 'forward' T's implicit conversions","2016-06 (Oulu)","|Nothing To Do|","","" -"`LWG2509 <https://wg21.link/LWG2509>`__","[fund.ts.v2] any_cast doesn't work with rvalue reference targets and cannot move with a value target","2016-06 (Oulu)","|Complete|","","" -"`LWG2516 <https://wg21.link/LWG2516>`__","[fund.ts.v2] Public ""exposition only"" members in observer_ptr","2016-06 (Oulu)","|Complete|","18","" -"`LWG2542 <https://wg21.link/LWG2542>`__","Missing const requirements for associative containers","2016-06 (Oulu)","","","" -"`LWG2549 <https://wg21.link/LWG2549>`__","Tuple EXPLICIT constructor templates that take tuple parameters end up taking references to temporaries and will create dangling references","2016-06 (Oulu)","|Complete|","","" -"`LWG2550 <https://wg21.link/LWG2550>`__","Wording of unordered container's clear() method complexity","2016-06 (Oulu)","|Complete|","","" -"`LWG2551 <https://wg21.link/LWG2551>`__","[fund.ts.v2] ""Exception safety"" cleanup in library fundamentals required","2016-06 (Oulu)","|Complete|","","" -"`LWG2555 <https://wg21.link/LWG2555>`__","[fund.ts.v2] No handling for over-aligned types in optional","2016-06 (Oulu)","|Complete|","","" -"`LWG2573 <https://wg21.link/LWG2573>`__","[fund.ts.v2] std::hash<std::experimental::shared_ptr> does not work for arrays","2016-06 (Oulu)","","","" -"`LWG2596 <https://wg21.link/LWG2596>`__","vector::data() should use addressof","2016-06 (Oulu)","|Complete|","","" -"`LWG2667 <https://wg21.link/LWG2667>`__","path::root_directory() description is confusing","2016-06 (Oulu)","|Complete|","","" -"`LWG2669 <https://wg21.link/LWG2669>`__","recursive_directory_iterator effects refers to non-existent functions","2016-06 (Oulu)","|Complete|","","" -"`LWG2670 <https://wg21.link/LWG2670>`__","system_complete refers to undefined variable 'base'","2016-06 (Oulu)","|Complete|","","" -"`LWG2671 <https://wg21.link/LWG2671>`__","Errors in Copy","2016-06 (Oulu)","|Complete|","","" -"`LWG2673 <https://wg21.link/LWG2673>`__","status() effects cannot be implemented as specified","2016-06 (Oulu)","|Complete|","","" -"`LWG2674 <https://wg21.link/LWG2674>`__","Bidirectional iterator requirement on path::iterator is very expensive","2016-06 (Oulu)","|Complete|","","" -"`LWG2683 <https://wg21.link/LWG2683>`__","filesystem::copy() says ""no effects""","2016-06 (Oulu)","|Complete|","","" -"`LWG2684 <https://wg21.link/LWG2684>`__","priority_queue lacking comparator typedef","2016-06 (Oulu)","|Complete|","","" -"`LWG2685 <https://wg21.link/LWG2685>`__","shared_ptr deleters must not throw on move construction","2016-06 (Oulu)","|Complete|","","" -"`LWG2687 <https://wg21.link/LWG2687>`__","{inclusive,exclusive}_scan misspecified","2016-06 (Oulu)","|Complete|","","" -"`LWG2688 <https://wg21.link/LWG2688>`__","clamp misses preconditions and has extraneous condition on result","2016-06 (Oulu)","|Complete|","","" -"`LWG2689 <https://wg21.link/LWG2689>`__","Parallel versions of std::copy and std::move shouldn't be in order","2016-06 (Oulu)","|Nothing To Do|","","" -"`LWG2698 <https://wg21.link/LWG2698>`__","Effect of assign() on iterators/pointers/references","2016-06 (Oulu)","|Complete|","","" -"`LWG2704 <https://wg21.link/LWG2704>`__","recursive_directory_iterator's members should require '``*this`` is dereferenceable'","2016-06 (Oulu)","|Complete|","","" -"`LWG2706 <https://wg21.link/LWG2706>`__","Error reporting for recursive_directory_iterator::pop() is under-specified","2016-06 (Oulu)","|Complete|","","" -"`LWG2707 <https://wg21.link/LWG2707>`__","path construction and assignment should have ""string_type&&"" overloads","2016-06 (Oulu)","|Complete|","","" -"`LWG2709 <https://wg21.link/LWG2709>`__","offsetof is unnecessarily imprecise","2016-06 (Oulu)","|Nothing To Do|","","" -"`LWG2710 <https://wg21.link/LWG2710>`__","""Effects: Equivalent to ..."" doesn't count ""Synchronization:"" as determined semantics","2016-06 (Oulu)","|Complete|","","" -"`LWG2711 <https://wg21.link/LWG2711>`__","path is convertible from approximately everything under the sun","2016-06 (Oulu)","|Complete|","","" -"`LWG2716 <https://wg21.link/LWG2716>`__","Specification of shuffle and sample disallows lvalue URNGs","2016-06 (Oulu)","|Complete|","","" -"`LWG2718 <https://wg21.link/LWG2718>`__","Parallelism bug in [algorithms.parallel.exec] p2","2016-06 (Oulu)","","","" -"`LWG2719 <https://wg21.link/LWG2719>`__","permissions function should not be noexcept due to narrow contract","2016-06 (Oulu)","|Complete|","","" -"`LWG2720 <https://wg21.link/LWG2720>`__","permissions function incorrectly specified for symlinks","2016-06 (Oulu)","|Complete|","","" -"`LWG2721 <https://wg21.link/LWG2721>`__","remove_all has incorrect post conditions","2016-06 (Oulu)","|Complete|","","" -"`LWG2723 <https://wg21.link/LWG2723>`__","Do directory_iterator and recursive_directory_iterator become the end iterator upon error?","2016-06 (Oulu)","|Complete|","","" -"`LWG2724 <https://wg21.link/LWG2724>`__","The protected virtual member functions of memory_resource should be private","2016-06 (Oulu)","|Complete|","16","" -"`LWG2725 <https://wg21.link/LWG2725>`__","filesystem::exists(const path&, error_code&) error reporting","2016-06 (Oulu)","|Complete|","","" -"`LWG2726 <https://wg21.link/LWG2726>`__","``[recursive_]directory_iterator::increment(error_code&)`` is underspecified","2016-06 (Oulu)","|Complete|","","" -"`LWG2727 <https://wg21.link/LWG2727>`__","Parallel algorithms with constexpr specifier","2016-06 (Oulu)","","","" -"`LWG2728 <https://wg21.link/LWG2728>`__","status(p).permissions() and symlink_status(p).permissions() are not specified","2016-06 (Oulu)","|Complete|","","" +"`LWG2181 <https://wg21.link/LWG2181>`__","Exceptions from seed sequence operations","2016-06 (Oulu)","|Complete|","","`#103367 <https://github.com/llvm/llvm-project/issues/103367>`__","" +"`LWG2309 <https://wg21.link/LWG2309>`__","mutex::lock() should not throw device_or_resource_busy","2016-06 (Oulu)","|Complete|","","`#103368 <https://github.com/llvm/llvm-project/issues/103368>`__","" +"`LWG2310 <https://wg21.link/LWG2310>`__","Public exposition only member in std::array","2016-06 (Oulu)","|Complete|","","`#103369 <https://github.com/llvm/llvm-project/issues/103369>`__","" +"`LWG2312 <https://wg21.link/LWG2312>`__","tuple's constructor constraints need to be phrased more precisely","2016-06 (Oulu)","|Complete|","","`#103370 <https://github.com/llvm/llvm-project/issues/103370>`__","" +"`LWG2328 <https://wg21.link/LWG2328>`__","Rvalue stream extraction should use perfect forwarding","2016-06 (Oulu)","|Complete|","","`#103372 <https://github.com/llvm/llvm-project/issues/103372>`__","" +"`LWG2393 <https://wg21.link/LWG2393>`__","std::function's Callable definition is broken","2016-06 (Oulu)","|Complete|","","`#103373 <https://github.com/llvm/llvm-project/issues/103373>`__","" +"`LWG2422 <https://wg21.link/LWG2422>`__","``std::numeric_limits<T>::is_modulo``\ description: ""most machines"" errata","2016-06 (Oulu)","|Complete|","","`#103374 <https://github.com/llvm/llvm-project/issues/103374>`__","" +"`LWG2426 <https://wg21.link/LWG2426>`__","Issue about compare_exchange","2016-06 (Oulu)","|Complete|","","`#103375 <https://github.com/llvm/llvm-project/issues/103375>`__","" +"`LWG2436 <https://wg21.link/LWG2436>`__","Comparators for associative containers should always be CopyConstructible","2016-06 (Oulu)","|Complete|","","`#103376 <https://github.com/llvm/llvm-project/issues/103376>`__","" +"`LWG2441 <https://wg21.link/LWG2441>`__","Exact-width atomic typedefs should be provided","2016-06 (Oulu)","|Complete|","","`#103378 <https://github.com/llvm/llvm-project/issues/103378>`__","" +"`LWG2451 <https://wg21.link/LWG2451>`__","[fund.ts.v2] optional should 'forward' T's implicit conversions","2016-06 (Oulu)","|Nothing To Do|","","`#103379 <https://github.com/llvm/llvm-project/issues/103379>`__","" +"`LWG2509 <https://wg21.link/LWG2509>`__","[fund.ts.v2] any_cast doesn't work with rvalue reference targets and cannot move with a value target","2016-06 (Oulu)","|Complete|","","`#103380 <https://github.com/llvm/llvm-project/issues/103380>`__","" +"`LWG2516 <https://wg21.link/LWG2516>`__","[fund.ts.v2] Public ""exposition only"" members in observer_ptr","2016-06 (Oulu)","|Complete|","18","`#103381 <https://github.com/llvm/llvm-project/issues/103381>`__","" +"`LWG2542 <https://wg21.link/LWG2542>`__","Missing const requirements for associative containers","2016-06 (Oulu)","","","`#99960 <https://github.com/llvm/llvm-project/issues/99960>`__","" +"`LWG2549 <https://wg21.link/LWG2549>`__","Tuple EXPLICIT constructor templates that take tuple parameters end up taking references to temporaries and will create dangling references","2016-06 (Oulu)","|Complete|","","`#103382 <https://github.com/llvm/llvm-project/issues/103382>`__","" +"`LWG2550 <https://wg21.link/LWG2550>`__","Wording of unordered container's clear() method complexity","2016-06 (Oulu)","|Complete|","","`#103383 <https://github.com/llvm/llvm-project/issues/103383>`__","" +"`LWG2551 <https://wg21.link/LWG2551>`__","[fund.ts.v2] ""Exception safety"" cleanup in library fundamentals required","2016-06 (Oulu)","|Complete|","","`#103384 <https://github.com/llvm/llvm-project/issues/103384>`__","" +"`LWG2555 <https://wg21.link/LWG2555>`__","[fund.ts.v2] No handling for over-aligned types in optional","2016-06 (Oulu)","|Complete|","","`#103385 <https://github.com/llvm/llvm-project/issues/103385>`__","" +"`LWG2573 <https://wg21.link/LWG2573>`__","[fund.ts.v2] std::hash<std::experimental::shared_ptr> does not work for arrays","2016-06 (Oulu)","","","`#99961 <https://github.com/llvm/llvm-project/issues/99961>`__","" +"`LWG2596 <https://wg21.link/LWG2596>`__","vector::data() should use addressof","2016-06 (Oulu)","|Complete|","","`#103386 <https://github.com/llvm/llvm-project/issues/103386>`__","" +"`LWG2667 <https://wg21.link/LWG2667>`__","path::root_directory() description is confusing","2016-06 (Oulu)","|Complete|","","`#103387 <https://github.com/llvm/llvm-project/issues/103387>`__","" +"`LWG2669 <https://wg21.link/LWG2669>`__","recursive_directory_iterator effects refers to non-existent functions","2016-06 (Oulu)","|Complete|","","`#103402 <https://github.com/llvm/llvm-project/issues/103402>`__","" +"`LWG2670 <https://wg21.link/LWG2670>`__","system_complete refers to undefined variable 'base'","2016-06 (Oulu)","|Complete|","","`#103404 <https://github.com/llvm/llvm-project/issues/103404>`__","" +"`LWG2671 <https://wg21.link/LWG2671>`__","Errors in Copy","2016-06 (Oulu)","|Complete|","","`#103405 <https://github.com/llvm/llvm-project/issues/103405>`__","" +"`LWG2673 <https://wg21.link/LWG2673>`__","status() effects cannot be implemented as specified","2016-06 (Oulu)","|Complete|","","`#103406 <https://github.com/llvm/llvm-project/issues/103406>`__","" +"`LWG2674 <https://wg21.link/LWG2674>`__","Bidirectional iterator requirement on path::iterator is very expensive","2016-06 (Oulu)","|Complete|","","`#103407 <https://github.com/llvm/llvm-project/issues/103407>`__","" +"`LWG2683 <https://wg21.link/LWG2683>`__","filesystem::copy() says ""no effects""","2016-06 (Oulu)","|Complete|","","`#103408 <https://github.com/llvm/llvm-project/issues/103408>`__","" +"`LWG2684 <https://wg21.link/LWG2684>`__","priority_queue lacking comparator typedef","2016-06 (Oulu)","|Complete|","","`#103412 <https://github.com/llvm/llvm-project/issues/103412>`__","" +"`LWG2685 <https://wg21.link/LWG2685>`__","shared_ptr deleters must not throw on move construction","2016-06 (Oulu)","|Complete|","","`#103413 <https://github.com/llvm/llvm-project/issues/103413>`__","" +"`LWG2687 <https://wg21.link/LWG2687>`__","{inclusive,exclusive}_scan misspecified","2016-06 (Oulu)","|Complete|","","`#99963 <https://github.com/llvm/llvm-project/issues/99963>`__","" +"`LWG2688 <https://wg21.link/LWG2688>`__","clamp misses preconditions and has extraneous condition on result","2016-06 (Oulu)","|Complete|","","`#103414 <https://github.com/llvm/llvm-project/issues/103414>`__","" +"`LWG2689 <https://wg21.link/LWG2689>`__","Parallel versions of std::copy and std::move shouldn't be in order","2016-06 (Oulu)","|Nothing To Do|","","`#103415 <https://github.com/llvm/llvm-project/issues/103415>`__","" +"`LWG2698 <https://wg21.link/LWG2698>`__","Effect of assign() on iterators/pointers/references","2016-06 (Oulu)","|Complete|","","`#103416 <https://github.com/llvm/llvm-project/issues/103416>`__","" +"`LWG2704 <https://wg21.link/LWG2704>`__","recursive_directory_iterator's members should require '``*this`` is dereferenceable'","2016-06 (Oulu)","|Complete|","","`#103417 <https://github.com/llvm/llvm-project/issues/103417>`__","" +"`LWG2706 <https://wg21.link/LWG2706>`__","Error reporting for recursive_directory_iterator::pop() is under-specified","2016-06 (Oulu)","|Complete|","","`#103418 <https://github.com/llvm/llvm-project/issues/103418>`__","" +"`LWG2707 <https://wg21.link/LWG2707>`__","path construction and assignment should have ""string_type&&"" overloads","2016-06 (Oulu)","|Complete|","","`#103419 <https://github.com/llvm/llvm-project/issues/103419>`__","" +"`LWG2709 <https://wg21.link/LWG2709>`__","offsetof is unnecessarily imprecise","2016-06 (Oulu)","|Nothing To Do|","","`#99965 <https://github.com/llvm/llvm-project/issues/99965>`__","" +"`LWG2710 <https://wg21.link/LWG2710>`__","""Effects: Equivalent to ..."" doesn't count ""Synchronization:"" as determined semantics","2016-06 (Oulu)","|Complete|","","`#103420 <https://github.com/llvm/llvm-project/issues/103420>`__","" +"`LWG2711 <https://wg21.link/LWG2711>`__","path is convertible from approximately everything under the sun","2016-06 (Oulu)","|Complete|","","`#103421 <https://github.com/llvm/llvm-project/issues/103421>`__","" +"`LWG2716 <https://wg21.link/LWG2716>`__","Specification of shuffle and sample disallows lvalue URNGs","2016-06 (Oulu)","|Complete|","","`#103422 <https://github.com/llvm/llvm-project/issues/103422>`__","" +"`LWG2718 <https://wg21.link/LWG2718>`__","Parallelism bug in [algorithms.parallel.exec] p2","2016-06 (Oulu)","","","`#99966 <https://github.com/llvm/llvm-project/issues/99966>`__","" +"`LWG2719 <https://wg21.link/LWG2719>`__","permissions function should not be noexcept due to narrow contract","2016-06 (Oulu)","|Complete|","","`#103423 <https://github.com/llvm/llvm-project/issues/103423>`__","" +"`LWG2720 <https://wg21.link/LWG2720>`__","permissions function incorrectly specified for symlinks","2016-06 (Oulu)","|Complete|","","`#103424 <https://github.com/llvm/llvm-project/issues/103424>`__","" +"`LWG2721 <https://wg21.link/LWG2721>`__","remove_all has incorrect post conditions","2016-06 (Oulu)","|Complete|","","`#103425 <https://github.com/llvm/llvm-project/issues/103425>`__","" +"`LWG2723 <https://wg21.link/LWG2723>`__","Do directory_iterator and recursive_directory_iterator become the end iterator upon error?","2016-06 (Oulu)","|Complete|","","`#103426 <https://github.com/llvm/llvm-project/issues/103426>`__","" +"`LWG2724 <https://wg21.link/LWG2724>`__","The protected virtual member functions of memory_resource should be private","2016-06 (Oulu)","|Complete|","16","`#103427 <https://github.com/llvm/llvm-project/issues/103427>`__","" +"`LWG2725 <https://wg21.link/LWG2725>`__","filesystem::exists(const path&, error_code&) error reporting","2016-06 (Oulu)","|Complete|","","`#103428 <https://github.com/llvm/llvm-project/issues/103428>`__","" +"`LWG2726 <https://wg21.link/LWG2726>`__","``[recursive_]directory_iterator::increment(error_code&)`` is underspecified","2016-06 (Oulu)","|Complete|","","`#103429 <https://github.com/llvm/llvm-project/issues/103429>`__","" +"`LWG2727 <https://wg21.link/LWG2727>`__","Parallel algorithms with constexpr specifier","2016-06 (Oulu)","","","`#99968 <https://github.com/llvm/llvm-project/issues/99968>`__","" +"`LWG2728 <https://wg21.link/LWG2728>`__","status(p).permissions() and symlink_status(p).permissions() are not specified","2016-06 (Oulu)","|Complete|","","`#103430 <https://github.com/llvm/llvm-project/issues/103430>`__","" "","","","","","" -"`LWG2062 <https://wg21.link/LWG2062>`__","Effect contradictions w/o no-throw guarantee of std::function swaps","2016-11 (Issaquah)","|Complete|","","" -"`LWG2166 <https://wg21.link/LWG2166>`__","Heap property underspecified?","2016-11 (Issaquah)","","","" -"`LWG2221 <https://wg21.link/LWG2221>`__","No formatted output operator for nullptr","2016-11 (Issaquah)","|Complete|","","" -"`LWG2223 <https://wg21.link/LWG2223>`__","shrink_to_fit effect on iterator validity","2016-11 (Issaquah)","|Complete|","","" -"`LWG2261 <https://wg21.link/LWG2261>`__","Are containers required to use their 'pointer' type internally?","2016-11 (Issaquah)","","","" -"`LWG2394 <https://wg21.link/LWG2394>`__","locale::name specification unclear - what is implementation-defined?","2016-11 (Issaquah)","|Complete|","","" -"`LWG2460 <https://wg21.link/LWG2460>`__","LWG issue 2408 and value categories","2016-11 (Issaquah)","|Complete|","","" -"`LWG2468 <https://wg21.link/LWG2468>`__","Self-move-assignment of library types","2016-11 (Issaquah)","","","" -"`LWG2475 <https://wg21.link/LWG2475>`__","Allow overwriting of std::basic_string terminator with charT() to allow cleaner interoperation with legacy APIs","2016-11 (Issaquah)","|Complete|","","" -"`LWG2503 <https://wg21.link/LWG2503>`__","multiline option should be added to syntax_option_type","2016-11 (Issaquah)","|Complete|","","" -"`LWG2510 <https://wg21.link/LWG2510>`__","Tag types should not be DefaultConstructible","2016-11 (Issaquah)","|Complete|","","" -"`LWG2514 <https://wg21.link/LWG2514>`__","Type traits must not be final","2016-11 (Issaquah)","|Complete|","","" -"`LWG2518 <https://wg21.link/LWG2518>`__","[fund.ts.v2] Non-member swap for propagate_const should call member swap","2016-11 (Issaquah)","|Complete|","","" -"`LWG2519 <https://wg21.link/LWG2519>`__","Iterator operator-= has gratuitous undefined behaviour","2016-11 (Issaquah)","|Complete|","","" -"`LWG2521 <https://wg21.link/LWG2521>`__","[fund.ts.v2] weak_ptr's converting move constructor should be modified as well for array support","2016-11 (Issaquah)","","","" -"`LWG2525 <https://wg21.link/LWG2525>`__","[fund.ts.v2] get_memory_resource should be const and noexcept","2016-11 (Issaquah)","","","" -"`LWG2527 <https://wg21.link/LWG2527>`__","[fund.ts.v2] ALLOCATOR_OF for function::operator= has incorrect default","2016-11 (Issaquah)","","","" -"`LWG2531 <https://wg21.link/LWG2531>`__","future::get should explicitly state that the shared state is released","2016-11 (Issaquah)","|Nothing To Do|","","" -"`LWG2534 <https://wg21.link/LWG2534>`__","Constrain rvalue stream operators","2016-11 (Issaquah)","|Complete|","","" -"`LWG2536 <https://wg21.link/LWG2536>`__","What should <complex.h> do?","2016-11 (Issaquah)","|Complete|","","" -"`LWG2540 <https://wg21.link/LWG2540>`__","unordered_multimap::insert hint iterator","2016-11 (Issaquah)","|Complete|","","" -"`LWG2543 <https://wg21.link/LWG2543>`__","LWG 2148 (hash support for enum types) seems under-specified","2016-11 (Issaquah)","|Complete|","","" -"`LWG2544 <https://wg21.link/LWG2544>`__","``istreambuf_iterator(basic_streambuf<charT, traits>* s)``\ effects unclear when s is 0","2016-11 (Issaquah)","|Complete|","","" -"`LWG2556 <https://wg21.link/LWG2556>`__","Wide contract for future::share()","2016-11 (Issaquah)","|Complete|","","" -"`LWG2562 <https://wg21.link/LWG2562>`__","Consistent total ordering of pointers by comparison functors","2016-11 (Issaquah)","","","" -"`LWG2567 <https://wg21.link/LWG2567>`__","Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits","2016-11 (Issaquah)","|Complete|","","" -"`LWG2568 <https://wg21.link/LWG2568>`__","[fund.ts.v2] Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits","2016-11 (Issaquah)","|Complete|","15","" -"`LWG2569 <https://wg21.link/LWG2569>`__","conjunction and disjunction requirements are too strict","2016-11 (Issaquah)","|Complete|","15","" -"`LWG2570 <https://wg21.link/LWG2570>`__","[fund.ts.v2] conjunction and disjunction requirements are too strict","2016-11 (Issaquah)","","","" -"`LWG2578 <https://wg21.link/LWG2578>`__","Iterator requirements should reference iterator traits","2016-11 (Issaquah)","|Complete|","","" -"`LWG2584 <https://wg21.link/LWG2584>`__","<regex> ECMAScript IdentityEscape is ambiguous","2016-11 (Issaquah)","","","" -"`LWG2587 <https://wg21.link/LWG2587>`__","""Convertible to bool"" requirement in conjunction and disjunction","2016-11 (Issaquah)","|Nothing To Do|","","Resolved by `LWG2567 <https://wg21.link/LWG2567>`__" -"`LWG2588 <https://wg21.link/LWG2588>`__","[fund.ts.v2] ""Convertible to bool"" requirement in conjunction and disjunction","2016-11 (Issaquah)","|Nothing To Do|","","Resolved by `LWG2568 <https://wg21.link/LWG2568>`__" -"`LWG2589 <https://wg21.link/LWG2589>`__","match_results can't satisfy the requirements of a container","2016-11 (Issaquah)","|Complete|","","" -"`LWG2591 <https://wg21.link/LWG2591>`__","std::function's member template target() should not lead to undefined behaviour","2016-11 (Issaquah)","|Complete|","","" -"`LWG2598 <https://wg21.link/LWG2598>`__","addressof works on temporaries","2016-11 (Issaquah)","|Complete|","","" -"`LWG2664 <https://wg21.link/LWG2664>`__","operator/ (and other append) semantics not useful if argument has root","2016-11 (Issaquah)","|Complete|","","" -"`LWG2665 <https://wg21.link/LWG2665>`__","remove_filename() post condition is incorrect","2016-11 (Issaquah)","|Complete|","","" -"`LWG2672 <https://wg21.link/LWG2672>`__","Should ``is_empty``\ use error_code in its specification?","2016-11 (Issaquah)","|Complete|","","" -"`LWG2678 <https://wg21.link/LWG2678>`__","std::filesystem enum classes overspecified","2016-11 (Issaquah)","|Complete|","","" -"`LWG2679 <https://wg21.link/LWG2679>`__","Inconsistent Use of Effects and Equivalent To","2016-11 (Issaquah)","|Complete|","","" -"`LWG2680 <https://wg21.link/LWG2680>`__","Add ""Equivalent to"" to filesystem","2016-11 (Issaquah)","|Complete|","","" -"`LWG2681 <https://wg21.link/LWG2681>`__","filesystem::copy() cannot copy symlinks","2016-11 (Issaquah)","|Complete|","","" -"`LWG2686 <https://wg21.link/LWG2686>`__","Why is std::hash specialized for error_code, but not error_condition?","2016-11 (Issaquah)","|Complete|","","" -"`LWG2694 <https://wg21.link/LWG2694>`__","Application of LWG 436 accidentally deleted definition of ""facet""","2016-11 (Issaquah)","|Complete|","","" -"`LWG2696 <https://wg21.link/LWG2696>`__","Interaction between make_shared and enable_shared_from_this is underspecified","2016-11 (Issaquah)","|Nothing To Do|","","" -"`LWG2699 <https://wg21.link/LWG2699>`__","Missing restriction in [numeric.requirements]","2016-11 (Issaquah)","|Complete|","","" -"`LWG2712 <https://wg21.link/LWG2712>`__","copy_file(from, to, ...) has a number of unspecified error conditions","2016-11 (Issaquah)","|Complete|","","" -"`LWG2722 <https://wg21.link/LWG2722>`__","equivalent incorrectly specifies throws clause","2016-11 (Issaquah)","|Complete|","","" -"`LWG2729 <https://wg21.link/LWG2729>`__","Missing SFINAE on std::pair::operator=","2016-11 (Issaquah)","|Complete|","","" -"`LWG2732 <https://wg21.link/LWG2732>`__","Questionable specification of path::operator/= and path::append","2016-11 (Issaquah)","|Complete|","","" -"`LWG2733 <https://wg21.link/LWG2733>`__","[fund.ts.v2] gcd / lcm and bool","2016-11 (Issaquah)","|Complete|","","" -"`LWG2735 <https://wg21.link/LWG2735>`__","std::abs(short), std::abs(signed char) and others should return int instead of double in order to be compatible with C++98 and C","2016-11 (Issaquah)","|Complete|","","" -"`LWG2736 <https://wg21.link/LWG2736>`__","nullopt_t insufficiently constrained","2016-11 (Issaquah)","|Complete|","","" -"`LWG2738 <https://wg21.link/LWG2738>`__","``is_constructible``\ with void types","2016-11 (Issaquah)","|Complete|","","" -"`LWG2739 <https://wg21.link/LWG2739>`__","Issue with time_point non-member subtraction with an unsigned duration","2016-11 (Issaquah)","|Complete|","","" -"`LWG2740 <https://wg21.link/LWG2740>`__","constexpr optional<T>::operator->","2016-11 (Issaquah)","|Complete|","","" -"`LWG2742 <https://wg21.link/LWG2742>`__","Inconsistent string interface taking string_view","2016-11 (Issaquah)","|Complete|","","" -"`LWG2744 <https://wg21.link/LWG2744>`__","any's in_place constructors","2016-11 (Issaquah)","|Complete|","","" -"`LWG2745 <https://wg21.link/LWG2745>`__","[fund.ts.v2] Implementability of LWG 2451","2016-11 (Issaquah)","|Complete|","","" -"`LWG2747 <https://wg21.link/LWG2747>`__","Possibly redundant std::move in [alg.foreach]","2016-11 (Issaquah)","|Complete|","","" -"`LWG2748 <https://wg21.link/LWG2748>`__","swappable traits for optionals","2016-11 (Issaquah)","|Complete|","","" -"`LWG2749 <https://wg21.link/LWG2749>`__","swappable traits for variants","2016-11 (Issaquah)","|Complete|","","" -"`LWG2750 <https://wg21.link/LWG2750>`__","[fund.ts.v2] LWG 2451 conversion constructor constraint","2016-11 (Issaquah)","|Nothing To Do|","","" -"`LWG2752 <https://wg21.link/LWG2752>`__","""Throws:"" clauses of async and packaged_task are unimplementable","2016-11 (Issaquah)","|Nothing To Do|","","" -"`LWG2755 <https://wg21.link/LWG2755>`__","[string.view.io] uses non-existent basic_string_view::to_string function","2016-11 (Issaquah)","|Complete|","","" -"`LWG2756 <https://wg21.link/LWG2756>`__","C++ WP optional<T> should 'forward' T's implicit conversions","2016-11 (Issaquah)","|Complete|","","" -"`LWG2758 <https://wg21.link/LWG2758>`__","std::string{}.assign(""ABCDE"", 0, 1) is ambiguous","2016-11 (Issaquah)","|Complete|","","" -"`LWG2759 <https://wg21.link/LWG2759>`__","gcd / lcm and bool for the WP","2016-11 (Issaquah)","|Complete|","","" -"`LWG2760 <https://wg21.link/LWG2760>`__","non-const basic_string::data should not invalidate iterators","2016-11 (Issaquah)","|Complete|","","" -"`LWG2765 <https://wg21.link/LWG2765>`__","Did LWG 1123 go too far?","2016-11 (Issaquah)","|Complete|","","" -"`LWG2767 <https://wg21.link/LWG2767>`__","not_fn call_wrapper can form invalid types","2016-11 (Issaquah)","|Complete|","","" -"`LWG2770 <https://wg21.link/LWG2770>`__","``tuple_size<const T>`` specialization is not SFINAE compatible and breaks decomposition declarations","2016-11 (Issaquah)","|Complete|","21","" -"`LWG2771 <https://wg21.link/LWG2771>`__","Broken Effects of some basic_string::compare functions in terms of basic_string_view","2016-11 (Issaquah)","|Complete|","","" -"`LWG2773 <https://wg21.link/LWG2773>`__","Making std::ignore constexpr","2016-11 (Issaquah)","|Complete|","","" -"`LWG2777 <https://wg21.link/LWG2777>`__","basic_string_view::copy should use char_traits::copy","2016-11 (Issaquah)","|Complete|","","" -"`LWG2778 <https://wg21.link/LWG2778>`__","basic_string_view is missing constexpr","2016-11 (Issaquah)","|Complete|","","" +"`LWG2062 <https://wg21.link/LWG2062>`__","Effect contradictions w/o no-throw guarantee of std::function swaps","2016-11 (Issaquah)","|Complete|","","`#103431 <https://github.com/llvm/llvm-project/issues/103431>`__","" +"`LWG2166 <https://wg21.link/LWG2166>`__","Heap property underspecified?","2016-11 (Issaquah)","","","`#99969 <https://github.com/llvm/llvm-project/issues/99969>`__","" +"`LWG2221 <https://wg21.link/LWG2221>`__","No formatted output operator for nullptr","2016-11 (Issaquah)","|Complete|","","`#103432 <https://github.com/llvm/llvm-project/issues/103432>`__","" +"`LWG2223 <https://wg21.link/LWG2223>`__","shrink_to_fit effect on iterator validity","2016-11 (Issaquah)","|Complete|","","`#103433 <https://github.com/llvm/llvm-project/issues/103433>`__","" +"`LWG2261 <https://wg21.link/LWG2261>`__","Are containers required to use their 'pointer' type internally?","2016-11 (Issaquah)","","","`#99970 <https://github.com/llvm/llvm-project/issues/99970>`__","" +"`LWG2394 <https://wg21.link/LWG2394>`__","locale::name specification unclear - what is implementation-defined?","2016-11 (Issaquah)","|Complete|","","`#103434 <https://github.com/llvm/llvm-project/issues/103434>`__","" +"`LWG2460 <https://wg21.link/LWG2460>`__","LWG issue 2408 and value categories","2016-11 (Issaquah)","|Complete|","","`#103435 <https://github.com/llvm/llvm-project/issues/103435>`__","" +"`LWG2468 <https://wg21.link/LWG2468>`__","Self-move-assignment of library types","2016-11 (Issaquah)","","","`#99971 <https://github.com/llvm/llvm-project/issues/99971>`__","" +"`LWG2475 <https://wg21.link/LWG2475>`__","Allow overwriting of std::basic_string terminator with charT() to allow cleaner interoperation with legacy APIs","2016-11 (Issaquah)","|Complete|","","`#103436 <https://github.com/llvm/llvm-project/issues/103436>`__","" +"`LWG2503 <https://wg21.link/LWG2503>`__","multiline option should be added to syntax_option_type","2016-11 (Issaquah)","|Complete|","","`#103437 <https://github.com/llvm/llvm-project/issues/103437>`__","" +"`LWG2510 <https://wg21.link/LWG2510>`__","Tag types should not be DefaultConstructible","2016-11 (Issaquah)","|Complete|","","`#103438 <https://github.com/llvm/llvm-project/issues/103438>`__","" +"`LWG2514 <https://wg21.link/LWG2514>`__","Type traits must not be final","2016-11 (Issaquah)","|Complete|","","`#103439 <https://github.com/llvm/llvm-project/issues/103439>`__","" +"`LWG2518 <https://wg21.link/LWG2518>`__","[fund.ts.v2] Non-member swap for propagate_const should call member swap","2016-11 (Issaquah)","|Complete|","","`#103440 <https://github.com/llvm/llvm-project/issues/103440>`__","" +"`LWG2519 <https://wg21.link/LWG2519>`__","Iterator operator-= has gratuitous undefined behaviour","2016-11 (Issaquah)","|Complete|","","`#103442 <https://github.com/llvm/llvm-project/issues/103442>`__","" +"`LWG2521 <https://wg21.link/LWG2521>`__","[fund.ts.v2] weak_ptr's converting move constructor should be modified as well for array support","2016-11 (Issaquah)","","","`#99972 <https://github.com/llvm/llvm-project/issues/99972>`__","" +"`LWG2525 <https://wg21.link/LWG2525>`__","[fund.ts.v2] get_memory_resource should be const and noexcept","2016-11 (Issaquah)","","","`#99973 <https://github.com/llvm/llvm-project/issues/99973>`__","" +"`LWG2527 <https://wg21.link/LWG2527>`__","[fund.ts.v2] ALLOCATOR_OF for function::operator= has incorrect default","2016-11 (Issaquah)","","","`#99974 <https://github.com/llvm/llvm-project/issues/99974>`__","" +"`LWG2531 <https://wg21.link/LWG2531>`__","future::get should explicitly state that the shared state is released","2016-11 (Issaquah)","|Nothing To Do|","","`#103443 <https://github.com/llvm/llvm-project/issues/103443>`__","" +"`LWG2534 <https://wg21.link/LWG2534>`__","Constrain rvalue stream operators","2016-11 (Issaquah)","|Complete|","","`#103444 <https://github.com/llvm/llvm-project/issues/103444>`__","" +"`LWG2536 <https://wg21.link/LWG2536>`__","What should <complex.h> do?","2016-11 (Issaquah)","|Complete|","","`#103448 <https://github.com/llvm/llvm-project/issues/103448>`__","" +"`LWG2540 <https://wg21.link/LWG2540>`__","unordered_multimap::insert hint iterator","2016-11 (Issaquah)","|Complete|","","`#103449 <https://github.com/llvm/llvm-project/issues/103449>`__","" +"`LWG2543 <https://wg21.link/LWG2543>`__","LWG 2148 (hash support for enum types) seems under-specified","2016-11 (Issaquah)","|Complete|","","`#103450 <https://github.com/llvm/llvm-project/issues/103450>`__","" +"`LWG2544 <https://wg21.link/LWG2544>`__","``istreambuf_iterator(basic_streambuf<charT, traits>* s)``\ effects unclear when s is 0","2016-11 (Issaquah)","|Complete|","","`#103452 <https://github.com/llvm/llvm-project/issues/103452>`__","" +"`LWG2556 <https://wg21.link/LWG2556>`__","Wide contract for future::share()","2016-11 (Issaquah)","|Complete|","","`#103453 <https://github.com/llvm/llvm-project/issues/103453>`__","" +"`LWG2562 <https://wg21.link/LWG2562>`__","Consistent total ordering of pointers by comparison functors","2016-11 (Issaquah)","","","`#99975 <https://github.com/llvm/llvm-project/issues/99975>`__","" +"`LWG2567 <https://wg21.link/LWG2567>`__","Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits","2016-11 (Issaquah)","|Complete|","","`#103454 <https://github.com/llvm/llvm-project/issues/103454>`__","" +"`LWG2568 <https://wg21.link/LWG2568>`__","[fund.ts.v2] Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits","2016-11 (Issaquah)","|Complete|","15","`#103455 <https://github.com/llvm/llvm-project/issues/103455>`__","" +"`LWG2569 <https://wg21.link/LWG2569>`__","conjunction and disjunction requirements are too strict","2016-11 (Issaquah)","|Complete|","15","`#103456 <https://github.com/llvm/llvm-project/issues/103456>`__","" +"`LWG2570 <https://wg21.link/LWG2570>`__","[fund.ts.v2] conjunction and disjunction requirements are too strict","2016-11 (Issaquah)","","","`#99977 <https://github.com/llvm/llvm-project/issues/99977>`__","" +"`LWG2578 <https://wg21.link/LWG2578>`__","Iterator requirements should reference iterator traits","2016-11 (Issaquah)","|Complete|","","`#103457 <https://github.com/llvm/llvm-project/issues/103457>`__","" +"`LWG2584 <https://wg21.link/LWG2584>`__","<regex> ECMAScript IdentityEscape is ambiguous","2016-11 (Issaquah)","","","`#99976 <https://github.com/llvm/llvm-project/issues/99976>`__","" +"`LWG2587 <https://wg21.link/LWG2587>`__","""Convertible to bool"" requirement in conjunction and disjunction","2016-11 (Issaquah)","|Nothing To Do|","","`#103460 <https://github.com/llvm/llvm-project/issues/103460>`__","Resolved by `LWG2567 <https://wg21.link/LWG2567>`__" +"`LWG2588 <https://wg21.link/LWG2588>`__","[fund.ts.v2] ""Convertible to bool"" requirement in conjunction and disjunction","2016-11 (Issaquah)","|Nothing To Do|","","`#103461 <https://github.com/llvm/llvm-project/issues/103461>`__","Resolved by `LWG2568 <https://wg21.link/LWG2568>`__" +"`LWG2589 <https://wg21.link/LWG2589>`__","match_results can't satisfy the requirements of a container","2016-11 (Issaquah)","|Complete|","","`#103462 <https://github.com/llvm/llvm-project/issues/103462>`__","" +"`LWG2591 <https://wg21.link/LWG2591>`__","std::function's member template target() should not lead to undefined behaviour","2016-11 (Issaquah)","|Complete|","","`#103463 <https://github.com/llvm/llvm-project/issues/103463>`__","" +"`LWG2598 <https://wg21.link/LWG2598>`__","addressof works on temporaries","2016-11 (Issaquah)","|Complete|","","`#103464 <https://github.com/llvm/llvm-project/issues/103464>`__","" +"`LWG2664 <https://wg21.link/LWG2664>`__","operator/ (and other append) semantics not useful if argument has root","2016-11 (Issaquah)","|Complete|","","`#103465 <https://github.com/llvm/llvm-project/issues/103465>`__","" +"`LWG2665 <https://wg21.link/LWG2665>`__","remove_filename() post condition is incorrect","2016-11 (Issaquah)","|Complete|","","`#103466 <https://github.com/llvm/llvm-project/issues/103466>`__","" +"`LWG2672 <https://wg21.link/LWG2672>`__","Should ``is_empty``\ use error_code in its specification?","2016-11 (Issaquah)","|Complete|","","`#103467 <https://github.com/llvm/llvm-project/issues/103467>`__","" +"`LWG2678 <https://wg21.link/LWG2678>`__","std::filesystem enum classes overspecified","2016-11 (Issaquah)","|Complete|","","`#103468 <https://github.com/llvm/llvm-project/issues/103468>`__","" +"`LWG2679 <https://wg21.link/LWG2679>`__","Inconsistent Use of Effects and Equivalent To","2016-11 (Issaquah)","|Complete|","","`#103469 <https://github.com/llvm/llvm-project/issues/103469>`__","" +"`LWG2680 <https://wg21.link/LWG2680>`__","Add ""Equivalent to"" to filesystem","2016-11 (Issaquah)","|Complete|","","`#103470 <https://github.com/llvm/llvm-project/issues/103470>`__","" +"`LWG2681 <https://wg21.link/LWG2681>`__","filesystem::copy() cannot copy symlinks","2016-11 (Issaquah)","|Complete|","","`#103472 <https://github.com/llvm/llvm-project/issues/103472>`__","" +"`LWG2686 <https://wg21.link/LWG2686>`__","Why is std::hash specialized for error_code, but not error_condition?","2016-11 (Issaquah)","|Complete|","","`#103505 <https://github.com/llvm/llvm-project/issues/103505>`__","" +"`LWG2694 <https://wg21.link/LWG2694>`__","Application of LWG 436 accidentally deleted definition of ""facet""","2016-11 (Issaquah)","|Complete|","","`#103506 <https://github.com/llvm/llvm-project/issues/103506>`__","" +"`LWG2696 <https://wg21.link/LWG2696>`__","Interaction between make_shared and enable_shared_from_this is underspecified","2016-11 (Issaquah)","|Nothing To Do|","","`#103507 <https://github.com/llvm/llvm-project/issues/103507>`__","" +"`LWG2699 <https://wg21.link/LWG2699>`__","Missing restriction in [numeric.requirements]","2016-11 (Issaquah)","|Complete|","","`#103508 <https://github.com/llvm/llvm-project/issues/103508>`__","" +"`LWG2712 <https://wg21.link/LWG2712>`__","copy_file(from, to, ...) has a number of unspecified error conditions","2016-11 (Issaquah)","|Complete|","","`#103509 <https://github.com/llvm/llvm-project/issues/103509>`__","" +"`LWG2722 <https://wg21.link/LWG2722>`__","equivalent incorrectly specifies throws clause","2016-11 (Issaquah)","|Complete|","","`#103510 <https://github.com/llvm/llvm-project/issues/103510>`__","" +"`LWG2729 <https://wg21.link/LWG2729>`__","Missing SFINAE on std::pair::operator=","2016-11 (Issaquah)","|Complete|","","`#103512 <https://github.com/llvm/llvm-project/issues/103512>`__","" +"`LWG2732 <https://wg21.link/LWG2732>`__","Questionable specification of path::operator/= and path::append","2016-11 (Issaquah)","|Complete|","","`#103513 <https://github.com/llvm/llvm-project/issues/103513>`__","" +"`LWG2733 <https://wg21.link/LWG2733>`__","[fund.ts.v2] gcd / lcm and bool","2016-11 (Issaquah)","|Complete|","","`#103514 <https://github.com/llvm/llvm-project/issues/103514>`__","" +"`LWG2735 <https://wg21.link/LWG2735>`__","std::abs(short), std::abs(signed char) and others should return int instead of double in order to be compatible with C++98 and C","2016-11 (Issaquah)","|Complete|","","`#103515 <https://github.com/llvm/llvm-project/issues/103515>`__","" +"`LWG2736 <https://wg21.link/LWG2736>`__","nullopt_t insufficiently constrained","2016-11 (Issaquah)","|Complete|","","`#103516 <https://github.com/llvm/llvm-project/issues/103516>`__","" +"`LWG2738 <https://wg21.link/LWG2738>`__","``is_constructible``\ with void types","2016-11 (Issaquah)","|Complete|","","`#103517 <https://github.com/llvm/llvm-project/issues/103517>`__","" +"`LWG2739 <https://wg21.link/LWG2739>`__","Issue with time_point non-member subtraction with an unsigned duration","2016-11 (Issaquah)","|Complete|","","`#103518 <https://github.com/llvm/llvm-project/issues/103518>`__","" +"`LWG2740 <https://wg21.link/LWG2740>`__","constexpr optional<T>::operator->","2016-11 (Issaquah)","|Complete|","","`#103520 <https://github.com/llvm/llvm-project/issues/103520>`__","" +"`LWG2742 <https://wg21.link/LWG2742>`__","Inconsistent string interface taking string_view","2016-11 (Issaquah)","|Complete|","","`#103521 <https://github.com/llvm/llvm-project/issues/103521>`__","" +"`LWG2744 <https://wg21.link/LWG2744>`__","any's in_place constructors","2016-11 (Issaquah)","|Complete|","","`#103522 <https://github.com/llvm/llvm-project/issues/103522>`__","" +"`LWG2745 <https://wg21.link/LWG2745>`__","[fund.ts.v2] Implementability of LWG 2451","2016-11 (Issaquah)","|Complete|","","`#103523 <https://github.com/llvm/llvm-project/issues/103523>`__","" +"`LWG2747 <https://wg21.link/LWG2747>`__","Possibly redundant std::move in [alg.foreach]","2016-11 (Issaquah)","|Complete|","","`#103524 <https://github.com/llvm/llvm-project/issues/103524>`__","" +"`LWG2748 <https://wg21.link/LWG2748>`__","swappable traits for optionals","2016-11 (Issaquah)","|Complete|","","`#103525 <https://github.com/llvm/llvm-project/issues/103525>`__","" +"`LWG2749 <https://wg21.link/LWG2749>`__","swappable traits for variants","2016-11 (Issaquah)","|Complete|","","`#103526 <https://github.com/llvm/llvm-project/issues/103526>`__","" +"`LWG2750 <https://wg21.link/LWG2750>`__","[fund.ts.v2] LWG 2451 conversion constructor constraint","2016-11 (Issaquah)","|Nothing To Do|","","`#103527 <https://github.com/llvm/llvm-project/issues/103527>`__","" +"`LWG2752 <https://wg21.link/LWG2752>`__","""Throws:"" clauses of async and packaged_task are unimplementable","2016-11 (Issaquah)","|Nothing To Do|","","`#103528 <https://github.com/llvm/llvm-project/issues/103528>`__","" +"`LWG2755 <https://wg21.link/LWG2755>`__","[string.view.io] uses non-existent basic_string_view::to_string function","2016-11 (Issaquah)","|Complete|","","`#103531 <https://github.com/llvm/llvm-project/issues/103531>`__","" +"`LWG2756 <https://wg21.link/LWG2756>`__","C++ WP optional<T> should 'forward' T's implicit conversions","2016-11 (Issaquah)","|Complete|","","`#103532 <https://github.com/llvm/llvm-project/issues/103532>`__","" +"`LWG2758 <https://wg21.link/LWG2758>`__","std::string{}.assign(""ABCDE"", 0, 1) is ambiguous","2016-11 (Issaquah)","|Complete|","","`#103533 <https://github.com/llvm/llvm-project/issues/103533>`__","" +"`LWG2759 <https://wg21.link/LWG2759>`__","gcd / lcm and bool for the WP","2016-11 (Issaquah)","|Complete|","","`#103534 <https://github.com/llvm/llvm-project/issues/103534>`__","" +"`LWG2760 <https://wg21.link/LWG2760>`__","non-const basic_string::data should not invalidate iterators","2016-11 (Issaquah)","|Complete|","","`#103535 <https://github.com/llvm/llvm-project/issues/103535>`__","" +"`LWG2765 <https://wg21.link/LWG2765>`__","Did LWG 1123 go too far?","2016-11 (Issaquah)","|Complete|","","`#103536 <https://github.com/llvm/llvm-project/issues/103536>`__","" +"`LWG2767 <https://wg21.link/LWG2767>`__","not_fn call_wrapper can form invalid types","2016-11 (Issaquah)","|Complete|","","`#103537 <https://github.com/llvm/llvm-project/issues/103537>`__","" +"`LWG2770 <https://wg21.link/LWG2770>`__","``tuple_size<const T>`` specialization is not SFINAE compatible and breaks decomposition declarations","2016-11 (Issaquah)","|Complete|","21","`#148254 <https://github.com/llvm/llvm-project/issues/148254>`__","" +"`LWG2771 <https://wg21.link/LWG2771>`__","Broken Effects of some basic_string::compare functions in terms of basic_string_view","2016-11 (Issaquah)","|Complete|","","`#103539 <https://github.com/llvm/llvm-project/issues/103539>`__","" +"`LWG2773 <https://wg21.link/LWG2773>`__","Making std::ignore constexpr","2016-11 (Issaquah)","|Complete|","","`#103541 <https://github.com/llvm/llvm-project/issues/103541>`__","" +"`LWG2777 <https://wg21.link/LWG2777>`__","basic_string_view::copy should use char_traits::copy","2016-11 (Issaquah)","|Complete|","","`#103542 <https://github.com/llvm/llvm-project/issues/103542>`__","" +"`LWG2778 <https://wg21.link/LWG2778>`__","basic_string_view is missing constexpr","2016-11 (Issaquah)","|Complete|","","`#103543 <https://github.com/llvm/llvm-project/issues/103543>`__","" "","","","","","" -"`LWG2260 <https://wg21.link/LWG2260>`__","Missing requirement for Allocator::pointer","2017-02 (Kona)","|Complete|","","" -"`LWG2676 <https://wg21.link/LWG2676>`__","Provide filesystem::path overloads for File-based streams","2017-02 (Kona)","|Complete|","","" -"`LWG2768 <https://wg21.link/LWG2768>`__","any_cast and move semantics","2017-02 (Kona)","|Complete|","","" -"`LWG2769 <https://wg21.link/LWG2769>`__","Redundant const in the return type of any_cast(const any&)","2017-02 (Kona)","|Complete|","","" -"`LWG2781 <https://wg21.link/LWG2781>`__","Contradictory requirements for std::function and std::reference_wrapper","2017-02 (Kona)","|Complete|","","" -"`LWG2782 <https://wg21.link/LWG2782>`__","scoped_allocator_adaptor constructors must be constrained","2017-02 (Kona)","|Complete|","","" -"`LWG2784 <https://wg21.link/LWG2784>`__","Resolution to LWG 2484 is missing ""otherwise, no effects"" and is hard to parse","2017-02 (Kona)","|Complete|","","" -"`LWG2785 <https://wg21.link/LWG2785>`__","quoted should work with basic_string_view","2017-02 (Kona)","|Complete|","","" -"`LWG2786 <https://wg21.link/LWG2786>`__","Annex C should mention shared_ptr changes for array support","2017-02 (Kona)","|Complete|","","" -"`LWG2787 <https://wg21.link/LWG2787>`__","|sect|\ [file_status.cons] doesn't match class definition","2017-02 (Kona)","|Complete|","","" -"`LWG2788 <https://wg21.link/LWG2788>`__","basic_string range mutators unintentionally require a default constructible allocator","2017-02 (Kona)","|Complete|","","" -"`LWG2789 <https://wg21.link/LWG2789>`__","Equivalence of contained objects","2017-02 (Kona)","|Complete|","","" -"`LWG2790 <https://wg21.link/LWG2790>`__","Missing specification of istreambuf_iterator::operator->","2017-02 (Kona)","|Complete|","","" -"`LWG2794 <https://wg21.link/LWG2794>`__","Missing requirements for allocator pointers","2017-02 (Kona)","|Nothing To Do|","","" -"`LWG2795 <https://wg21.link/LWG2795>`__","|sect|\ [global.functions] provides incorrect example of ADL use","2017-02 (Kona)","|Complete|","","" -"`LWG2796 <https://wg21.link/LWG2796>`__","tuple should be a literal type","2017-02 (Kona)","|Complete|","","" -"`LWG2801 <https://wg21.link/LWG2801>`__","Default-constructibility of unique_ptr","2017-02 (Kona)","|Complete|","","" -"`LWG2802 <https://wg21.link/LWG2802>`__","shared_ptr constructor requirements for a deleter","2017-02 (Kona)","|Complete|","","" -"`LWG2804 <https://wg21.link/LWG2804>`__","Unconditional constexpr default constructor for istream_iterator","2017-02 (Kona)","|Complete|","","" -"`LWG2806 <https://wg21.link/LWG2806>`__","Base class of bad_optional_access","2017-02 (Kona)","|Complete|","","" -"`LWG2807 <https://wg21.link/LWG2807>`__","std::invoke should use ``std::is_nothrow_callable``\ ","2017-02 (Kona)","|Complete|","","" -"`LWG2812 <https://wg21.link/LWG2812>`__","Range access is available with <string_view>","2017-02 (Kona)","|Complete|","","" -"`LWG2824 <https://wg21.link/LWG2824>`__","list::sort should say that the order of elements is unspecified if an exception is thrown","2017-02 (Kona)","|Complete|","","" -"`LWG2826 <https://wg21.link/LWG2826>`__","string_view iterators use old wording","2017-02 (Kona)","|Complete|","","" -"`LWG2834 <https://wg21.link/LWG2834>`__","Resolution LWG 2223 is missing wording about end iterators","2017-02 (Kona)","|Complete|","","" -"`LWG2835 <https://wg21.link/LWG2835>`__","LWG 2536 seems to misspecify <tgmath.h>","2017-02 (Kona)","|Complete|","","" -"`LWG2837 <https://wg21.link/LWG2837>`__","gcd and lcm should support a wider range of input values","2017-02 (Kona)","|Complete|","","" -"`LWG2838 <https://wg21.link/LWG2838>`__","is_literal_type specification needs a little cleanup","2017-02 (Kona)","|Complete|","","" -"`LWG2842 <https://wg21.link/LWG2842>`__","in_place_t check for optional::optional(U&&) should decay U","2017-02 (Kona)","|Complete|","","" -"`LWG2850 <https://wg21.link/LWG2850>`__","std::function move constructor does unnecessary work","2017-02 (Kona)","|Complete|","","" -"`LWG2853 <https://wg21.link/LWG2853>`__","Possible inconsistency in specification of erase in [vector.modifiers]","2017-02 (Kona)","|Complete|","","" -"`LWG2855 <https://wg21.link/LWG2855>`__","std::throw_with_nested(""string_literal"")","2017-02 (Kona)","|Complete|","","" -"`LWG2857 <https://wg21.link/LWG2857>`__","{variant,optional,any}::emplace should return the constructed value","2017-02 (Kona)","|Complete|","","" -"`LWG2861 <https://wg21.link/LWG2861>`__","basic_string should require that charT match traits::char_type","2017-02 (Kona)","|Complete|","","" -"`LWG2866 <https://wg21.link/LWG2866>`__","Incorrect derived classes constraints","2017-02 (Kona)","|Nothing To Do|","","" -"`LWG2868 <https://wg21.link/LWG2868>`__","Missing specification of bad_any_cast::what()","2017-02 (Kona)","|Complete|","","" -"`LWG2872 <https://wg21.link/LWG2872>`__","Add definition for direct-non-list-initialization","2017-02 (Kona)","|Complete|","","" -"`LWG2873 <https://wg21.link/LWG2873>`__","Add noexcept to several shared_ptr related functions","2017-02 (Kona)","|Complete|","","" -"`LWG2874 <https://wg21.link/LWG2874>`__","Constructor ``shared_ptr::shared_ptr(Y*)``\ should be constrained","2017-02 (Kona)","|Complete|","13","" -"`LWG2875 <https://wg21.link/LWG2875>`__","shared_ptr::shared_ptr(Y\*, D, [|hellip|\ ]) constructors should be constrained","2017-02 (Kona)","|Complete|","","" -"`LWG2876 <https://wg21.link/LWG2876>`__","``shared_ptr::shared_ptr(const weak_ptr<Y>&)``\ constructor should be constrained","2017-02 (Kona)","|Complete|","14","" -"`LWG2878 <https://wg21.link/LWG2878>`__","Missing DefaultConstructible requirement for istream_iterator default constructor","2017-02 (Kona)","|Complete|","","" -"`LWG2890 <https://wg21.link/LWG2890>`__","The definition of 'object state' applies only to class types","2017-02 (Kona)","|Complete|","","" -"`LWG2900 <https://wg21.link/LWG2900>`__","The copy and move constructors of optional are not constexpr","2017-02 (Kona)","|Complete|","","" -"`LWG2903 <https://wg21.link/LWG2903>`__","The form of initialization for the emplace-constructors is not specified","2017-02 (Kona)","|Complete|","","" -"`LWG2904 <https://wg21.link/LWG2904>`__","Make variant move-assignment more exception safe","2017-02 (Kona)","|Complete|","","" -"`LWG2905 <https://wg21.link/LWG2905>`__","is_constructible_v<unique_ptr<P, D>, P, D const &> should be false when D is not copy constructible","2017-02 (Kona)","|Complete|","","" -"`LWG2908 <https://wg21.link/LWG2908>`__","The less-than operator for shared pointers could do more","2017-02 (Kona)","|Complete|","","" -"`LWG2911 <https://wg21.link/LWG2911>`__","An is_aggregate type trait is needed","2017-02 (Kona)","|Complete|","","" -"`LWG2921 <https://wg21.link/LWG2921>`__","packaged_task and type-erased allocators","2017-02 (Kona)","|Complete|","20","Originally implemented in LLVM 6 but reverted later. Old documentation incorrectly said it was implemented." -"`LWG2934 <https://wg21.link/LWG2934>`__","optional<const T> doesn't compare with T","2017-02 (Kona)","|Complete|","","" +"`LWG2260 <https://wg21.link/LWG2260>`__","Missing requirement for Allocator::pointer","2017-02 (Kona)","|Complete|","","`#103544 <https://github.com/llvm/llvm-project/issues/103544>`__","" +"`LWG2676 <https://wg21.link/LWG2676>`__","Provide filesystem::path overloads for File-based streams","2017-02 (Kona)","|Complete|","","`#103545 <https://github.com/llvm/llvm-project/issues/103545>`__","" +"`LWG2768 <https://wg21.link/LWG2768>`__","any_cast and move semantics","2017-02 (Kona)","|Complete|","","`#103546 <https://github.com/llvm/llvm-project/issues/103546>`__","" +"`LWG2769 <https://wg21.link/LWG2769>`__","Redundant const in the return type of any_cast(const any&)","2017-02 (Kona)","|Complete|","","`#103538 <https://github.com/llvm/llvm-project/issues/103538>`__","" +"`LWG2781 <https://wg21.link/LWG2781>`__","Contradictory requirements for std::function and std::reference_wrapper","2017-02 (Kona)","|Complete|","","`#103548 <https://github.com/llvm/llvm-project/issues/103548>`__","" +"`LWG2782 <https://wg21.link/LWG2782>`__","scoped_allocator_adaptor constructors must be constrained","2017-02 (Kona)","|Complete|","","`#103549 <https://github.com/llvm/llvm-project/issues/103549>`__","" +"`LWG2784 <https://wg21.link/LWG2784>`__","Resolution to LWG 2484 is missing ""otherwise, no effects"" and is hard to parse","2017-02 (Kona)","|Complete|","","`#103550 <https://github.com/llvm/llvm-project/issues/103550>`__","" +"`LWG2785 <https://wg21.link/LWG2785>`__","quoted should work with basic_string_view","2017-02 (Kona)","|Complete|","","`#103553 <https://github.com/llvm/llvm-project/issues/103553>`__","" +"`LWG2786 <https://wg21.link/LWG2786>`__","Annex C should mention shared_ptr changes for array support","2017-02 (Kona)","|Complete|","","`#103554 <https://github.com/llvm/llvm-project/issues/103554>`__","" +"`LWG2787 <https://wg21.link/LWG2787>`__","|sect|\ [file_status.cons] doesn't match class definition","2017-02 (Kona)","|Complete|","","`#103555 <https://github.com/llvm/llvm-project/issues/103555>`__","" +"`LWG2788 <https://wg21.link/LWG2788>`__","basic_string range mutators unintentionally require a default constructible allocator","2017-02 (Kona)","|Complete|","","`#103556 <https://github.com/llvm/llvm-project/issues/103556>`__","" +"`LWG2789 <https://wg21.link/LWG2789>`__","Equivalence of contained objects","2017-02 (Kona)","|Complete|","","`#103557 <https://github.com/llvm/llvm-project/issues/103557>`__","" +"`LWG2790 <https://wg21.link/LWG2790>`__","Missing specification of istreambuf_iterator::operator->","2017-02 (Kona)","|Complete|","","`#103558 <https://github.com/llvm/llvm-project/issues/103558>`__","" +"`LWG2794 <https://wg21.link/LWG2794>`__","Missing requirements for allocator pointers","2017-02 (Kona)","|Nothing To Do|","","`#103559 <https://github.com/llvm/llvm-project/issues/103559>`__","" +"`LWG2795 <https://wg21.link/LWG2795>`__","|sect|\ [global.functions] provides incorrect example of ADL use","2017-02 (Kona)","|Complete|","","`#103560 <https://github.com/llvm/llvm-project/issues/103560>`__","" +"`LWG2796 <https://wg21.link/LWG2796>`__","tuple should be a literal type","2017-02 (Kona)","|Complete|","","`#103561 <https://github.com/llvm/llvm-project/issues/103561>`__","" +"`LWG2801 <https://wg21.link/LWG2801>`__","Default-constructibility of unique_ptr","2017-02 (Kona)","|Complete|","","`#103562 <https://github.com/llvm/llvm-project/issues/103562>`__","" +"`LWG2802 <https://wg21.link/LWG2802>`__","shared_ptr constructor requirements for a deleter","2017-02 (Kona)","|Complete|","","`#103563 <https://github.com/llvm/llvm-project/issues/103563>`__","" +"`LWG2804 <https://wg21.link/LWG2804>`__","Unconditional constexpr default constructor for istream_iterator","2017-02 (Kona)","|Complete|","","`#103565 <https://github.com/llvm/llvm-project/issues/103565>`__","" +"`LWG2806 <https://wg21.link/LWG2806>`__","Base class of bad_optional_access","2017-02 (Kona)","|Complete|","","`#103566 <https://github.com/llvm/llvm-project/issues/103566>`__","" +"`LWG2807 <https://wg21.link/LWG2807>`__","std::invoke should use ``std::is_nothrow_callable``\ ","2017-02 (Kona)","|Complete|","","`#103567 <https://github.com/llvm/llvm-project/issues/103567>`__","" +"`LWG2812 <https://wg21.link/LWG2812>`__","Range access is available with <string_view>","2017-02 (Kona)","|Complete|","","`#103568 <https://github.com/llvm/llvm-project/issues/103568>`__","" +"`LWG2824 <https://wg21.link/LWG2824>`__","list::sort should say that the order of elements is unspecified if an exception is thrown","2017-02 (Kona)","|Complete|","","`#103569 <https://github.com/llvm/llvm-project/issues/103569>`__","" +"`LWG2826 <https://wg21.link/LWG2826>`__","string_view iterators use old wording","2017-02 (Kona)","|Complete|","","`#103570 <https://github.com/llvm/llvm-project/issues/103570>`__","" +"`LWG2834 <https://wg21.link/LWG2834>`__","Resolution LWG 2223 is missing wording about end iterators","2017-02 (Kona)","|Complete|","","`#103571 <https://github.com/llvm/llvm-project/issues/103571>`__","" +"`LWG2835 <https://wg21.link/LWG2835>`__","LWG 2536 seems to misspecify <tgmath.h>","2017-02 (Kona)","|Complete|","","`#103572 <https://github.com/llvm/llvm-project/issues/103572>`__","" +"`LWG2837 <https://wg21.link/LWG2837>`__","gcd and lcm should support a wider range of input values","2017-02 (Kona)","|Complete|","","`#103573 <https://github.com/llvm/llvm-project/issues/103573>`__","" +"`LWG2838 <https://wg21.link/LWG2838>`__","is_literal_type specification needs a little cleanup","2017-02 (Kona)","|Complete|","","`#103574 <https://github.com/llvm/llvm-project/issues/103574>`__","" +"`LWG2842 <https://wg21.link/LWG2842>`__","in_place_t check for optional::optional(U&&) should decay U","2017-02 (Kona)","|Complete|","","`#103575 <https://github.com/llvm/llvm-project/issues/103575>`__","" +"`LWG2850 <https://wg21.link/LWG2850>`__","std::function move constructor does unnecessary work","2017-02 (Kona)","|Complete|","","`#103576 <https://github.com/llvm/llvm-project/issues/103576>`__","" +"`LWG2853 <https://wg21.link/LWG2853>`__","Possible inconsistency in specification of erase in [vector.modifiers]","2017-02 (Kona)","|Complete|","","`#103577 <https://github.com/llvm/llvm-project/issues/103577>`__","" +"`LWG2855 <https://wg21.link/LWG2855>`__","std::throw_with_nested(""string_literal"")","2017-02 (Kona)","|Complete|","","`#103578 <https://github.com/llvm/llvm-project/issues/103578>`__","" +"`LWG2857 <https://wg21.link/LWG2857>`__","{variant,optional,any}::emplace should return the constructed value","2017-02 (Kona)","|Complete|","","`#103579 <https://github.com/llvm/llvm-project/issues/103579>`__","" +"`LWG2861 <https://wg21.link/LWG2861>`__","basic_string should require that charT match traits::char_type","2017-02 (Kona)","|Complete|","","`#103580 <https://github.com/llvm/llvm-project/issues/103580>`__","" +"`LWG2866 <https://wg21.link/LWG2866>`__","Incorrect derived classes constraints","2017-02 (Kona)","|Nothing To Do|","","`#103581 <https://github.com/llvm/llvm-project/issues/103581>`__","" +"`LWG2868 <https://wg21.link/LWG2868>`__","Missing specification of bad_any_cast::what()","2017-02 (Kona)","|Complete|","","`#103582 <https://github.com/llvm/llvm-project/issues/103582>`__","" +"`LWG2872 <https://wg21.link/LWG2872>`__","Add definition for direct-non-list-initialization","2017-02 (Kona)","|Complete|","","`#103583 <https://github.com/llvm/llvm-project/issues/103583>`__","" +"`LWG2873 <https://wg21.link/LWG2873>`__","Add noexcept to several shared_ptr related functions","2017-02 (Kona)","|Complete|","","`#103584 <https://github.com/llvm/llvm-project/issues/103584>`__","" +"`LWG2874 <https://wg21.link/LWG2874>`__","Constructor ``shared_ptr::shared_ptr(Y*)``\ should be constrained","2017-02 (Kona)","|Complete|","13","`#103585 <https://github.com/llvm/llvm-project/issues/103585>`__","" +"`LWG2875 <https://wg21.link/LWG2875>`__","shared_ptr::shared_ptr(Y\*, D, [|hellip|\ ]) constructors should be constrained","2017-02 (Kona)","|Complete|","","`#103586 <https://github.com/llvm/llvm-project/issues/103586>`__","" +"`LWG2876 <https://wg21.link/LWG2876>`__","``shared_ptr::shared_ptr(const weak_ptr<Y>&)``\ constructor should be constrained","2017-02 (Kona)","|Complete|","14","`#103587 <https://github.com/llvm/llvm-project/issues/103587>`__","" +"`LWG2878 <https://wg21.link/LWG2878>`__","Missing DefaultConstructible requirement for istream_iterator default constructor","2017-02 (Kona)","|Complete|","","`#103588 <https://github.com/llvm/llvm-project/issues/103588>`__","" +"`LWG2890 <https://wg21.link/LWG2890>`__","The definition of 'object state' applies only to class types","2017-02 (Kona)","|Complete|","","`#103589 <https://github.com/llvm/llvm-project/issues/103589>`__","" +"`LWG2900 <https://wg21.link/LWG2900>`__","The copy and move constructors of optional are not constexpr","2017-02 (Kona)","|Complete|","","`#103591 <https://github.com/llvm/llvm-project/issues/103591>`__","" +"`LWG2903 <https://wg21.link/LWG2903>`__","The form of initialization for the emplace-constructors is not specified","2017-02 (Kona)","|Complete|","","`#103593 <https://github.com/llvm/llvm-project/issues/103593>`__","" +"`LWG2904 <https://wg21.link/LWG2904>`__","Make variant move-assignment more exception safe","2017-02 (Kona)","|Complete|","","`#103594 <https://github.com/llvm/llvm-project/issues/103594>`__","" +"`LWG2905 <https://wg21.link/LWG2905>`__","is_constructible_v<unique_ptr<P, D>, P, D const &> should be false when D is not copy constructible","2017-02 (Kona)","|Complete|","","`#103595 <https://github.com/llvm/llvm-project/issues/103595>`__","" +"`LWG2908 <https://wg21.link/LWG2908>`__","The less-than operator for shared pointers could do more","2017-02 (Kona)","|Complete|","","`#103596 <https://github.com/llvm/llvm-project/issues/103596>`__","" +"`LWG2911 <https://wg21.link/LWG2911>`__","An is_aggregate type trait is needed","2017-02 (Kona)","|Complete|","","`#103597 <https://github.com/llvm/llvm-project/issues/103597>`__","" +"`LWG2921 <https://wg21.link/LWG2921>`__","packaged_task and type-erased allocators","2017-02 (Kona)","|Complete|","20","`#103598 <https://github.com/llvm/llvm-project/issues/103598>`__","Originally implemented in LLVM 6 but reverted later. Old documentation incorrectly said it was implemented." +"`LWG2934 <https://wg21.link/LWG2934>`__","optional<const T> doesn't compare with T","2017-02 (Kona)","|Complete|","","`#103599 <https://github.com/llvm/llvm-project/issues/103599>`__","" "","","","","","" -"`LWG2901 <https://wg21.link/LWG2901>`__","Variants cannot properly support allocators","2017-07 (Toronto)","|Complete|","","" -"`LWG2955 <https://wg21.link/LWG2955>`__","``to_chars / from_chars``\ depend on ``std::string``\ ","2017-07 (Toronto)","|Nothing To Do|","","Resolved by `P0682R1 <https://wg21.link/P0682R1>`__" -"`LWG2956 <https://wg21.link/LWG2956>`__","``filesystem::canonical()``\ still defined in terms of ``absolute(p, base)``\ ","2017-07 (Toronto)","|Complete|","","" +"`LWG2901 <https://wg21.link/LWG2901>`__","Variants cannot properly support allocators","2017-07 (Toronto)","|Complete|","","`#103600 <https://github.com/llvm/llvm-project/issues/103600>`__","" +"`LWG2955 <https://wg21.link/LWG2955>`__","``to_chars / from_chars``\ depend on ``std::string``\ ","2017-07 (Toronto)","|Nothing To Do|","","`#103601 <https://github.com/llvm/llvm-project/issues/103601>`__","Resolved by `P0682R1 <https://wg21.link/P0682R1>`__" +"`LWG2956 <https://wg21.link/LWG2956>`__","``filesystem::canonical()``\ still defined in terms of ``absolute(p, base)``\ ","2017-07 (Toronto)","|Complete|","","`#103602 <https://github.com/llvm/llvm-project/issues/103602>`__","" diff --git a/libcxx/docs/Status/Cxx17Papers.csv b/libcxx/docs/Status/Cxx17Papers.csv index 24fc7f718c36..ac9bb06e33ae 100644 --- a/libcxx/docs/Status/Cxx17Papers.csv +++ b/libcxx/docs/Status/Cxx17Papers.csv @@ -1,113 +1,113 @@ "Paper #","Paper Name","Meeting","Status","First released version","Notes" -"`N3911 <https://wg21.link/N3911>`__","TransformationTrait Alias ``void_t``\ .","2014-11 (Urbana)","|Complete|","3.6","" -"`N4089 <https://wg21.link/N4089>`__","Safe conversions in ``unique_ptr<T[]>``\ .","2014-11 (Urbana)","|Complete|","5","" -"`N4169 <https://wg21.link/N4169>`__","A proposal to add invoke function template","2014-11 (Urbana)","|Complete|","3.7","" -"`N4190 <https://wg21.link/N4190>`__","Removing auto_ptr, random_shuffle(), And Old <functional> Stuff.","2014-11 (Urbana)","|Complete|","15","" -"`N4258 <https://wg21.link/N4258>`__","Cleaning-up noexcept in the Library.","2014-11 (Urbana)","|Complete|","21","" -"`N4259 <https://wg21.link/N4259>`__","Wording for std::uncaught_exceptions","2014-11 (Urbana)","|Complete|","3.7","``std::uncaught_exception`` is deprecated since LLVM 20" -"`N4277 <https://wg21.link/N4277>`__","TriviallyCopyable ``reference_wrapper``\ .","2014-11 (Urbana)","|Complete|","3.2","" -"`N4279 <https://wg21.link/N4279>`__","Improved insertion interface for unique-key maps.","2014-11 (Urbana)","|Complete|","3.7","" -"`N4280 <https://wg21.link/N4280>`__","Non-member size() and more","2014-11 (Urbana)","|Complete|","3.6","" -"`N4284 <https://wg21.link/N4284>`__","Contiguous Iterators.","2014-11 (Urbana)","|Complete|","3.6","" -"`N4285 <https://wg21.link/N4285>`__","Cleanup for exception-specification and throw-expression.","2014-11 (Urbana)","|Complete|","4","" +"`N3911 <https://wg21.link/N3911>`__","TransformationTrait Alias ``void_t``\ .","2014-11 (Urbana)","|Complete|","3.6","`#103603 <https://github.com/llvm/llvm-project/issues/103603>`__","" +"`N4089 <https://wg21.link/N4089>`__","Safe conversions in ``unique_ptr<T[]>``\ .","2014-11 (Urbana)","|Complete|","5","`#99936 <https://github.com/llvm/llvm-project/issues/99936>`__","" +"`N4169 <https://wg21.link/N4169>`__","A proposal to add invoke function template","2014-11 (Urbana)","|Complete|","3.7","`#103604 <https://github.com/llvm/llvm-project/issues/103604>`__","" +"`N4190 <https://wg21.link/N4190>`__","Removing auto_ptr, random_shuffle(), And Old <functional> Stuff.","2014-11 (Urbana)","|Complete|","15","`#103605 <https://github.com/llvm/llvm-project/issues/103605>`__","" +"`N4258 <https://wg21.link/N4258>`__","Cleaning-up noexcept in the Library.","2014-11 (Urbana)","|Complete|","21","`#99937 <https://github.com/llvm/llvm-project/issues/99937>`__","" +"`N4259 <https://wg21.link/N4259>`__","Wording for std::uncaught_exceptions","2014-11 (Urbana)","|Complete|","3.7","`#103606 <https://github.com/llvm/llvm-project/issues/103606>`__","``std::uncaught_exception`` is deprecated since LLVM 20" +"`N4277 <https://wg21.link/N4277>`__","TriviallyCopyable ``reference_wrapper``\ .","2014-11 (Urbana)","|Complete|","3.2","`#103608 <https://github.com/llvm/llvm-project/issues/103608>`__","" +"`N4279 <https://wg21.link/N4279>`__","Improved insertion interface for unique-key maps.","2014-11 (Urbana)","|Complete|","3.7","`#103609 <https://github.com/llvm/llvm-project/issues/103609>`__","" +"`N4280 <https://wg21.link/N4280>`__","Non-member size() and more","2014-11 (Urbana)","|Complete|","3.6","`#103610 <https://github.com/llvm/llvm-project/issues/103610>`__","" +"`N4284 <https://wg21.link/N4284>`__","Contiguous Iterators.","2014-11 (Urbana)","|Complete|","3.6","`#103611 <https://github.com/llvm/llvm-project/issues/103611>`__","" +"`N4285 <https://wg21.link/N4285>`__","Cleanup for exception-specification and throw-expression.","2014-11 (Urbana)","|Complete|","4","`#103612 <https://github.com/llvm/llvm-project/issues/103612>`__","" "","","","","","" -"`N4387 <https://wg21.link/N4387>`__","improving pair and tuple","2015-05 (Lenexa)","|Complete|","4","" -"`N4389 <https://wg21.link/N4389>`__","bool_constant","2015-05 (Lenexa)","|Complete|","3.7","" -"`N4508 <https://wg21.link/N4508>`__","shared_mutex for C++17","2015-05 (Lenexa)","|Complete|","3.7","" -"`N4366 <https://wg21.link/N4366>`__","LWG 2228 missing SFINAE rule","2015-05 (Lenexa)","|Complete|","3.1","" -"`N4510 <https://wg21.link/N4510>`__","Minimal incomplete type support for standard containers, revision 4","2015-05 (Lenexa)","|Complete|","3.6","" +"`N4387 <https://wg21.link/N4387>`__","improving pair and tuple","2015-05 (Lenexa)","|Complete|","4","`#103613 <https://github.com/llvm/llvm-project/issues/103613>`__","" +"`N4389 <https://wg21.link/N4389>`__","bool_constant","2015-05 (Lenexa)","|Complete|","3.7","`#103614 <https://github.com/llvm/llvm-project/issues/103614>`__","" +"`N4508 <https://wg21.link/N4508>`__","shared_mutex for C++17","2015-05 (Lenexa)","|Complete|","3.7","`#103615 <https://github.com/llvm/llvm-project/issues/103615>`__","" +"`N4366 <https://wg21.link/N4366>`__","LWG 2228 missing SFINAE rule","2015-05 (Lenexa)","|Complete|","3.1","`#103616 <https://github.com/llvm/llvm-project/issues/103616>`__","" +"`N4510 <https://wg21.link/N4510>`__","Minimal incomplete type support for standard containers, revision 4","2015-05 (Lenexa)","|Complete|","3.6","`#103617 <https://github.com/llvm/llvm-project/issues/103617>`__","" "","","","","","" -"`P0004R1 <https://wg21.link/P0004R1>`__","Remove Deprecated iostreams aliases.","2015-10 (Kona)","|Complete|","3.8","" -"`P0006R0 <https://wg21.link/P0006R0>`__","Adopt Type Traits Variable Templates for C++17.","2015-10 (Kona)","|Complete|","3.8","" -"`P0092R1 <https://wg21.link/P0092R1>`__","Polishing <chrono>","2015-10 (Kona)","|Complete|","3.8","" -"`P0007R1 <https://wg21.link/P0007R1>`__","Constant View: A proposal for a ``std::as_const``\ helper function template.","2015-10 (Kona)","|Complete|","3.8","" -"`P0156R0 <https://wg21.link/P0156R0>`__","Variadic lock_guard(rev 3).","2015-10 (Kona)","|Nothing To Do|","","Pulled at the 2017-01 meeting in Kona" -"`P0074R0 <https://wg21.link/P0074R0>`__","Making ``std::owner_less``\ more flexible","2015-10 (Kona)","|Complete|","3.8","" -"`P0013R1 <https://wg21.link/P0013R1>`__","Logical type traits rev 2","2015-10 (Kona)","|Complete|","3.8","" +"`P0004R1 <https://wg21.link/P0004R1>`__","Remove Deprecated iostreams aliases.","2015-10 (Kona)","|Complete|","3.8","`#103618 <https://github.com/llvm/llvm-project/issues/103618>`__","" +"`P0006R0 <https://wg21.link/P0006R0>`__","Adopt Type Traits Variable Templates for C++17.","2015-10 (Kona)","|Complete|","3.8","`#103619 <https://github.com/llvm/llvm-project/issues/103619>`__","" +"`P0092R1 <https://wg21.link/P0092R1>`__","Polishing <chrono>","2015-10 (Kona)","|Complete|","3.8","`#103620 <https://github.com/llvm/llvm-project/issues/103620>`__","" +"`P0007R1 <https://wg21.link/P0007R1>`__","Constant View: A proposal for a ``std::as_const``\ helper function template.","2015-10 (Kona)","|Complete|","3.8","`#103621 <https://github.com/llvm/llvm-project/issues/103621>`__","" +"`P0156R0 <https://wg21.link/P0156R0>`__","Variadic lock_guard(rev 3).","2015-10 (Kona)","|Nothing To Do|","","`#103622 <https://github.com/llvm/llvm-project/issues/103622>`__","Pulled at the 2017-01 meeting in Kona" +"`P0074R0 <https://wg21.link/P0074R0>`__","Making ``std::owner_less``\ more flexible","2015-10 (Kona)","|Complete|","3.8","`#103623 <https://github.com/llvm/llvm-project/issues/103623>`__","" +"`P0013R1 <https://wg21.link/P0013R1>`__","Logical type traits rev 2","2015-10 (Kona)","|Complete|","3.8","`#103624 <https://github.com/llvm/llvm-project/issues/103624>`__","" "","","","","","" -"`P0024R2 <https://wg21.link/P0024R2>`__","The Parallelism TS Should be Standardized","2016-02 (Jacksonville)","|Partial|","","" -"`P0226R1 <https://wg21.link/P0226R1>`__","Mathematical Special Functions for C++17","2016-02 (Jacksonville)","|In Progress|","","Progress is tracked `here <https://github.com/llvm/llvm-project/issues/99939>`__" -"`P0220R1 <https://wg21.link/P0220R1>`__","Adopt Library Fundamentals V1 TS Components for C++17","2016-02 (Jacksonville)","|Complete|","16","" -"`P0218R1 <https://wg21.link/P0218R1>`__","Adopt the File System TS for C++17","2016-02 (Jacksonville)","|Complete|","7","" -"`P0033R1 <https://wg21.link/P0033R1>`__","Re-enabling shared_from_this","2016-02 (Jacksonville)","|Complete|","3.9","" -"`P0005R4 <https://wg21.link/P0005R4>`__","Adopt not_fn from Library Fundamentals 2 for C++17","2016-02 (Jacksonville)","|Complete|","3.9","" -"`P0152R1 <https://wg21.link/P0152R1>`__","constexpr ``atomic::is_always_lock_free``\ ","2016-02 (Jacksonville)","|Complete|","3.9","" -"`P0185R1 <https://wg21.link/P0185R1>`__","Adding [nothrow-]swappable traits","2016-02 (Jacksonville)","|Complete|","3.9","" -"`P0253R1 <https://wg21.link/P0253R1>`__","Fixing a design mistake in the searchers interface","2016-02 (Jacksonville)","|Complete|","3.9","" -"`P0025R0 <https://wg21.link/P0025R0>`__","An algorithm to ""clamp"" a value between a pair of boundary values","2016-02 (Jacksonville)","|Complete|","3.9","" -"`P0154R1 <https://wg21.link/P0154R1>`__","constexpr std::hardware_{constructive,destructive}_interference_size","2016-02 (Jacksonville)","|Complete|","19","The required macros are only implemented as of LLVM 19." -"`P0030R1 <https://wg21.link/P0030R1>`__","Proposal to Introduce a 3-Argument Overload to std::hypot","2016-02 (Jacksonville)","|Complete|","3.9","" -"`P0031R0 <https://wg21.link/P0031R0>`__","A Proposal to Add Constexpr Modifiers to reverse_iterator, move_iterator, array and Range Access","2016-02 (Jacksonville)","|Complete|","4","" -"`P0272R1 <https://wg21.link/P0272R1>`__","Give ``std::string``\ a non-const ``.data()``\ member function","2016-02 (Jacksonville)","|Complete|","3.9","" -"`P0077R2 <https://wg21.link/P0077R2>`__","``is_callable``\ , the missing INVOKE related trait","2016-02 (Jacksonville)","|Complete|","3.9","" +"`P0024R2 <https://wg21.link/P0024R2>`__","The Parallelism TS Should be Standardized","2016-02 (Jacksonville)","|Partial|","","`#99938 <https://github.com/llvm/llvm-project/issues/99938>`__","" +"`P0226R1 <https://wg21.link/P0226R1>`__","Mathematical Special Functions for C++17","2016-02 (Jacksonville)","|In Progress|","","`#99939 <https://github.com/llvm/llvm-project/issues/99939>`__","Progress is tracked `here <https://github.com/llvm/llvm-project/issues/99939>`__" +"`P0220R1 <https://wg21.link/P0220R1>`__","Adopt Library Fundamentals V1 TS Components for C++17","2016-02 (Jacksonville)","|Complete|","16","`#103625 <https://github.com/llvm/llvm-project/issues/103625>`__","" +"`P0218R1 <https://wg21.link/P0218R1>`__","Adopt the File System TS for C++17","2016-02 (Jacksonville)","|Complete|","7","`#103626 <https://github.com/llvm/llvm-project/issues/103626>`__","" +"`P0033R1 <https://wg21.link/P0033R1>`__","Re-enabling shared_from_this","2016-02 (Jacksonville)","|Complete|","3.9","`#103627 <https://github.com/llvm/llvm-project/issues/103627>`__","" +"`P0005R4 <https://wg21.link/P0005R4>`__","Adopt not_fn from Library Fundamentals 2 for C++17","2016-02 (Jacksonville)","|Complete|","3.9","`#103629 <https://github.com/llvm/llvm-project/issues/103629>`__","" +"`P0152R1 <https://wg21.link/P0152R1>`__","constexpr ``atomic::is_always_lock_free``\ ","2016-02 (Jacksonville)","|Complete|","3.9","`#103630 <https://github.com/llvm/llvm-project/issues/103630>`__","" +"`P0185R1 <https://wg21.link/P0185R1>`__","Adding [nothrow-]swappable traits","2016-02 (Jacksonville)","|Complete|","3.9","`#103631 <https://github.com/llvm/llvm-project/issues/103631>`__","" +"`P0253R1 <https://wg21.link/P0253R1>`__","Fixing a design mistake in the searchers interface","2016-02 (Jacksonville)","|Complete|","3.9","`#103632 <https://github.com/llvm/llvm-project/issues/103632>`__","" +"`P0025R0 <https://wg21.link/P0025R0>`__","An algorithm to ""clamp"" a value between a pair of boundary values","2016-02 (Jacksonville)","|Complete|","3.9","`#103633 <https://github.com/llvm/llvm-project/issues/103633>`__","" +"`P0154R1 <https://wg21.link/P0154R1>`__","constexpr std::hardware_{constructive,destructive}_interference_size","2016-02 (Jacksonville)","|Complete|","19","`#103634 <https://github.com/llvm/llvm-project/issues/103634>`__","The required macros are only implemented as of LLVM 19." +"`P0030R1 <https://wg21.link/P0030R1>`__","Proposal to Introduce a 3-Argument Overload to std::hypot","2016-02 (Jacksonville)","|Complete|","3.9","`#103635 <https://github.com/llvm/llvm-project/issues/103635>`__","" +"`P0031R0 <https://wg21.link/P0031R0>`__","A Proposal to Add Constexpr Modifiers to reverse_iterator, move_iterator, array and Range Access","2016-02 (Jacksonville)","|Complete|","4","`#103636 <https://github.com/llvm/llvm-project/issues/103636>`__","" +"`P0272R1 <https://wg21.link/P0272R1>`__","Give ``std::string``\ a non-const ``.data()``\ member function","2016-02 (Jacksonville)","|Complete|","3.9","`#103637 <https://github.com/llvm/llvm-project/issues/103637>`__","" +"`P0077R2 <https://wg21.link/P0077R2>`__","``is_callable``\ , the missing INVOKE related trait","2016-02 (Jacksonville)","|Complete|","3.9","`#103638 <https://github.com/llvm/llvm-project/issues/103638>`__","" "","","","","","" -"`P0032R3 <https://wg21.link/P0032R3>`__","Homogeneous interface for variant, any and optional","2016-06 (Oulu)","|Complete|","4","" -"`P0040R3 <https://wg21.link/P0040R3>`__","Extending memory management tools","2016-06 (Oulu)","|Complete|","4","" -"`P0063R3 <https://wg21.link/P0063R3>`__","C++17 should refer to C11 instead of C99","2016-06 (Oulu)","|Complete|","7","" -"`P0067R3 <https://wg21.link/P0067R3>`__","Elementary string conversions","2016-06 (Oulu)","|Nothing To Do|","n/a","Resolved by `P0067R5 <https://wg21.link/P0067R5>`__" -"`P0083R3 <https://wg21.link/P0083R3>`__","Splicing Maps and Sets","2016-06 (Oulu)","|Complete|","8","" -"`P0084R2 <https://wg21.link/P0084R2>`__","Emplace Return Type","2016-06 (Oulu)","|Complete|","4","" -"`P0088R3 <https://wg21.link/P0088R3>`__","Variant: a type-safe union for C++17","2016-06 (Oulu)","|Complete|","4","" -"`P0137R1 <https://wg21.link/P0137R1>`__","Core Issue 1776: Replacement of class objects containing reference members","2016-06 (Oulu)","|Complete|","6","" -"`P0163R0 <https://wg21.link/P0163R0>`__","shared_ptr::weak_type","2016-06 (Oulu)","|Complete|","3.9","" -"`P0174R2 <https://wg21.link/P0174R2>`__","Deprecating Vestigial Library Parts in C++17","2016-06 (Oulu)","|Complete|","15","" -"`P0175R1 <https://wg21.link/P0175R1>`__","Synopses for the C library","2016-06 (Oulu)","|Nothing To Do|","n/a","" -"`P0180R2 <https://wg21.link/P0180R2>`__","Reserve a New Library Namespace for Future Standardization","2016-06 (Oulu)","|Nothing To Do|","n/a","" -"`P0181R1 <https://wg21.link/P0181R1>`__","Ordered by Default","2016-06 (Oulu)","|Nothing To Do|","n/a","Pulled at the 2017-01 meeting in Kona" -"`P0209R2 <https://wg21.link/P0209R2>`__","make_from_tuple: apply for construction","2016-06 (Oulu)","|Complete|","3.9","" -"`P0219R1 <https://wg21.link/P0219R1>`__","Relative Paths for Filesystem","2016-06 (Oulu)","|Complete|","7","" -"`P0254R2 <https://wg21.link/P0254R2>`__","Integrating std::string_view and std::string","2016-06 (Oulu)","|Complete|","4","" -"`P0258R2 <https://wg21.link/P0258R2>`__","has_unique_object_representations","2016-06 (Oulu)","|Complete|","6","" -"`P0295R0 <https://wg21.link/P0295R0>`__","Adopt Selected Library Fundamentals V2 Components for C++17","2016-06 (Oulu)","|Complete|","4","" -"`P0302R1 <https://wg21.link/P0302R1>`__","Removing Allocator Support in std::function","2016-06 (Oulu)","|Complete|","4","" -"`P0307R2 <https://wg21.link/P0307R2>`__","Making Optional Greater Equal Again","2016-06 (Oulu)","|Complete|","4","" -"`P0336R1 <https://wg21.link/P0336R1>`__","Better Names for Parallel Execution Policies in C++17","2016-06 (Oulu)","|Complete|","17","" -"`P0337R0 <https://wg21.link/P0337R0>`__","Delete ``operator=``\ for polymorphic_allocator","2016-06 (Oulu)","|Complete|","3.9","" -"`P0346R1 <https://wg21.link/P0346R1>`__","A <random> Nomenclature Tweak","2016-06 (Oulu)","|Complete|","3.9","" -"`P0358R1 <https://wg21.link/P0358R1>`__","Fixes for not_fn","2016-06 (Oulu)","|Complete|","3.9","" -"`P0371R1 <https://wg21.link/P0371R1>`__","Temporarily discourage memory_order_consume","2016-06 (Oulu)","|Nothing To Do|","n/a","" -"`P0392R0 <https://wg21.link/P0392R0>`__","Adapting string_view by filesystem paths","2016-06 (Oulu)","|Complete|","4","" -"`P0393R3 <https://wg21.link/P0393R3>`__","Making Variant Greater Equal","2016-06 (Oulu)","|Complete|","4","" -"`P0394R4 <https://wg21.link/P0394R4>`__","Hotel Parallelifornia: terminate() for Parallel Algorithms Exception Handling","2016-06 (Oulu)","|Complete|","17","" +"`P0032R3 <https://wg21.link/P0032R3>`__","Homogeneous interface for variant, any and optional","2016-06 (Oulu)","|Complete|","4","`#103639 <https://github.com/llvm/llvm-project/issues/103639>`__","" +"`P0040R3 <https://wg21.link/P0040R3>`__","Extending memory management tools","2016-06 (Oulu)","|Complete|","4","`#103640 <https://github.com/llvm/llvm-project/issues/103640>`__","" +"`P0063R3 <https://wg21.link/P0063R3>`__","C++17 should refer to C11 instead of C99","2016-06 (Oulu)","|Complete|","7","`#103642 <https://github.com/llvm/llvm-project/issues/103642>`__","" +"`P0067R3 <https://wg21.link/P0067R3>`__","Elementary string conversions","2016-06 (Oulu)","|Nothing To Do|","n/a","`#103643 <https://github.com/llvm/llvm-project/issues/103643>`__","Resolved by `P0067R5 <https://wg21.link/P0067R5>`__" +"`P0083R3 <https://wg21.link/P0083R3>`__","Splicing Maps and Sets","2016-06 (Oulu)","|Complete|","8","`#103645 <https://github.com/llvm/llvm-project/issues/103645>`__","" +"`P0084R2 <https://wg21.link/P0084R2>`__","Emplace Return Type","2016-06 (Oulu)","|Complete|","4","`#103646 <https://github.com/llvm/llvm-project/issues/103646>`__","" +"`P0088R3 <https://wg21.link/P0088R3>`__","Variant: a type-safe union for C++17","2016-06 (Oulu)","|Complete|","4","`#103647 <https://github.com/llvm/llvm-project/issues/103647>`__","" +"`P0137R1 <https://wg21.link/P0137R1>`__","Core Issue 1776: Replacement of class objects containing reference members","2016-06 (Oulu)","|Complete|","6","`#103648 <https://github.com/llvm/llvm-project/issues/103648>`__","" +"`P0163R0 <https://wg21.link/P0163R0>`__","shared_ptr::weak_type","2016-06 (Oulu)","|Complete|","3.9","`#103649 <https://github.com/llvm/llvm-project/issues/103649>`__","" +"`P0174R2 <https://wg21.link/P0174R2>`__","Deprecating Vestigial Library Parts in C++17","2016-06 (Oulu)","|Complete|","15","`#103650 <https://github.com/llvm/llvm-project/issues/103650>`__","" +"`P0175R1 <https://wg21.link/P0175R1>`__","Synopses for the C library","2016-06 (Oulu)","|Nothing To Do|","n/a","`#99941 <https://github.com/llvm/llvm-project/issues/99941>`__","" +"`P0180R2 <https://wg21.link/P0180R2>`__","Reserve a New Library Namespace for Future Standardization","2016-06 (Oulu)","|Nothing To Do|","n/a","`#103651 <https://github.com/llvm/llvm-project/issues/103651>`__","" +"`P0181R1 <https://wg21.link/P0181R1>`__","Ordered by Default","2016-06 (Oulu)","|Nothing To Do|","n/a","`#103652 <https://github.com/llvm/llvm-project/issues/103652>`__","Pulled at the 2017-01 meeting in Kona" +"`P0209R2 <https://wg21.link/P0209R2>`__","make_from_tuple: apply for construction","2016-06 (Oulu)","|Complete|","3.9","`#103653 <https://github.com/llvm/llvm-project/issues/103653>`__","" +"`P0219R1 <https://wg21.link/P0219R1>`__","Relative Paths for Filesystem","2016-06 (Oulu)","|Complete|","7","`#103654 <https://github.com/llvm/llvm-project/issues/103654>`__","" +"`P0254R2 <https://wg21.link/P0254R2>`__","Integrating std::string_view and std::string","2016-06 (Oulu)","|Complete|","4","`#103655 <https://github.com/llvm/llvm-project/issues/103655>`__","" +"`P0258R2 <https://wg21.link/P0258R2>`__","has_unique_object_representations","2016-06 (Oulu)","|Complete|","6","`#103656 <https://github.com/llvm/llvm-project/issues/103656>`__","" +"`P0295R0 <https://wg21.link/P0295R0>`__","Adopt Selected Library Fundamentals V2 Components for C++17","2016-06 (Oulu)","|Complete|","4","`#103657 <https://github.com/llvm/llvm-project/issues/103657>`__","" +"`P0302R1 <https://wg21.link/P0302R1>`__","Removing Allocator Support in std::function","2016-06 (Oulu)","|Complete|","4","`#103658 <https://github.com/llvm/llvm-project/issues/103658>`__","" +"`P0307R2 <https://wg21.link/P0307R2>`__","Making Optional Greater Equal Again","2016-06 (Oulu)","|Complete|","4","`#103659 <https://github.com/llvm/llvm-project/issues/103659>`__","" +"`P0336R1 <https://wg21.link/P0336R1>`__","Better Names for Parallel Execution Policies in C++17","2016-06 (Oulu)","|Complete|","17","`#103660 <https://github.com/llvm/llvm-project/issues/103660>`__","" +"`P0337R0 <https://wg21.link/P0337R0>`__","Delete ``operator=``\ for polymorphic_allocator","2016-06 (Oulu)","|Complete|","3.9","`#103661 <https://github.com/llvm/llvm-project/issues/103661>`__","" +"`P0346R1 <https://wg21.link/P0346R1>`__","A <random> Nomenclature Tweak","2016-06 (Oulu)","|Complete|","3.9","`#103662 <https://github.com/llvm/llvm-project/issues/103662>`__","" +"`P0358R1 <https://wg21.link/P0358R1>`__","Fixes for not_fn","2016-06 (Oulu)","|Complete|","3.9","`#103663 <https://github.com/llvm/llvm-project/issues/103663>`__","" +"`P0371R1 <https://wg21.link/P0371R1>`__","Temporarily discourage memory_order_consume","2016-06 (Oulu)","|Nothing To Do|","n/a","`#103664 <https://github.com/llvm/llvm-project/issues/103664>`__","" +"`P0392R0 <https://wg21.link/P0392R0>`__","Adapting string_view by filesystem paths","2016-06 (Oulu)","|Complete|","4","`#103665 <https://github.com/llvm/llvm-project/issues/103665>`__","" +"`P0393R3 <https://wg21.link/P0393R3>`__","Making Variant Greater Equal","2016-06 (Oulu)","|Complete|","4","`#103666 <https://github.com/llvm/llvm-project/issues/103666>`__","" +"`P0394R4 <https://wg21.link/P0394R4>`__","Hotel Parallelifornia: terminate() for Parallel Algorithms Exception Handling","2016-06 (Oulu)","|Complete|","17","`#103667 <https://github.com/llvm/llvm-project/issues/103667>`__","" "","","","","","" -"`P0003R5 <https://wg21.link/P0003R5>`__","Removing Deprecated Exception Specifications from C++17","2016-11 (Issaquah)","|Complete|","5","" -"`P0067R5 <https://wg21.link/P0067R5>`__","Elementary string conversions, revision 5","2016-11 (Issaquah)","|Partial|","","For integer types, ``std::(to|from)_chars`` has been available since v7; for ``float`` and ``double``, ``std::to_chars`` since v14 and ``std::from_chars`` since v20. Support is complete except for ``long double``." -"`P0403R1 <https://wg21.link/P0403R1>`__","Literal suffixes for ``basic_string_view``\ ","2016-11 (Issaquah)","|Complete|","4","" -"`P0414R2 <https://wg21.link/P0414R2>`__","Merging shared_ptr changes from Library Fundamentals to C++17","2016-11 (Issaquah)","|Complete|","11","" -"`P0418R2 <https://wg21.link/P0418R2>`__","Fail or succeed: there is no atomic lattice","2016-11 (Issaquah)","","","" -"`P0426R1 <https://wg21.link/P0426R1>`__","Constexpr for ``std::char_traits``\ ","2016-11 (Issaquah)","|Complete|","4","" -"`P0435R1 <https://wg21.link/P0435R1>`__","Resolving LWG Issues re ``common_type``\ ","2016-11 (Issaquah)","|Complete|","4","" -"`P0502R0 <https://wg21.link/P0502R0>`__","Throwing out of a parallel algorithm terminates - but how?","2016-11 (Issaquah)","","","" -"`P0503R0 <https://wg21.link/P0503R0>`__","Correcting library usage of ""literal type""","2016-11 (Issaquah)","|Complete|","4","" -"`P0504R0 <https://wg21.link/P0504R0>`__","Revisiting in-place tag types for any/optional/variant","2016-11 (Issaquah)","|Complete|","4","" -"`P0505R0 <https://wg21.link/P0505R0>`__","Wording for GB 50 - constexpr for chrono","2016-11 (Issaquah)","|Complete|","4","" -"`P0508R0 <https://wg21.link/P0508R0>`__","Wording for GB 58 - structured bindings for node_handles","2016-11 (Issaquah)","|Complete|","7","" -"`P0509R1 <https://wg21.link/P0509R1>`__","Updating ""Restrictions on exception handling""","2016-11 (Issaquah)","|Nothing To Do|","n/a","" -"`P0510R0 <https://wg21.link/P0510R0>`__","Disallowing references, incomplete types, arrays, and empty variants","2016-11 (Issaquah)","|Complete|","4","" -"`P0513R0 <https://wg21.link/P0513R0>`__","Poisoning the Hash","2016-11 (Issaquah)","|Complete|","5","" -"`P0516R0 <https://wg21.link/P0516R0>`__","Clarify That shared_future's Copy Operations have Wide Contracts","2016-11 (Issaquah)","|Complete|","4","" -"`P0517R0 <https://wg21.link/P0517R0>`__","Make future_error Constructible","2016-11 (Issaquah)","|Complete|","4","" -"`P0521R0 <https://wg21.link/P0521R0>`__","Proposed Resolution for CA 14 (shared_ptr use_count/unique)","2016-11 (Issaquah)","|Complete|","18","" +"`P0003R5 <https://wg21.link/P0003R5>`__","Removing Deprecated Exception Specifications from C++17","2016-11 (Issaquah)","|Complete|","5","`#103668 <https://github.com/llvm/llvm-project/issues/103668>`__","" +"`P0067R5 <https://wg21.link/P0067R5>`__","Elementary string conversions, revision 5","2016-11 (Issaquah)","|Partial|","","`#99940 <https://github.com/llvm/llvm-project/issues/99940>`__","For integer types, ``std::(to|from)_chars`` has been available since v7; for ``float`` and ``double``, ``std::to_chars`` since v14 and ``std::from_chars`` since v20. Support is complete except for ``long double``." +"`P0403R1 <https://wg21.link/P0403R1>`__","Literal suffixes for ``basic_string_view``\ ","2016-11 (Issaquah)","|Complete|","4","`#103669 <https://github.com/llvm/llvm-project/issues/103669>`__","" +"`P0414R2 <https://wg21.link/P0414R2>`__","Merging shared_ptr changes from Library Fundamentals to C++17","2016-11 (Issaquah)","|Complete|","11","`#103670 <https://github.com/llvm/llvm-project/issues/103670>`__","" +"`P0418R2 <https://wg21.link/P0418R2>`__","Fail or succeed: there is no atomic lattice","2016-11 (Issaquah)","","","`#99942 <https://github.com/llvm/llvm-project/issues/99942>`__","" +"`P0426R1 <https://wg21.link/P0426R1>`__","Constexpr for ``std::char_traits``\ ","2016-11 (Issaquah)","|Complete|","4","`#103671 <https://github.com/llvm/llvm-project/issues/103671>`__","" +"`P0435R1 <https://wg21.link/P0435R1>`__","Resolving LWG Issues re ``common_type``\ ","2016-11 (Issaquah)","|Complete|","4","`#103672 <https://github.com/llvm/llvm-project/issues/103672>`__","" +"`P0502R0 <https://wg21.link/P0502R0>`__","Throwing out of a parallel algorithm terminates - but how?","2016-11 (Issaquah)","","","`#99943 <https://github.com/llvm/llvm-project/issues/99943>`__","" +"`P0503R0 <https://wg21.link/P0503R0>`__","Correcting library usage of ""literal type""","2016-11 (Issaquah)","|Complete|","4","`#103673 <https://github.com/llvm/llvm-project/issues/103673>`__","" +"`P0504R0 <https://wg21.link/P0504R0>`__","Revisiting in-place tag types for any/optional/variant","2016-11 (Issaquah)","|Complete|","4","`#103674 <https://github.com/llvm/llvm-project/issues/103674>`__","" +"`P0505R0 <https://wg21.link/P0505R0>`__","Wording for GB 50 - constexpr for chrono","2016-11 (Issaquah)","|Complete|","4","`#103675 <https://github.com/llvm/llvm-project/issues/103675>`__","" +"`P0508R0 <https://wg21.link/P0508R0>`__","Wording for GB 58 - structured bindings for node_handles","2016-11 (Issaquah)","|Complete|","7","`#99944 <https://github.com/llvm/llvm-project/issues/99944>`__","" +"`P0509R1 <https://wg21.link/P0509R1>`__","Updating ""Restrictions on exception handling""","2016-11 (Issaquah)","|Nothing To Do|","n/a","`#103676 <https://github.com/llvm/llvm-project/issues/103676>`__","" +"`P0510R0 <https://wg21.link/P0510R0>`__","Disallowing references, incomplete types, arrays, and empty variants","2016-11 (Issaquah)","|Complete|","4","`#103677 <https://github.com/llvm/llvm-project/issues/103677>`__","" +"`P0513R0 <https://wg21.link/P0513R0>`__","Poisoning the Hash","2016-11 (Issaquah)","|Complete|","5","`#103678 <https://github.com/llvm/llvm-project/issues/103678>`__","" +"`P0516R0 <https://wg21.link/P0516R0>`__","Clarify That shared_future's Copy Operations have Wide Contracts","2016-11 (Issaquah)","|Complete|","4","`#103679 <https://github.com/llvm/llvm-project/issues/103679>`__","" +"`P0517R0 <https://wg21.link/P0517R0>`__","Make future_error Constructible","2016-11 (Issaquah)","|Complete|","4","`#103680 <https://github.com/llvm/llvm-project/issues/103680>`__","" +"`P0521R0 <https://wg21.link/P0521R0>`__","Proposed Resolution for CA 14 (shared_ptr use_count/unique)","2016-11 (Issaquah)","|Complete|","18","`#103681 <https://github.com/llvm/llvm-project/issues/103681>`__","" "","","","","","" -"`P0156R2 <https://wg21.link/P0156R2>`__","Variadic Lock guard(rev 5)","2017-02 (Kona)","|Complete|","5","" -"`P0270R3 <https://wg21.link/P0270R3>`__","Removing C dependencies from signal handler wording","2017-02 (Kona)","|Nothing To Do|","","" -"`P0298R3 <https://wg21.link/P0298R3>`__","A byte type definition","2017-02 (Kona)","|Complete|","5","" -"`P0317R1 <https://wg21.link/P0317R1>`__","Directory Entry Caching for Filesystem","2017-02 (Kona)","|Complete|","7","" -"`P0430R2 <https://wg21.link/P0430R2>`__","File system library on non-POSIX-like operating systems","2017-02 (Kona)","|Complete|","7","" -"`P0433R2 <https://wg21.link/P0433R2>`__","Toward a resolution of US7 and US14: Integrating template deduction for class templates into the standard library","2017-02 (Kona)","|Complete|","14","" -"`P0452R1 <https://wg21.link/P0452R1>`__","Unifying <numeric> Parallel Algorithms","2017-02 (Kona)","|Partial|","","The changes to ``std::transform_inclusive_scan`` and ``std::transform_exclusive_scan`` have not yet been implemented." -"`P0467R2 <https://wg21.link/P0467R2>`__","Iterator Concerns for Parallel Algorithms","2017-02 (Kona)","|Partial|","","" -"`P0492R2 <https://wg21.link/P0492R2>`__","Proposed Resolution of C++17 National Body Comments for Filesystems","2017-02 (Kona)","|Complete|","7","" -"`P0518R1 <https://wg21.link/P0518R1>`__","Allowing copies as arguments to function objects given to parallel algorithms in response to CH11","2017-02 (Kona)","|Nothing To Do|","","" -"`P0523R1 <https://wg21.link/P0523R1>`__","Wording for CH 10: Complexity of parallel algorithms","2017-02 (Kona)","|Nothing To Do|","","" -"`P0548R1 <https://wg21.link/P0548R1>`__","common_type and duration","2017-02 (Kona)","|Complete|","5","" -"`P0558R1 <https://wg21.link/P0558R1>`__","Resolving atomic<T> named base class inconsistencies","2017-02 (Kona)","|Complete|","","" -"`P0574R1 <https://wg21.link/P0574R1>`__","Algorithm Complexity Constraints and Parallel Overloads","2017-02 (Kona)","|Nothing To Do|","","" -"`P0599R1 <https://wg21.link/P0599R1>`__","noexcept for hash functions","2017-02 (Kona)","|Complete|","5","" -"`P0604R0 <https://wg21.link/P0604R0>`__","Resolving GB 55, US 84, US 85, US 86","2017-02 (Kona)","|Complete|","","" -"`P0607R0 <https://wg21.link/P0607R0>`__","Inline Variables for the Standard Library","2017-02 (Kona)","|In Progress|","6","The parts of P0607 that are not done are the ``<regex>`` bits" -"`P0618R0 <https://wg21.link/P0618R0>`__","Deprecating <codecvt>","2017-02 (Kona)","|Complete|","15","" -"`P0623R0 <https://wg21.link/P0623R0>`__","Final C++17 Parallel Algorithms Fixes","2017-02 (Kona)","|Nothing To Do|","","" +"`P0156R2 <https://wg21.link/P0156R2>`__","Variadic Lock guard(rev 5)","2017-02 (Kona)","|Complete|","5","`#103682 <https://github.com/llvm/llvm-project/issues/103682>`__","" +"`P0270R3 <https://wg21.link/P0270R3>`__","Removing C dependencies from signal handler wording","2017-02 (Kona)","|Nothing To Do|","","`#99946 <https://github.com/llvm/llvm-project/issues/99946>`__","" +"`P0298R3 <https://wg21.link/P0298R3>`__","A byte type definition","2017-02 (Kona)","|Complete|","5","`#103683 <https://github.com/llvm/llvm-project/issues/103683>`__","" +"`P0317R1 <https://wg21.link/P0317R1>`__","Directory Entry Caching for Filesystem","2017-02 (Kona)","|Complete|","7","`#103684 <https://github.com/llvm/llvm-project/issues/103684>`__","" +"`P0430R2 <https://wg21.link/P0430R2>`__","File system library on non-POSIX-like operating systems","2017-02 (Kona)","|Complete|","7","`#103685 <https://github.com/llvm/llvm-project/issues/103685>`__","" +"`P0433R2 <https://wg21.link/P0433R2>`__","Toward a resolution of US7 and US14: Integrating template deduction for class templates into the standard library","2017-02 (Kona)","|Complete|","14","`#103686 <https://github.com/llvm/llvm-project/issues/103686>`__","" +"`P0452R1 <https://wg21.link/P0452R1>`__","Unifying <numeric> Parallel Algorithms","2017-02 (Kona)","|Partial|","","`#99948 <https://github.com/llvm/llvm-project/issues/99948>`__","The changes to ``std::transform_inclusive_scan`` and ``std::transform_exclusive_scan`` have not yet been implemented." +"`P0467R2 <https://wg21.link/P0467R2>`__","Iterator Concerns for Parallel Algorithms","2017-02 (Kona)","|Partial|","","`#99949 <https://github.com/llvm/llvm-project/issues/99949>`__","" +"`P0492R2 <https://wg21.link/P0492R2>`__","Proposed Resolution of C++17 National Body Comments for Filesystems","2017-02 (Kona)","|Complete|","7","`#103687 <https://github.com/llvm/llvm-project/issues/103687>`__","" +"`P0518R1 <https://wg21.link/P0518R1>`__","Allowing copies as arguments to function objects given to parallel algorithms in response to CH11","2017-02 (Kona)","|Nothing To Do|","","`#103689 <https://github.com/llvm/llvm-project/issues/103689>`__","" +"`P0523R1 <https://wg21.link/P0523R1>`__","Wording for CH 10: Complexity of parallel algorithms","2017-02 (Kona)","|Nothing To Do|","","`#103690 <https://github.com/llvm/llvm-project/issues/103690>`__","" +"`P0548R1 <https://wg21.link/P0548R1>`__","common_type and duration","2017-02 (Kona)","|Complete|","5","`#103691 <https://github.com/llvm/llvm-project/issues/103691>`__","" +"`P0558R1 <https://wg21.link/P0558R1>`__","Resolving atomic<T> named base class inconsistencies","2017-02 (Kona)","|Complete|","","`#103693 <https://github.com/llvm/llvm-project/issues/103693>`__","" +"`P0574R1 <https://wg21.link/P0574R1>`__","Algorithm Complexity Constraints and Parallel Overloads","2017-02 (Kona)","|Nothing To Do|","","`#103694 <https://github.com/llvm/llvm-project/issues/103694>`__","" +"`P0599R1 <https://wg21.link/P0599R1>`__","noexcept for hash functions","2017-02 (Kona)","|Complete|","5","`#103695 <https://github.com/llvm/llvm-project/issues/103695>`__","" +"`P0604R0 <https://wg21.link/P0604R0>`__","Resolving GB 55, US 84, US 85, US 86","2017-02 (Kona)","|Complete|","","`#103696 <https://github.com/llvm/llvm-project/issues/103696>`__","" +"`P0607R0 <https://wg21.link/P0607R0>`__","Inline Variables for the Standard Library","2017-02 (Kona)","|In Progress|","6","`#99951 <https://github.com/llvm/llvm-project/issues/99951>`__","The parts of P0607 that are not done are the ``<regex>`` bits" +"`P0618R0 <https://wg21.link/P0618R0>`__","Deprecating <codecvt>","2017-02 (Kona)","|Complete|","15","`#103697 <https://github.com/llvm/llvm-project/issues/103697>`__","" +"`P0623R0 <https://wg21.link/P0623R0>`__","Final C++17 Parallel Algorithms Fixes","2017-02 (Kona)","|Nothing To Do|","","`#103698 <https://github.com/llvm/llvm-project/issues/103698>`__","" "","","","","","" -"`P0682R1 <https://wg21.link/P0682R1>`__","Repairing elementary string conversions","2017-07 (Toronto)","","","" -"`P0739R0 <https://wg21.link/P0739R0>`__","Some improvements to class template argument deduction integration into the standard library","2017-07 (Toronto)","|Complete|","5","" +"`P0682R1 <https://wg21.link/P0682R1>`__","Repairing elementary string conversions","2017-07 (Toronto)","","","`#99952 <https://github.com/llvm/llvm-project/issues/99952>`__","" +"`P0739R0 <https://wg21.link/P0739R0>`__","Some improvements to class template argument deduction integration into the standard library","2017-07 (Toronto)","|Complete|","5","`#103699 <https://github.com/llvm/llvm-project/issues/103699>`__","" diff --git a/libcxx/docs/Status/Cxx20Issues.csv b/libcxx/docs/Status/Cxx20Issues.csv index 98b49f92bdf7..646615b2d8d7 100644 --- a/libcxx/docs/Status/Cxx20Issues.csv +++ b/libcxx/docs/Status/Cxx20Issues.csv @@ -1,302 +1,302 @@ "Issue #","Issue Name","Meeting","Status","First released version","Notes" -"`LWG2070 <https://wg21.link/LWG2070>`__","``allocate_shared``\ should use ``allocator_traits<A>::construct``\ ","2017-07 (Toronto)","|Nothing To Do|","","Resolved by `P0674R1 <https://wg21.link/P0674R1>`__" -"`LWG2444 <https://wg21.link/LWG2444>`__","Inconsistent complexity for ``std::sort_heap``\ ","2017-07 (Toronto)","|Nothing To Do|","","" -"`LWG2593 <https://wg21.link/LWG2593>`__","Moved-from state of Allocators","2017-07 (Toronto)","|Nothing To Do|","","" -"`LWG2597 <https://wg21.link/LWG2597>`__","``std::log``\ misspecified for complex numbers","2017-07 (Toronto)","","","" -"`LWG2783 <https://wg21.link/LWG2783>`__","``stack::emplace()``\ and ``queue::emplace()``\ should return ``decltype(auto)``\ ","2017-07 (Toronto)","|Complete|","","" -"`LWG2932 <https://wg21.link/LWG2932>`__","Constraints on parallel algorithm implementations are underspecified","2017-07 (Toronto)","","","" -"`LWG2937 <https://wg21.link/LWG2937>`__","Is ``equivalent(""existing_thing"", ""not_existing_thing"")``\ an error","2017-07 (Toronto)","|Complete|","","" -"`LWG2940 <https://wg21.link/LWG2940>`__","``result_of``\ specification also needs a little cleanup","2017-07 (Toronto)","|Nothing To Do|","","" -"`LWG2942 <https://wg21.link/LWG2942>`__","LWG 2873's resolution missed ``weak_ptr::owner_before``\ ","2017-07 (Toronto)","|Complete|","","" -"`LWG2954 <https://wg21.link/LWG2954>`__","Specialization of the convenience variable templates should be prohibited","2017-07 (Toronto)","|Complete|","","" -"`LWG2961 <https://wg21.link/LWG2961>`__","Bad postcondition for ``set_default_resource``\ ","2017-07 (Toronto)","|Complete|","16","" -"`LWG2966 <https://wg21.link/LWG2966>`__","Incomplete resolution of US 74","2017-07 (Toronto)","|Nothing To Do|","","" -"`LWG2974 <https://wg21.link/LWG2974>`__","Diagnose out of bounds ``tuple_element/variant_alternative``\ ","2017-07 (Toronto)","|Complete|","","" +"`LWG2070 <https://wg21.link/LWG2070>`__","``allocate_shared``\ should use ``allocator_traits<A>::construct``\ ","2017-07 (Toronto)","|Nothing To Do|","","`#103733 <https://github.com/llvm/llvm-project/issues/103733>`__","Resolved by `P0674R1 <https://wg21.link/P0674R1>`__" +"`LWG2444 <https://wg21.link/LWG2444>`__","Inconsistent complexity for ``std::sort_heap``\ ","2017-07 (Toronto)","|Nothing To Do|","","`#103734 <https://github.com/llvm/llvm-project/issues/103734>`__","" +"`LWG2593 <https://wg21.link/LWG2593>`__","Moved-from state of Allocators","2017-07 (Toronto)","|Nothing To Do|","","`#100220 <https://github.com/llvm/llvm-project/issues/100220>`__","" +"`LWG2597 <https://wg21.link/LWG2597>`__","``std::log``\ misspecified for complex numbers","2017-07 (Toronto)","","","`#100221 <https://github.com/llvm/llvm-project/issues/100221>`__","" +"`LWG2783 <https://wg21.link/LWG2783>`__","``stack::emplace()``\ and ``queue::emplace()``\ should return ``decltype(auto)``\ ","2017-07 (Toronto)","|Complete|","","`#103735 <https://github.com/llvm/llvm-project/issues/103735>`__","" +"`LWG2932 <https://wg21.link/LWG2932>`__","Constraints on parallel algorithm implementations are underspecified","2017-07 (Toronto)","","","`#100222 <https://github.com/llvm/llvm-project/issues/100222>`__","" +"`LWG2937 <https://wg21.link/LWG2937>`__","Is ``equivalent(""existing_thing"", ""not_existing_thing"")``\ an error","2017-07 (Toronto)","|Complete|","","`#103736 <https://github.com/llvm/llvm-project/issues/103736>`__","" +"`LWG2940 <https://wg21.link/LWG2940>`__","``result_of``\ specification also needs a little cleanup","2017-07 (Toronto)","|Nothing To Do|","","`#103737 <https://github.com/llvm/llvm-project/issues/103737>`__","" +"`LWG2942 <https://wg21.link/LWG2942>`__","LWG 2873's resolution missed ``weak_ptr::owner_before``\ ","2017-07 (Toronto)","|Complete|","","`#103738 <https://github.com/llvm/llvm-project/issues/103738>`__","" +"`LWG2954 <https://wg21.link/LWG2954>`__","Specialization of the convenience variable templates should be prohibited","2017-07 (Toronto)","|Complete|","","`#103739 <https://github.com/llvm/llvm-project/issues/103739>`__","" +"`LWG2961 <https://wg21.link/LWG2961>`__","Bad postcondition for ``set_default_resource``\ ","2017-07 (Toronto)","|Complete|","16","`#103740 <https://github.com/llvm/llvm-project/issues/103740>`__","" +"`LWG2966 <https://wg21.link/LWG2966>`__","Incomplete resolution of US 74","2017-07 (Toronto)","|Nothing To Do|","","`#103741 <https://github.com/llvm/llvm-project/issues/103741>`__","" +"`LWG2974 <https://wg21.link/LWG2974>`__","Diagnose out of bounds ``tuple_element/variant_alternative``\ ","2017-07 (Toronto)","|Complete|","","`#103742 <https://github.com/llvm/llvm-project/issues/103742>`__","" "","","","","","" -"`LWG2779 <https://wg21.link/LWG2779>`__","[networking.ts] Relax requirements on buffer sequence iterators","2017-11 (Albuquerque)","|Nothing To Do|","","" -"`LWG2870 <https://wg21.link/LWG2870>`__","Default value of parameter theta of polar should be dependent","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2935 <https://wg21.link/LWG2935>`__","What should create_directories do when p already exists but is not a directory?","2017-11 (Albuquerque)","|Nothing To Do|","","" -"`LWG2941 <https://wg21.link/LWG2941>`__","[thread.req.timing] wording should apply to both member and namespace-level functions","2017-11 (Albuquerque)","|Nothing To Do|","","" -"`LWG2944 <https://wg21.link/LWG2944>`__","LWG 2905 accidentally removed requirement that construction of the deleter doesn't throw an exception","2017-11 (Albuquerque)","|Nothing To Do|","","" -"`LWG2945 <https://wg21.link/LWG2945>`__","Order of template parameters in optional comparisons","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2948 <https://wg21.link/LWG2948>`__","unique_ptr does not define operator<< for stream output","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2950 <https://wg21.link/LWG2950>`__","std::byte operations are misspecified","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2952 <https://wg21.link/LWG2952>`__","iterator_traits should work for pointers to cv T","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2953 <https://wg21.link/LWG2953>`__","LWG 2853 should apply to deque::erase too","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2958 <https://wg21.link/LWG2958>`__","Moves improperly defined as deleted","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2964 <https://wg21.link/LWG2964>`__","Apparently redundant requirement for dynamic_pointer_cast","2017-11 (Albuquerque)","","","" -"`LWG2965 <https://wg21.link/LWG2965>`__","Non-existing path::native_string() in filesystem_error::what() specification","2017-11 (Albuquerque)","|Nothing To Do|","","" -"`LWG2972 <https://wg21.link/LWG2972>`__","What is ``is_trivially_destructible_v<int>``\ ?","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2976 <https://wg21.link/LWG2976>`__","Dangling uses_allocator specialization for packaged_task","2017-11 (Albuquerque)","|Complete|","20","Originally implemented in LLVM 6 but reverted later. Old documentation incorrectly said it was implemented." -"`LWG2977 <https://wg21.link/LWG2977>`__","unordered_meow::merge() has incorrect Throws: clause","2017-11 (Albuquerque)","|Nothing To Do|","","" -"`LWG2978 <https://wg21.link/LWG2978>`__","Hash support for pmr::string and friends","2017-11 (Albuquerque)","|Complete|","16","" -"`LWG2979 <https://wg21.link/LWG2979>`__","aligned_union should require complete object types","2017-11 (Albuquerque)","|Complete|","","" -"`LWG2980 <https://wg21.link/LWG2980>`__","Cannot compare_exchange empty pointers","2017-11 (Albuquerque)","","","" -"`LWG2981 <https://wg21.link/LWG2981>`__","Remove redundant deduction guides from standard library","2017-11 (Albuquerque)","|Nothing To Do|","","" -"`LWG2982 <https://wg21.link/LWG2982>`__","Making size_type consistent in associative container deduction guides","2017-11 (Albuquerque)","","","" -"`LWG2988 <https://wg21.link/LWG2988>`__","Clause 32 cleanup missed one typename","2017-11 (Albuquerque)","|Complete|","13","" -"`LWG2993 <https://wg21.link/LWG2993>`__","reference_wrapper<T> conversion from T&&","2017-11 (Albuquerque)","|Complete|","13","" -"`LWG2998 <https://wg21.link/LWG2998>`__","Requirements on function objects passed to {``forward_``,}list-specific algorithms","2017-11 (Albuquerque)","|Nothing To Do|","","" -"`LWG3001 <https://wg21.link/LWG3001>`__","weak_ptr::element_type needs remove_extent_t","2017-11 (Albuquerque)","|Complete|","14","" -"`LWG3024 <https://wg21.link/LWG3024>`__","variant's copies must be deleted instead of disabled via SFINAE","2017-11 (Albuquerque)","|Complete|","","" +"`LWG2779 <https://wg21.link/LWG2779>`__","[networking.ts] Relax requirements on buffer sequence iterators","2017-11 (Albuquerque)","|Nothing To Do|","","`#100223 <https://github.com/llvm/llvm-project/issues/100223>`__","" +"`LWG2870 <https://wg21.link/LWG2870>`__","Default value of parameter theta of polar should be dependent","2017-11 (Albuquerque)","|Complete|","","`#103743 <https://github.com/llvm/llvm-project/issues/103743>`__","" +"`LWG2935 <https://wg21.link/LWG2935>`__","What should create_directories do when p already exists but is not a directory?","2017-11 (Albuquerque)","|Nothing To Do|","","`#103744 <https://github.com/llvm/llvm-project/issues/103744>`__","" +"`LWG2941 <https://wg21.link/LWG2941>`__","[thread.req.timing] wording should apply to both member and namespace-level functions","2017-11 (Albuquerque)","|Nothing To Do|","","`#103745 <https://github.com/llvm/llvm-project/issues/103745>`__","" +"`LWG2944 <https://wg21.link/LWG2944>`__","LWG 2905 accidentally removed requirement that construction of the deleter doesn't throw an exception","2017-11 (Albuquerque)","|Nothing To Do|","","`#103746 <https://github.com/llvm/llvm-project/issues/103746>`__","" +"`LWG2945 <https://wg21.link/LWG2945>`__","Order of template parameters in optional comparisons","2017-11 (Albuquerque)","|Complete|","","`#103747 <https://github.com/llvm/llvm-project/issues/103747>`__","" +"`LWG2948 <https://wg21.link/LWG2948>`__","unique_ptr does not define operator<< for stream output","2017-11 (Albuquerque)","|Complete|","","`#103748 <https://github.com/llvm/llvm-project/issues/103748>`__","" +"`LWG2950 <https://wg21.link/LWG2950>`__","std::byte operations are misspecified","2017-11 (Albuquerque)","|Complete|","","`#103749 <https://github.com/llvm/llvm-project/issues/103749>`__","" +"`LWG2952 <https://wg21.link/LWG2952>`__","iterator_traits should work for pointers to cv T","2017-11 (Albuquerque)","|Complete|","","`#103750 <https://github.com/llvm/llvm-project/issues/103750>`__","" +"`LWG2953 <https://wg21.link/LWG2953>`__","LWG 2853 should apply to deque::erase too","2017-11 (Albuquerque)","|Complete|","","`#103751 <https://github.com/llvm/llvm-project/issues/103751>`__","" +"`LWG2958 <https://wg21.link/LWG2958>`__","Moves improperly defined as deleted","2017-11 (Albuquerque)","|Complete|","","`#103752 <https://github.com/llvm/llvm-project/issues/103752>`__","" +"`LWG2964 <https://wg21.link/LWG2964>`__","Apparently redundant requirement for dynamic_pointer_cast","2017-11 (Albuquerque)","","","`#100224 <https://github.com/llvm/llvm-project/issues/100224>`__","" +"`LWG2965 <https://wg21.link/LWG2965>`__","Non-existing path::native_string() in filesystem_error::what() specification","2017-11 (Albuquerque)","|Nothing To Do|","","`#103753 <https://github.com/llvm/llvm-project/issues/103753>`__","" +"`LWG2972 <https://wg21.link/LWG2972>`__","What is ``is_trivially_destructible_v<int>``\ ?","2017-11 (Albuquerque)","|Complete|","","`#103754 <https://github.com/llvm/llvm-project/issues/103754>`__","" +"`LWG2976 <https://wg21.link/LWG2976>`__","Dangling uses_allocator specialization for packaged_task","2017-11 (Albuquerque)","|Complete|","20","`#103755 <https://github.com/llvm/llvm-project/issues/103755>`__","Originally implemented in LLVM 6 but reverted later. Old documentation incorrectly said it was implemented." +"`LWG2977 <https://wg21.link/LWG2977>`__","unordered_meow::merge() has incorrect Throws: clause","2017-11 (Albuquerque)","|Nothing To Do|","","`#103756 <https://github.com/llvm/llvm-project/issues/103756>`__","" +"`LWG2978 <https://wg21.link/LWG2978>`__","Hash support for pmr::string and friends","2017-11 (Albuquerque)","|Complete|","16","`#103757 <https://github.com/llvm/llvm-project/issues/103757>`__","" +"`LWG2979 <https://wg21.link/LWG2979>`__","aligned_union should require complete object types","2017-11 (Albuquerque)","|Complete|","","`#103758 <https://github.com/llvm/llvm-project/issues/103758>`__","" +"`LWG2980 <https://wg21.link/LWG2980>`__","Cannot compare_exchange empty pointers","2017-11 (Albuquerque)","","","`#100225 <https://github.com/llvm/llvm-project/issues/100225>`__","" +"`LWG2981 <https://wg21.link/LWG2981>`__","Remove redundant deduction guides from standard library","2017-11 (Albuquerque)","|Nothing To Do|","","`#103759 <https://github.com/llvm/llvm-project/issues/103759>`__","" +"`LWG2982 <https://wg21.link/LWG2982>`__","Making size_type consistent in associative container deduction guides","2017-11 (Albuquerque)","","","`#100226 <https://github.com/llvm/llvm-project/issues/100226>`__","" +"`LWG2988 <https://wg21.link/LWG2988>`__","Clause 32 cleanup missed one typename","2017-11 (Albuquerque)","|Complete|","13","`#103760 <https://github.com/llvm/llvm-project/issues/103760>`__","" +"`LWG2993 <https://wg21.link/LWG2993>`__","reference_wrapper<T> conversion from T&&","2017-11 (Albuquerque)","|Complete|","13","`#103761 <https://github.com/llvm/llvm-project/issues/103761>`__","" +"`LWG2998 <https://wg21.link/LWG2998>`__","Requirements on function objects passed to {``forward_``,}list-specific algorithms","2017-11 (Albuquerque)","|Nothing To Do|","","`#103762 <https://github.com/llvm/llvm-project/issues/103762>`__","" +"`LWG3001 <https://wg21.link/LWG3001>`__","weak_ptr::element_type needs remove_extent_t","2017-11 (Albuquerque)","|Complete|","14","`#103763 <https://github.com/llvm/llvm-project/issues/103763>`__","" +"`LWG3024 <https://wg21.link/LWG3024>`__","variant's copies must be deleted instead of disabled via SFINAE","2017-11 (Albuquerque)","|Complete|","","`#103764 <https://github.com/llvm/llvm-project/issues/103764>`__","" "","","","","","" -"`LWG2164 <https://wg21.link/LWG2164>`__","What are the semantics of ``vector.emplace(vector.begin(), vector.back())``\ ?","2018-03 (Jacksonville)","|Complete|","","" -"`LWG2243 <https://wg21.link/LWG2243>`__","``istream::putback``\ problem","2018-03 (Jacksonville)","|Complete|","","" -"`LWG2816 <https://wg21.link/LWG2816>`__","``resize_file``\ has impossible postcondition","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG2843 <https://wg21.link/LWG2843>`__","Unclear behavior of ``std::pmr::memory_resource::do_allocate()``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG2849 <https://wg21.link/LWG2849>`__","Why does ``!is_regular_file(from)``\ cause ``copy_file``\ to report a ""file already exists"" error?","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG2851 <https://wg21.link/LWG2851>`__","``std::filesystem``\ enum classes are now underspecified","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG2946 <https://wg21.link/LWG2946>`__","LWG 2758's resolution missed further corrections","2018-03 (Jacksonville)","|Complete|","","" -"`LWG2969 <https://wg21.link/LWG2969>`__","``polymorphic_allocator::construct()``\ shouldn't pass ``resource()``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG2975 <https://wg21.link/LWG2975>`__","Missing case for ``pair``\ construction in scoped and polymorphic allocators","2018-03 (Jacksonville)","","","" -"`LWG2989 <https://wg21.link/LWG2989>`__","``path``\ 's stream insertion operator lets you insert everything under the sun","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3000 <https://wg21.link/LWG3000>`__","``monotonic_memory_resource::do_is_equal``\ uses ``dynamic_cast``\ unnecessarily","2018-03 (Jacksonville)","|Complete|","16","" -"`LWG3002 <https://wg21.link/LWG3002>`__","[networking.ts] ``basic_socket_acceptor::is_open()``\ isn't ``noexcept``\ ","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG3004 <https://wg21.link/LWG3004>`__","|sect|\ [string.capacity] and |sect|\ [vector.capacity] should specify time complexity for ``capacity()``\ ","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG3005 <https://wg21.link/LWG3005>`__","Destruction order of arrays by ``make_shared/allocate_shared``\ only recommended?","2018-03 (Jacksonville)","","","" -"`LWG3007 <https://wg21.link/LWG3007>`__","``allocate_shared``\ should rebind allocator to *cv*-unqualified ``value_type``\ for construction","2018-03 (Jacksonville)","","","" -"`LWG3009 <https://wg21.link/LWG3009>`__","Including ``<string_view>``\ doesn't provide ``std::size/empty/data``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3010 <https://wg21.link/LWG3010>`__","[networking.ts] ``uses_executor``\ says ""if a type ``T::executor_type``\ exists""","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG3013 <https://wg21.link/LWG3013>`__","``(recursive_)directory_iterator``\ construction and traversal should not be ``noexcept``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3014 <https://wg21.link/LWG3014>`__","More ``noexcept``\ issues with filesystem operations","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3015 <https://wg21.link/LWG3015>`__","``copy_options::*unspecified*``\ underspecified","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG3017 <https://wg21.link/LWG3017>`__","``list splice``\ functions should use ``addressof``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3020 <https://wg21.link/LWG3020>`__","[networking.ts] Remove spurious nested ``value_type``\ buffer sequence requirement","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG3026 <https://wg21.link/LWG3026>`__","``filesystem::weakly_canonical``\ still defined in terms of ``canonical(p, base)``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3030 <https://wg21.link/LWG3030>`__","Who shall meet the requirements of ``try_lock``\ ?","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG3034 <https://wg21.link/LWG3034>`__","P0767R1 breaks previously-standard-layout types","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3035 <https://wg21.link/LWG3035>`__","``std::allocator``\ 's constructors should be ``constexpr``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3039 <https://wg21.link/LWG3039>`__","Unnecessary ``decay``\ in ``thread``\ and ``packaged_task``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3041 <https://wg21.link/LWG3041>`__","Unnecessary ``decay``\ in ``reference_wrapper``\ ","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3042 <https://wg21.link/LWG3042>`__","``is_literal_type_v``\ should be inline","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3043 <https://wg21.link/LWG3043>`__","Bogus postcondition for ``filesystem_error``\ constructor","2018-03 (Jacksonville)","|Complete|","","" -"`LWG3045 <https://wg21.link/LWG3045>`__","``atomic<floating-point>``\ doesn't have ``value_type``\ or ``difference_type``\ ","2018-03 (Jacksonville)","|Complete|","18","" -"`LWG3048 <https://wg21.link/LWG3048>`__","``transform_reduce(exec, first1, last1, first2, init)``\ discards execution policy","2018-03 (Jacksonville)","|Complete|","17","" -"`LWG3051 <https://wg21.link/LWG3051>`__","Floating point classifications were inadvertently changed in P0175","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`LWG3075 <https://wg21.link/LWG3075>`__","``basic_string``\ needs deduction guides from ``basic_string_view``\ ","2018-03 (Jacksonville)","|Complete|","","" +"`LWG2164 <https://wg21.link/LWG2164>`__","What are the semantics of ``vector.emplace(vector.begin(), vector.back())``\ ?","2018-03 (Jacksonville)","|Complete|","","`#103765 <https://github.com/llvm/llvm-project/issues/103765>`__","" +"`LWG2243 <https://wg21.link/LWG2243>`__","``istream::putback``\ problem","2018-03 (Jacksonville)","|Complete|","","`#103766 <https://github.com/llvm/llvm-project/issues/103766>`__","" +"`LWG2816 <https://wg21.link/LWG2816>`__","``resize_file``\ has impossible postcondition","2018-03 (Jacksonville)","|Nothing To Do|","","`#103770 <https://github.com/llvm/llvm-project/issues/103770>`__","" +"`LWG2843 <https://wg21.link/LWG2843>`__","Unclear behavior of ``std::pmr::memory_resource::do_allocate()``\ ","2018-03 (Jacksonville)","|Complete|","","`#103771 <https://github.com/llvm/llvm-project/issues/103771>`__","" +"`LWG2849 <https://wg21.link/LWG2849>`__","Why does ``!is_regular_file(from)``\ cause ``copy_file``\ to report a ""file already exists"" error?","2018-03 (Jacksonville)","|Nothing To Do|","","`#103772 <https://github.com/llvm/llvm-project/issues/103772>`__","" +"`LWG2851 <https://wg21.link/LWG2851>`__","``std::filesystem``\ enum classes are now underspecified","2018-03 (Jacksonville)","|Nothing To Do|","","`#103774 <https://github.com/llvm/llvm-project/issues/103774>`__","" +"`LWG2946 <https://wg21.link/LWG2946>`__","LWG 2758's resolution missed further corrections","2018-03 (Jacksonville)","|Complete|","","`#103775 <https://github.com/llvm/llvm-project/issues/103775>`__","" +"`LWG2969 <https://wg21.link/LWG2969>`__","``polymorphic_allocator::construct()``\ shouldn't pass ``resource()``\ ","2018-03 (Jacksonville)","|Complete|","","`#103776 <https://github.com/llvm/llvm-project/issues/103776>`__","" +"`LWG2975 <https://wg21.link/LWG2975>`__","Missing case for ``pair``\ construction in scoped and polymorphic allocators","2018-03 (Jacksonville)","","","`#100227 <https://github.com/llvm/llvm-project/issues/100227>`__","" +"`LWG2989 <https://wg21.link/LWG2989>`__","``path``\ 's stream insertion operator lets you insert everything under the sun","2018-03 (Jacksonville)","|Complete|","","`#103777 <https://github.com/llvm/llvm-project/issues/103777>`__","" +"`LWG3000 <https://wg21.link/LWG3000>`__","``monotonic_memory_resource::do_is_equal``\ uses ``dynamic_cast``\ unnecessarily","2018-03 (Jacksonville)","|Complete|","16","`#103778 <https://github.com/llvm/llvm-project/issues/103778>`__","" +"`LWG3002 <https://wg21.link/LWG3002>`__","[networking.ts] ``basic_socket_acceptor::is_open()``\ isn't ``noexcept``\ ","2018-03 (Jacksonville)","|Nothing To Do|","","`#100228 <https://github.com/llvm/llvm-project/issues/100228>`__","" +"`LWG3004 <https://wg21.link/LWG3004>`__","|sect|\ [string.capacity] and |sect|\ [vector.capacity] should specify time complexity for ``capacity()``\ ","2018-03 (Jacksonville)","|Nothing To Do|","","`#103779 <https://github.com/llvm/llvm-project/issues/103779>`__","" +"`LWG3005 <https://wg21.link/LWG3005>`__","Destruction order of arrays by ``make_shared/allocate_shared``\ only recommended?","2018-03 (Jacksonville)","","","`#100229 <https://github.com/llvm/llvm-project/issues/100229>`__","" +"`LWG3007 <https://wg21.link/LWG3007>`__","``allocate_shared``\ should rebind allocator to *cv*-unqualified ``value_type``\ for construction","2018-03 (Jacksonville)","","","`#100230 <https://github.com/llvm/llvm-project/issues/100230>`__","" +"`LWG3009 <https://wg21.link/LWG3009>`__","Including ``<string_view>``\ doesn't provide ``std::size/empty/data``\ ","2018-03 (Jacksonville)","|Complete|","","`#103780 <https://github.com/llvm/llvm-project/issues/103780>`__","" +"`LWG3010 <https://wg21.link/LWG3010>`__","[networking.ts] ``uses_executor``\ says ""if a type ``T::executor_type``\ exists""","2018-03 (Jacksonville)","|Nothing To Do|","","`#100231 <https://github.com/llvm/llvm-project/issues/100231>`__","" +"`LWG3013 <https://wg21.link/LWG3013>`__","``(recursive_)directory_iterator``\ construction and traversal should not be ``noexcept``\ ","2018-03 (Jacksonville)","|Complete|","","`#103781 <https://github.com/llvm/llvm-project/issues/103781>`__","" +"`LWG3014 <https://wg21.link/LWG3014>`__","More ``noexcept``\ issues with filesystem operations","2018-03 (Jacksonville)","|Complete|","","`#103782 <https://github.com/llvm/llvm-project/issues/103782>`__","" +"`LWG3015 <https://wg21.link/LWG3015>`__","``copy_options::*unspecified*``\ underspecified","2018-03 (Jacksonville)","|Nothing To Do|","","`#103783 <https://github.com/llvm/llvm-project/issues/103783>`__","" +"`LWG3017 <https://wg21.link/LWG3017>`__","``list splice``\ functions should use ``addressof``\ ","2018-03 (Jacksonville)","|Complete|","","`#103784 <https://github.com/llvm/llvm-project/issues/103784>`__","" +"`LWG3020 <https://wg21.link/LWG3020>`__","[networking.ts] Remove spurious nested ``value_type``\ buffer sequence requirement","2018-03 (Jacksonville)","|Nothing To Do|","","`#100232 <https://github.com/llvm/llvm-project/issues/100232>`__","" +"`LWG3026 <https://wg21.link/LWG3026>`__","``filesystem::weakly_canonical``\ still defined in terms of ``canonical(p, base)``\ ","2018-03 (Jacksonville)","|Complete|","","`#103785 <https://github.com/llvm/llvm-project/issues/103785>`__","" +"`LWG3030 <https://wg21.link/LWG3030>`__","Who shall meet the requirements of ``try_lock``\ ?","2018-03 (Jacksonville)","|Nothing To Do|","","`#103786 <https://github.com/llvm/llvm-project/issues/103786>`__","" +"`LWG3034 <https://wg21.link/LWG3034>`__","P0767R1 breaks previously-standard-layout types","2018-03 (Jacksonville)","|Complete|","","`#103787 <https://github.com/llvm/llvm-project/issues/103787>`__","" +"`LWG3035 <https://wg21.link/LWG3035>`__","``std::allocator``\ 's constructors should be ``constexpr``\ ","2018-03 (Jacksonville)","|Complete|","","`#103788 <https://github.com/llvm/llvm-project/issues/103788>`__","" +"`LWG3039 <https://wg21.link/LWG3039>`__","Unnecessary ``decay``\ in ``thread``\ and ``packaged_task``\ ","2018-03 (Jacksonville)","|Complete|","","`#103789 <https://github.com/llvm/llvm-project/issues/103789>`__","" +"`LWG3041 <https://wg21.link/LWG3041>`__","Unnecessary ``decay``\ in ``reference_wrapper``\ ","2018-03 (Jacksonville)","|Complete|","","`#103790 <https://github.com/llvm/llvm-project/issues/103790>`__","" +"`LWG3042 <https://wg21.link/LWG3042>`__","``is_literal_type_v``\ should be inline","2018-03 (Jacksonville)","|Complete|","","`#103791 <https://github.com/llvm/llvm-project/issues/103791>`__","" +"`LWG3043 <https://wg21.link/LWG3043>`__","Bogus postcondition for ``filesystem_error``\ constructor","2018-03 (Jacksonville)","|Complete|","","`#103792 <https://github.com/llvm/llvm-project/issues/103792>`__","" +"`LWG3045 <https://wg21.link/LWG3045>`__","``atomic<floating-point>``\ doesn't have ``value_type``\ or ``difference_type``\ ","2018-03 (Jacksonville)","|Complete|","18","`#103793 <https://github.com/llvm/llvm-project/issues/103793>`__","" +"`LWG3048 <https://wg21.link/LWG3048>`__","``transform_reduce(exec, first1, last1, first2, init)``\ discards execution policy","2018-03 (Jacksonville)","|Complete|","17","`#103794 <https://github.com/llvm/llvm-project/issues/103794>`__","" +"`LWG3051 <https://wg21.link/LWG3051>`__","Floating point classifications were inadvertently changed in P0175","2018-03 (Jacksonville)","|Nothing To Do|","","`#103795 <https://github.com/llvm/llvm-project/issues/103795>`__","" +"`LWG3075 <https://wg21.link/LWG3075>`__","``basic_string``\ needs deduction guides from ``basic_string_view``\ ","2018-03 (Jacksonville)","|Complete|","","`#103796 <https://github.com/llvm/llvm-project/issues/103796>`__","" "","","","","","" -"`LWG2139 <https://wg21.link/LWG2139>`__","What is a user-defined type?","2018-06 (Rapperswil)","","","" -"`LWG2970 <https://wg21.link/LWG2970>`__","Return type of std::visit misspecified","2018-06 (Rapperswil)","|Complete|","11","" -"`LWG3058 <https://wg21.link/LWG3058>`__","Parallel adjacent_difference shouldn't require creating temporaries","2018-06 (Rapperswil)","","","" -"`LWG3062 <https://wg21.link/LWG3062>`__","Unnecessary decay_t in is_execution_policy_v should be remove_cvref_t","2018-06 (Rapperswil)","|Complete|","17","" -"`LWG3067 <https://wg21.link/LWG3067>`__","recursive_directory_iterator::pop must invalidate","2018-06 (Rapperswil)","|Nothing To Do|","","" -"`LWG3071 <https://wg21.link/LWG3071>`__","[networking.ts] read_until still refers to ""input sequence""","2018-06 (Rapperswil)","|Nothing To Do|","","" -"`LWG3074 <https://wg21.link/LWG3074>`__","Non-member functions for valarray should only deduce from the valarray","2018-06 (Rapperswil)","","","" -"`LWG3076 <https://wg21.link/LWG3076>`__","basic_string CTAD ambiguity","2018-06 (Rapperswil)","|Complete|","","" -"`LWG3079 <https://wg21.link/LWG3079>`__","LWG 2935 forgot to fix the existing_p overloads of create_directory","2018-06 (Rapperswil)","|Nothing To Do|","","" -"`LWG3080 <https://wg21.link/LWG3080>`__","Floating point from_chars pattern specification breaks round-tripping","2018-06 (Rapperswil)","","","" -"`LWG3083 <https://wg21.link/LWG3083>`__","What should ios::iword(-1) do?","2018-06 (Rapperswil)","|Nothing To Do|","","" -"`LWG3094 <https://wg21.link/LWG3094>`__","[time.duration.io]p4 makes surprising claims about encoding","2018-06 (Rapperswil)","","","" -"`LWG3100 <https://wg21.link/LWG3100>`__","Unnecessary and confusing ""empty span"" wording","2018-06 (Rapperswil)","|Nothing To Do|","","" -"`LWG3102 <https://wg21.link/LWG3102>`__","Clarify span iterator and ``const_iterator`` behavior","2018-06 (Rapperswil)","|Complete|","","" -"`LWG3104 <https://wg21.link/LWG3104>`__","Fixing duration division","2018-06 (Rapperswil)","|Complete|","","" +"`LWG2139 <https://wg21.link/LWG2139>`__","What is a user-defined type?","2018-06 (Rapperswil)","","","`#100233 <https://github.com/llvm/llvm-project/issues/100233>`__","" +"`LWG2970 <https://wg21.link/LWG2970>`__","Return type of std::visit misspecified","2018-06 (Rapperswil)","|Complete|","11","`#103797 <https://github.com/llvm/llvm-project/issues/103797>`__","" +"`LWG3058 <https://wg21.link/LWG3058>`__","Parallel adjacent_difference shouldn't require creating temporaries","2018-06 (Rapperswil)","","","`#100234 <https://github.com/llvm/llvm-project/issues/100234>`__","" +"`LWG3062 <https://wg21.link/LWG3062>`__","Unnecessary decay_t in is_execution_policy_v should be remove_cvref_t","2018-06 (Rapperswil)","|Complete|","17","`#100235 <https://github.com/llvm/llvm-project/issues/100235>`__","" +"`LWG3067 <https://wg21.link/LWG3067>`__","recursive_directory_iterator::pop must invalidate","2018-06 (Rapperswil)","|Nothing To Do|","","`#103798 <https://github.com/llvm/llvm-project/issues/103798>`__","" +"`LWG3071 <https://wg21.link/LWG3071>`__","[networking.ts] read_until still refers to ""input sequence""","2018-06 (Rapperswil)","|Nothing To Do|","","`#103799 <https://github.com/llvm/llvm-project/issues/103799>`__","" +"`LWG3074 <https://wg21.link/LWG3074>`__","Non-member functions for valarray should only deduce from the valarray","2018-06 (Rapperswil)","","","`#100236 <https://github.com/llvm/llvm-project/issues/100236>`__","" +"`LWG3076 <https://wg21.link/LWG3076>`__","basic_string CTAD ambiguity","2018-06 (Rapperswil)","|Complete|","","`#103800 <https://github.com/llvm/llvm-project/issues/103800>`__","" +"`LWG3079 <https://wg21.link/LWG3079>`__","LWG 2935 forgot to fix the existing_p overloads of create_directory","2018-06 (Rapperswil)","|Nothing To Do|","","`#103801 <https://github.com/llvm/llvm-project/issues/103801>`__","" +"`LWG3080 <https://wg21.link/LWG3080>`__","Floating point from_chars pattern specification breaks round-tripping","2018-06 (Rapperswil)","","","`#100237 <https://github.com/llvm/llvm-project/issues/100237>`__","" +"`LWG3083 <https://wg21.link/LWG3083>`__","What should ios::iword(-1) do?","2018-06 (Rapperswil)","|Nothing To Do|","","`#103802 <https://github.com/llvm/llvm-project/issues/103802>`__","" +"`LWG3094 <https://wg21.link/LWG3094>`__","[time.duration.io]p4 makes surprising claims about encoding","2018-06 (Rapperswil)","","","`#100238 <https://github.com/llvm/llvm-project/issues/100238>`__","" +"`LWG3100 <https://wg21.link/LWG3100>`__","Unnecessary and confusing ""empty span"" wording","2018-06 (Rapperswil)","|Nothing To Do|","","`#103803 <https://github.com/llvm/llvm-project/issues/103803>`__","" +"`LWG3102 <https://wg21.link/LWG3102>`__","Clarify span iterator and ``const_iterator`` behavior","2018-06 (Rapperswil)","|Complete|","","`#103804 <https://github.com/llvm/llvm-project/issues/103804>`__","" +"`LWG3104 <https://wg21.link/LWG3104>`__","Fixing duration division","2018-06 (Rapperswil)","|Complete|","","`#103805 <https://github.com/llvm/llvm-project/issues/103805>`__","" "","","","","","" -"`LWG2183 <https://wg21.link/LWG2183>`__","Muddled allocator requirements for ``match_results``\ constructors","2018-11 (San Diego)","|Complete|","","" -"`LWG2184 <https://wg21.link/LWG2184>`__","Muddled allocator requirements for ``match_results``\ assignments","2018-11 (San Diego)","|Complete|","","" -"`LWG2412 <https://wg21.link/LWG2412>`__","``promise::set_value()``\ and ``promise::get_future()``\ should not race","2018-11 (San Diego)","","","" -"`LWG2499 <https://wg21.link/LWG2499>`__","``operator>>(basic_istream&, CharT*)``\ makes it hard to avoid buffer overflows","2018-11 (San Diego)","|Nothing To Do|","","Resolved by `P0487R1 <https://wg21.link/P0487R1>`__" -"`LWG2682 <https://wg21.link/LWG2682>`__","``filesystem::copy()``\ won't create a symlink to a directory","2018-11 (San Diego)","|Nothing To Do|","","" -"`LWG2697 <https://wg21.link/LWG2697>`__","[concurr.ts] Behavior of ``future/shared_future``\ unwrapping constructor when given an invalid ``future``\ ","2018-11 (San Diego)","","","" -"`LWG2797 <https://wg21.link/LWG2797>`__","Trait precondition violations","2018-11 (San Diego)","|Nothing To Do|","","Resolved by `P1285R0 <https://wg21.link/P1285R0>`__" -"`LWG2936 <https://wg21.link/LWG2936>`__","Path comparison is defined in terms of the generic format","2018-11 (San Diego)","|Complete|","","" -"`LWG2943 <https://wg21.link/LWG2943>`__","Problematic specification of the wide version of ``basic_filebuf::open``\ ","2018-11 (San Diego)","|Nothing To Do|","","" -"`LWG2960 <https://wg21.link/LWG2960>`__","[fund.ts.v3] ``nonesuch``\ is insufficiently useless","2018-11 (San Diego)","|Complete|","","" -"`LWG2995 <https://wg21.link/LWG2995>`__","``basic_stringbuf``\ default constructor forbids it from using SSO capacity","2018-11 (San Diego)","|Complete|","20","" -"`LWG2996 <https://wg21.link/LWG2996>`__","Missing rvalue overloads for ``shared_ptr``\ operations","2018-11 (San Diego)","|Complete|","17","" -"`LWG3008 <https://wg21.link/LWG3008>`__","``make_shared``\ (sub)object destruction semantics are not specified","2018-11 (San Diego)","|Complete|","16","" -"`LWG3022 <https://wg21.link/LWG3022>`__","``is_convertible<derived*, base*>``\ may lead to ODR","2018-11 (San Diego)","|Nothing To Do|","","Resolved by `P1285R0 <https://wg21.link/P1285R0>`__" -"`LWG3025 <https://wg21.link/LWG3025>`__","Map-like container deduction guides should use ``pair<Key, T>``\ , not ``pair<const Key, T>``\ ","2018-11 (San Diego)","|Complete|","","" -"`LWG3031 <https://wg21.link/LWG3031>`__","Algorithms and predicates with non-const reference arguments","2018-11 (San Diego)","","","" -"`LWG3037 <https://wg21.link/LWG3037>`__","``polymorphic_allocator``\ and incomplete types","2018-11 (San Diego)","|Complete|","16","" -"`LWG3038 <https://wg21.link/LWG3038>`__","``polymorphic_allocator::allocate``\ should not allow integer overflow to create vulnerabilities","2018-11 (San Diego)","|Complete|","14","" -"`LWG3054 <https://wg21.link/LWG3054>`__","``uninitialized_copy``\ appears to not be able to meet its exception-safety guarantee","2018-11 (San Diego)","|Nothing To Do|","","" -"`LWG3065 <https://wg21.link/LWG3065>`__","LWG 2989 missed that all ``path``\ 's other operators should be hidden friends as well","2018-11 (San Diego)","|Complete|","","" -"`LWG3096 <https://wg21.link/LWG3096>`__","``path::lexically_relative``\ is confused by trailing slashes","2018-11 (San Diego)","|Complete|","","" -"`LWG3116 <https://wg21.link/LWG3116>`__","``OUTERMOST_ALLOC_TRAITS``\ needs ``remove_reference_t``\ ","2018-11 (San Diego)","","","" -"`LWG3122 <https://wg21.link/LWG3122>`__","``__cpp_lib_chrono_udls``\ was accidentally dropped","2018-11 (San Diego)","|Complete|","","" -"`LWG3127 <https://wg21.link/LWG3127>`__","``basic_osyncstream::rdbuf``\ needs a ``const_cast``\ ","2018-11 (San Diego)","|Complete|","18","" -"`LWG3128 <https://wg21.link/LWG3128>`__","``strstream::rdbuf``\ needs a ``const_cast``\ ","2018-11 (San Diego)","|Nothing To Do|","","" -"`LWG3129 <https://wg21.link/LWG3129>`__","``regex_token_iterator``\ constructor uses wrong pointer arithmetic","2018-11 (San Diego)","","","" -"`LWG3130 <https://wg21.link/LWG3130>`__","|sect|\ [input.output] needs many ``addressof``\ ","2018-11 (San Diego)","|Complete|","20","" -"`LWG3131 <https://wg21.link/LWG3131>`__","``addressof``\ all the things","2018-11 (San Diego)","","","" -"`LWG3132 <https://wg21.link/LWG3132>`__","Library needs to ban macros named ``expects``\ or ``ensures``\ ","2018-11 (San Diego)","|Nothing To Do|","","" -"`LWG3134 <https://wg21.link/LWG3134>`__","[fund.ts.v3] LFTSv3 contains extraneous [meta] variable templates that should have been deleted by P09961","2018-11 (San Diego)","|Nothing To Do|","","Resolved by `P1210R0 <https://wg21.link/P1210R0>`__" -"`LWG3137 <https://wg21.link/LWG3137>`__","Header for ``__cpp_lib_to_chars``\ ","2018-11 (San Diego)","|Complete|","","" -"`LWG3140 <https://wg21.link/LWG3140>`__","``COMMON_REF``\ is unimplementable as specified","2018-11 (San Diego)","|Nothing To Do|","","" -"`LWG3145 <https://wg21.link/LWG3145>`__","``file_clock``\ breaks ABI for C++17 implementations","2018-11 (San Diego)","|Complete|","","" -"`LWG3147 <https://wg21.link/LWG3147>`__","Definitions of ""likely"" and ""unlikely"" are likely to cause problems","2018-11 (San Diego)","|Nothing To Do|","","" -"`LWG3148 <https://wg21.link/LWG3148>`__","``<concepts>``\ should be freestanding","2018-11 (San Diego)","","","" -"`LWG3153 <https://wg21.link/LWG3153>`__","``Common``\ and ``common_type``\ have too little in common","2018-11 (San Diego)","|Complete|","13","" -"`LWG3154 <https://wg21.link/LWG3154>`__","``Common``\ and ``CommonReference``\ have a common defect","2018-11 (San Diego)","|Nothing To Do|","","" +"`LWG2183 <https://wg21.link/LWG2183>`__","Muddled allocator requirements for ``match_results``\ constructors","2018-11 (San Diego)","|Complete|","","`#103806 <https://github.com/llvm/llvm-project/issues/103806>`__","" +"`LWG2184 <https://wg21.link/LWG2184>`__","Muddled allocator requirements for ``match_results``\ assignments","2018-11 (San Diego)","|Complete|","","`#103807 <https://github.com/llvm/llvm-project/issues/103807>`__","" +"`LWG2412 <https://wg21.link/LWG2412>`__","``promise::set_value()``\ and ``promise::get_future()``\ should not race","2018-11 (San Diego)","","","`#100239 <https://github.com/llvm/llvm-project/issues/100239>`__","" +"`LWG2499 <https://wg21.link/LWG2499>`__","``operator>>(basic_istream&, CharT*)``\ makes it hard to avoid buffer overflows","2018-11 (San Diego)","|Nothing To Do|","","`#103808 <https://github.com/llvm/llvm-project/issues/103808>`__","Resolved by `P0487R1 <https://wg21.link/P0487R1>`__" +"`LWG2682 <https://wg21.link/LWG2682>`__","``filesystem::copy()``\ won't create a symlink to a directory","2018-11 (San Diego)","|Nothing To Do|","","`#103504 <https://github.com/llvm/llvm-project/issues/103504>`__","" +"`LWG2697 <https://wg21.link/LWG2697>`__","[concurr.ts] Behavior of ``future/shared_future``\ unwrapping constructor when given an invalid ``future``\ ","2018-11 (San Diego)","","","`#100240 <https://github.com/llvm/llvm-project/issues/100240>`__","" +"`LWG2797 <https://wg21.link/LWG2797>`__","Trait precondition violations","2018-11 (San Diego)","|Nothing To Do|","","`#103809 <https://github.com/llvm/llvm-project/issues/103809>`__","Resolved by `P1285R0 <https://wg21.link/P1285R0>`__" +"`LWG2936 <https://wg21.link/LWG2936>`__","Path comparison is defined in terms of the generic format","2018-11 (San Diego)","|Complete|","","`#103810 <https://github.com/llvm/llvm-project/issues/103810>`__","" +"`LWG2943 <https://wg21.link/LWG2943>`__","Problematic specification of the wide version of ``basic_filebuf::open``\ ","2018-11 (San Diego)","|Nothing To Do|","","`#103811 <https://github.com/llvm/llvm-project/issues/103811>`__","" +"`LWG2960 <https://wg21.link/LWG2960>`__","[fund.ts.v3] ``nonesuch``\ is insufficiently useless","2018-11 (San Diego)","|Complete|","","`#103812 <https://github.com/llvm/llvm-project/issues/103812>`__","" +"`LWG2995 <https://wg21.link/LWG2995>`__","``basic_stringbuf``\ default constructor forbids it from using SSO capacity","2018-11 (San Diego)","|Complete|","20","`#100242 <https://github.com/llvm/llvm-project/issues/100242>`__","" +"`LWG2996 <https://wg21.link/LWG2996>`__","Missing rvalue overloads for ``shared_ptr``\ operations","2018-11 (San Diego)","|Complete|","17","`#103813 <https://github.com/llvm/llvm-project/issues/103813>`__","" +"`LWG3008 <https://wg21.link/LWG3008>`__","``make_shared``\ (sub)object destruction semantics are not specified","2018-11 (San Diego)","|Complete|","16","`#103814 <https://github.com/llvm/llvm-project/issues/103814>`__","" +"`LWG3022 <https://wg21.link/LWG3022>`__","``is_convertible<derived*, base*>``\ may lead to ODR","2018-11 (San Diego)","|Nothing To Do|","","`#103815 <https://github.com/llvm/llvm-project/issues/103815>`__","Resolved by `P1285R0 <https://wg21.link/P1285R0>`__" +"`LWG3025 <https://wg21.link/LWG3025>`__","Map-like container deduction guides should use ``pair<Key, T>``\ , not ``pair<const Key, T>``\ ","2018-11 (San Diego)","|Complete|","","`#103817 <https://github.com/llvm/llvm-project/issues/103817>`__","" +"`LWG3031 <https://wg21.link/LWG3031>`__","Algorithms and predicates with non-const reference arguments","2018-11 (San Diego)","","","`#100243 <https://github.com/llvm/llvm-project/issues/100243>`__","" +"`LWG3037 <https://wg21.link/LWG3037>`__","``polymorphic_allocator``\ and incomplete types","2018-11 (San Diego)","|Complete|","16","`#103818 <https://github.com/llvm/llvm-project/issues/103818>`__","" +"`LWG3038 <https://wg21.link/LWG3038>`__","``polymorphic_allocator::allocate``\ should not allow integer overflow to create vulnerabilities","2018-11 (San Diego)","|Complete|","14","`#103819 <https://github.com/llvm/llvm-project/issues/103819>`__","" +"`LWG3054 <https://wg21.link/LWG3054>`__","``uninitialized_copy``\ appears to not be able to meet its exception-safety guarantee","2018-11 (San Diego)","|Nothing To Do|","","`#103820 <https://github.com/llvm/llvm-project/issues/103820>`__","" +"`LWG3065 <https://wg21.link/LWG3065>`__","LWG 2989 missed that all ``path``\ 's other operators should be hidden friends as well","2018-11 (San Diego)","|Complete|","","`#103821 <https://github.com/llvm/llvm-project/issues/103821>`__","" +"`LWG3096 <https://wg21.link/LWG3096>`__","``path::lexically_relative``\ is confused by trailing slashes","2018-11 (San Diego)","|Complete|","","`#103822 <https://github.com/llvm/llvm-project/issues/103822>`__","" +"`LWG3116 <https://wg21.link/LWG3116>`__","``OUTERMOST_ALLOC_TRAITS``\ needs ``remove_reference_t``\ ","2018-11 (San Diego)","","","`#100244 <https://github.com/llvm/llvm-project/issues/100244>`__","" +"`LWG3122 <https://wg21.link/LWG3122>`__","``__cpp_lib_chrono_udls``\ was accidentally dropped","2018-11 (San Diego)","|Complete|","","`#103823 <https://github.com/llvm/llvm-project/issues/103823>`__","" +"`LWG3127 <https://wg21.link/LWG3127>`__","``basic_osyncstream::rdbuf``\ needs a ``const_cast``\ ","2018-11 (San Diego)","|Complete|","18","`#103824 <https://github.com/llvm/llvm-project/issues/103824>`__","" +"`LWG3128 <https://wg21.link/LWG3128>`__","``strstream::rdbuf``\ needs a ``const_cast``\ ","2018-11 (San Diego)","|Nothing To Do|","","`#103825 <https://github.com/llvm/llvm-project/issues/103825>`__","" +"`LWG3129 <https://wg21.link/LWG3129>`__","``regex_token_iterator``\ constructor uses wrong pointer arithmetic","2018-11 (San Diego)","","","`#100245 <https://github.com/llvm/llvm-project/issues/100245>`__","" +"`LWG3130 <https://wg21.link/LWG3130>`__","|sect|\ [input.output] needs many ``addressof``\ ","2018-11 (San Diego)","|Complete|","20","`#100246 <https://github.com/llvm/llvm-project/issues/100246>`__","" +"`LWG3131 <https://wg21.link/LWG3131>`__","``addressof``\ all the things","2018-11 (San Diego)","","","`#100248 <https://github.com/llvm/llvm-project/issues/100248>`__","" +"`LWG3132 <https://wg21.link/LWG3132>`__","Library needs to ban macros named ``expects``\ or ``ensures``\ ","2018-11 (San Diego)","|Nothing To Do|","","`#103826 <https://github.com/llvm/llvm-project/issues/103826>`__","" +"`LWG3134 <https://wg21.link/LWG3134>`__","[fund.ts.v3] LFTSv3 contains extraneous [meta] variable templates that should have been deleted by P09961","2018-11 (San Diego)","|Nothing To Do|","","`#103827 <https://github.com/llvm/llvm-project/issues/103827>`__","Resolved by `P1210R0 <https://wg21.link/P1210R0>`__" +"`LWG3137 <https://wg21.link/LWG3137>`__","Header for ``__cpp_lib_to_chars``\ ","2018-11 (San Diego)","|Complete|","","`#103828 <https://github.com/llvm/llvm-project/issues/103828>`__","" +"`LWG3140 <https://wg21.link/LWG3140>`__","``COMMON_REF``\ is unimplementable as specified","2018-11 (San Diego)","|Nothing To Do|","","`#103829 <https://github.com/llvm/llvm-project/issues/103829>`__","" +"`LWG3145 <https://wg21.link/LWG3145>`__","``file_clock``\ breaks ABI for C++17 implementations","2018-11 (San Diego)","|Complete|","","`#103830 <https://github.com/llvm/llvm-project/issues/103830>`__","" +"`LWG3147 <https://wg21.link/LWG3147>`__","Definitions of ""likely"" and ""unlikely"" are likely to cause problems","2018-11 (San Diego)","|Nothing To Do|","","`#100249 <https://github.com/llvm/llvm-project/issues/100249>`__","" +"`LWG3148 <https://wg21.link/LWG3148>`__","``<concepts>``\ should be freestanding","2018-11 (San Diego)","","","`#100250 <https://github.com/llvm/llvm-project/issues/100250>`__","" +"`LWG3153 <https://wg21.link/LWG3153>`__","``Common``\ and ``common_type``\ have too little in common","2018-11 (San Diego)","|Complete|","13","`#103831 <https://github.com/llvm/llvm-project/issues/103831>`__","" +"`LWG3154 <https://wg21.link/LWG3154>`__","``Common``\ and ``CommonReference``\ have a common defect","2018-11 (San Diego)","|Nothing To Do|","","`#103832 <https://github.com/llvm/llvm-project/issues/103832>`__","" "","","","","","" -"`LWG3012 <https://wg21.link/LWG3012>`__","``atomic<T>``\ is unimplementable for non-``is_trivially_copy_constructible T``\ ","2019-02 (Kona)","","","" -"`LWG3040 <https://wg21.link/LWG3040>`__","``basic_string_view::starts_with``\ *Effects* are incorrect","2019-02 (Kona)","|Complete|","","" -"`LWG3077 <https://wg21.link/LWG3077>`__","``(push|emplace)_back``\ should invalidate the ``end``\ iterator","2019-02 (Kona)","|Nothing To Do|","","" -"`LWG3087 <https://wg21.link/LWG3087>`__","One final ``&x``\ in |sect|\ [list.ops]","2019-02 (Kona)","|Nothing To Do|","","" -"`LWG3101 <https://wg21.link/LWG3101>`__","``span``\ 's ``Container``\ constructors need another constraint","2019-02 (Kona)","|Complete|","","" -"`LWG3112 <https://wg21.link/LWG3112>`__","``system_error``\ and ``filesystem_error``\ constructors taking a ``string``\ may not be able to meet their postconditions","2019-02 (Kona)","|Nothing To Do|","","" -"`LWG3119 <https://wg21.link/LWG3119>`__","Program-definedness of closure types","2019-02 (Kona)","|Nothing To Do|","","" -"`LWG3133 <https://wg21.link/LWG3133>`__","Modernizing numeric type requirements","2019-02 (Kona)","","","" -"`LWG3144 <https://wg21.link/LWG3144>`__","``span``\ does not have a ``const_pointer``\ typedef","2019-02 (Kona)","|Complete|","","" -"`LWG3173 <https://wg21.link/LWG3173>`__","Enable CTAD for ``ref-view``\ ","2019-02 (Kona)","|Complete|","15","" -"`LWG3179 <https://wg21.link/LWG3179>`__","``subrange``\ should always model ``Range``\ ","2019-02 (Kona)","|Nothing To Do|","","" -"`LWG3180 <https://wg21.link/LWG3180>`__","Inconsistently named return type for ``ranges::minmax_element``\ ","2019-02 (Kona)","|Complete|","15","" -"`LWG3182 <https://wg21.link/LWG3182>`__","Specification of ``Same``\ could be clearer","2019-02 (Kona)","|Complete|","15","" +"`LWG3012 <https://wg21.link/LWG3012>`__","``atomic<T>``\ is unimplementable for non-``is_trivially_copy_constructible T``\ ","2019-02 (Kona)","","","`#100252 <https://github.com/llvm/llvm-project/issues/100252>`__","" +"`LWG3040 <https://wg21.link/LWG3040>`__","``basic_string_view::starts_with``\ *Effects* are incorrect","2019-02 (Kona)","|Complete|","","`#103834 <https://github.com/llvm/llvm-project/issues/103834>`__","" +"`LWG3077 <https://wg21.link/LWG3077>`__","``(push|emplace)_back``\ should invalidate the ``end``\ iterator","2019-02 (Kona)","|Nothing To Do|","","`#103835 <https://github.com/llvm/llvm-project/issues/103835>`__","" +"`LWG3087 <https://wg21.link/LWG3087>`__","One final ``&x``\ in |sect|\ [list.ops]","2019-02 (Kona)","|Nothing To Do|","","`#103836 <https://github.com/llvm/llvm-project/issues/103836>`__","" +"`LWG3101 <https://wg21.link/LWG3101>`__","``span``\ 's ``Container``\ constructors need another constraint","2019-02 (Kona)","|Complete|","","`#103837 <https://github.com/llvm/llvm-project/issues/103837>`__","" +"`LWG3112 <https://wg21.link/LWG3112>`__","``system_error``\ and ``filesystem_error``\ constructors taking a ``string``\ may not be able to meet their postconditions","2019-02 (Kona)","|Nothing To Do|","","`#100253 <https://github.com/llvm/llvm-project/issues/100253>`__","" +"`LWG3119 <https://wg21.link/LWG3119>`__","Program-definedness of closure types","2019-02 (Kona)","|Nothing To Do|","","`#103838 <https://github.com/llvm/llvm-project/issues/103838>`__","" +"`LWG3133 <https://wg21.link/LWG3133>`__","Modernizing numeric type requirements","2019-02 (Kona)","","","`#100254 <https://github.com/llvm/llvm-project/issues/100254>`__","" +"`LWG3144 <https://wg21.link/LWG3144>`__","``span``\ does not have a ``const_pointer``\ typedef","2019-02 (Kona)","|Complete|","","`#103839 <https://github.com/llvm/llvm-project/issues/103839>`__","" +"`LWG3173 <https://wg21.link/LWG3173>`__","Enable CTAD for ``ref-view``\ ","2019-02 (Kona)","|Complete|","15","`#103840 <https://github.com/llvm/llvm-project/issues/103840>`__","" +"`LWG3179 <https://wg21.link/LWG3179>`__","``subrange``\ should always model ``Range``\ ","2019-02 (Kona)","|Nothing To Do|","","`#103842 <https://github.com/llvm/llvm-project/issues/103842>`__","" +"`LWG3180 <https://wg21.link/LWG3180>`__","Inconsistently named return type for ``ranges::minmax_element``\ ","2019-02 (Kona)","|Complete|","15","`#103844 <https://github.com/llvm/llvm-project/issues/103844>`__","" +"`LWG3182 <https://wg21.link/LWG3182>`__","Specification of ``Same``\ could be clearer","2019-02 (Kona)","|Complete|","15","`#103845 <https://github.com/llvm/llvm-project/issues/103845>`__","" "","","","","","" -"`LWG2899 <https://wg21.link/LWG2899>`__","``is_(nothrow_)move_constructible``\ and ``tuple``\ , ``optional``\ and ``unique_ptr``\ ","2019-07 (Cologne)","","","" -"`LWG3055 <https://wg21.link/LWG3055>`__","``path::operator+=(*single-character*)``\ misspecified","2019-07 (Cologne)","|Complete|","7","" -"`LWG3158 <https://wg21.link/LWG3158>`__","``tuple(allocator_arg_t, const Alloc&)``\ should be conditionally explicit","2019-07 (Cologne)","|Complete|","10","" -"`LWG3169 <https://wg21.link/LWG3169>`__","``ranges``\ permutation generators discard useful information","2019-07 (Cologne)","|Complete|","15","" -"`LWG3183 <https://wg21.link/LWG3183>`__","Normative permission to specialize Ranges variable templates","2019-07 (Cologne)","|Nothing To Do|","","" -"`LWG3184 <https://wg21.link/LWG3184>`__","Inconsistencies in ``bind_front``\ wording","2019-07 (Cologne)","|Complete|","13","" -"`LWG3185 <https://wg21.link/LWG3185>`__","Uses-allocator construction functions missing ``constexpr``\ and ``noexcept``\ ","2019-07 (Cologne)","|Complete|","16","" -"`LWG3186 <https://wg21.link/LWG3186>`__","``ranges``\ removal, partition, and ``partial_sort_copy``\ algorithms discard useful information","2019-07 (Cologne)","|Complete|","15","" -"`LWG3187 <https://wg21.link/LWG3187>`__","`P0591R4 <https://wg21.link/p0591r4>`__ reverted DR 2586 fixes to ``scoped_allocator_adaptor::construct()``\ ","2019-07 (Cologne)","","","" -"`LWG3191 <https://wg21.link/LWG3191>`__","``std::ranges::shuffle``\ synopsis does not match algorithm definition","2019-07 (Cologne)","|Complete|","15","" -"`LWG3196 <https://wg21.link/LWG3196>`__","``std::optional<T>``\ is ill-formed is ``T``\ is an array","2019-07 (Cologne)","|Complete|","","" -"`LWG3198 <https://wg21.link/LWG3198>`__","Bad constraint on ``std::span::span()``\ ","2019-07 (Cologne)","|Complete|","","" -"`LWG3199 <https://wg21.link/LWG3199>`__","``istream >> bitset<0>``\ fails","2019-07 (Cologne)","|Complete|","10","" -"`LWG3202 <https://wg21.link/LWG3202>`__","P0318R1 was supposed to be revised","2019-07 (Cologne)","|Complete|","","" -"`LWG3206 <https://wg21.link/LWG3206>`__","``year_month_day``\ conversion to ``sys_days``\ uses not-existing member function","2019-07 (Cologne)","|Complete|","","" -"`LWG3208 <https://wg21.link/LWG3208>`__","``Boolean``\ 's expression requirements are ordered inconsistently","2019-07 (Cologne)","|Nothing To Do|","","" -"`LWG3209 <https://wg21.link/LWG3209>`__","Expression in ``year::ok()``\ returns clause is ill-formed","2019-07 (Cologne)","|Complete|","","" +"`LWG2899 <https://wg21.link/LWG2899>`__","``is_(nothrow_)move_constructible``\ and ``tuple``\ , ``optional``\ and ``unique_ptr``\ ","2019-07 (Cologne)","","","`#100255 <https://github.com/llvm/llvm-project/issues/100255>`__","" +"`LWG3055 <https://wg21.link/LWG3055>`__","``path::operator+=(*single-character*)``\ misspecified","2019-07 (Cologne)","|Complete|","7","`#103846 <https://github.com/llvm/llvm-project/issues/103846>`__","" +"`LWG3158 <https://wg21.link/LWG3158>`__","``tuple(allocator_arg_t, const Alloc&)``\ should be conditionally explicit","2019-07 (Cologne)","|Complete|","10","`#103847 <https://github.com/llvm/llvm-project/issues/103847>`__","" +"`LWG3169 <https://wg21.link/LWG3169>`__","``ranges``\ permutation generators discard useful information","2019-07 (Cologne)","|Complete|","15","`#103848 <https://github.com/llvm/llvm-project/issues/103848>`__","" +"`LWG3183 <https://wg21.link/LWG3183>`__","Normative permission to specialize Ranges variable templates","2019-07 (Cologne)","|Nothing To Do|","","`#103849 <https://github.com/llvm/llvm-project/issues/103849>`__","" +"`LWG3184 <https://wg21.link/LWG3184>`__","Inconsistencies in ``bind_front``\ wording","2019-07 (Cologne)","|Complete|","13","`#103850 <https://github.com/llvm/llvm-project/issues/103850>`__","" +"`LWG3185 <https://wg21.link/LWG3185>`__","Uses-allocator construction functions missing ``constexpr``\ and ``noexcept``\ ","2019-07 (Cologne)","|Complete|","16","`#103851 <https://github.com/llvm/llvm-project/issues/103851>`__","" +"`LWG3186 <https://wg21.link/LWG3186>`__","``ranges``\ removal, partition, and ``partial_sort_copy``\ algorithms discard useful information","2019-07 (Cologne)","|Complete|","15","`#103852 <https://github.com/llvm/llvm-project/issues/103852>`__","" +"`LWG3187 <https://wg21.link/LWG3187>`__","`P0591R4 <https://wg21.link/p0591r4>`__ reverted DR 2586 fixes to ``scoped_allocator_adaptor::construct()``\ ","2019-07 (Cologne)","","","`#100256 <https://github.com/llvm/llvm-project/issues/100256>`__","" +"`LWG3191 <https://wg21.link/LWG3191>`__","``std::ranges::shuffle``\ synopsis does not match algorithm definition","2019-07 (Cologne)","|Complete|","15","`#103853 <https://github.com/llvm/llvm-project/issues/103853>`__","" +"`LWG3196 <https://wg21.link/LWG3196>`__","``std::optional<T>``\ is ill-formed is ``T``\ is an array","2019-07 (Cologne)","|Complete|","","`#103854 <https://github.com/llvm/llvm-project/issues/103854>`__","" +"`LWG3198 <https://wg21.link/LWG3198>`__","Bad constraint on ``std::span::span()``\ ","2019-07 (Cologne)","|Complete|","","`#103856 <https://github.com/llvm/llvm-project/issues/103856>`__","" +"`LWG3199 <https://wg21.link/LWG3199>`__","``istream >> bitset<0>``\ fails","2019-07 (Cologne)","|Complete|","10","`#100257 <https://github.com/llvm/llvm-project/issues/100257>`__","" +"`LWG3202 <https://wg21.link/LWG3202>`__","P0318R1 was supposed to be revised","2019-07 (Cologne)","|Complete|","","`#103857 <https://github.com/llvm/llvm-project/issues/103857>`__","" +"`LWG3206 <https://wg21.link/LWG3206>`__","``year_month_day``\ conversion to ``sys_days``\ uses not-existing member function","2019-07 (Cologne)","|Complete|","","`#103858 <https://github.com/llvm/llvm-project/issues/103858>`__","" +"`LWG3208 <https://wg21.link/LWG3208>`__","``Boolean``\ 's expression requirements are ordered inconsistently","2019-07 (Cologne)","|Nothing To Do|","","`#103860 <https://github.com/llvm/llvm-project/issues/103860>`__","" +"`LWG3209 <https://wg21.link/LWG3209>`__","Expression in ``year::ok()``\ returns clause is ill-formed","2019-07 (Cologne)","|Complete|","","`#103861 <https://github.com/llvm/llvm-project/issues/103861>`__","" "","","","","","" -"`LWG3231 <https://wg21.link/LWG3231>`__","``year_month_day_last::day``\ specification does not cover ``!ok()``\ values","2019-11 (Belfast)","|Nothing To Do|","","" -"`LWG3225 <https://wg21.link/LWG3225>`__","``zoned_time``\ converting constructor shall not be ``noexcept``\ ","2019-11 (Belfast)","|Complete|","19","" -"`LWG3190 <https://wg21.link/LWG3190>`__","``std::allocator::allocate``\ sometimes returns too little storage","2019-11 (Belfast)","|Complete|","14","" -"`LWG3218 <https://wg21.link/LWG3218>`__","Modifier for ``%d``\ parse flag does not match POSIX and ``format``\ specification","2019-11 (Belfast)","","","" -"`LWG3224 <https://wg21.link/LWG3224>`__","``zoned_time``\ constructor from ``TimeZonePtr``\ does not specify initialization of ``tp_``\ ","2019-11 (Belfast)","|Complete|","19","" -"`LWG3230 <https://wg21.link/LWG3230>`__","Format specifier ``%y/%Y``\ is missing locale alternative versions","2019-11 (Belfast)","|Complete|","16","" -"`LWG3232 <https://wg21.link/LWG3232>`__","Inconsistency in ``zoned_time``\ deduction guides","2019-11 (Belfast)","|Complete|","19","" -"`LWG3222 <https://wg21.link/LWG3222>`__","P0574R1 introduced preconditions on non-existent parameters","2019-11 (Belfast)","","","" -"`LWG3221 <https://wg21.link/LWG3221>`__","Result of ``year_month``\ arithmetic with ``months``\ is ambiguous","2019-11 (Belfast)","|Complete|","8","" -"`LWG3235 <https://wg21.link/LWG3235>`__","``parse``\ manipulator without abbreviation is not callable","2019-11 (Belfast)","","","" -"`LWG3246 <https://wg21.link/LWG3246>`__","LWG3246: What are the constraints on the template parameter of `basic_format_arg`?","2019-11 (Belfast)","|Nothing To Do|","","" -"`LWG3253 <https://wg21.link/LWG3253>`__","``basic_syncbuf::basic_syncbuf()``\ should not be explicit","2019-11 (Belfast)","|Complete|","20","" -"`LWG3245 <https://wg21.link/LWG3245>`__","Unnecessary restriction on ``'%p'``\ parse specifier","2019-11 (Belfast)","","","" -"`LWG3244 <https://wg21.link/LWG3244>`__","Constraints for ``Source``\ in |sect|\ [fs.path.req] insufficiently constrainty","2019-11 (Belfast)","","","" -"`LWG3241 <https://wg21.link/LWG3241>`__","``chrono-spec``\ grammar ambiguity in |sect|\ [time.format]","2019-11 (Belfast)","|Complete|","16","" -"`LWG3257 <https://wg21.link/LWG3257>`__","Missing feature testing macro update from P0858","2019-11 (Belfast)","|Complete|","12","" -"`LWG3256 <https://wg21.link/LWG3256>`__","Feature testing macro for ``constexpr``\ algorithms","2019-11 (Belfast)","|Complete|","13","" -"`LWG3273 <https://wg21.link/LWG3273>`__","Specify ``weekday_indexed``\ to range of ``[0, 7]``\ ","2019-11 (Belfast)","|Complete|","16","" -"`LWG3070 <https://wg21.link/LWG3070>`__","``path::lexically_relative``\ causes surprising results if a filename can also be a *root-name*","2019-11 (Belfast)","","","" -"`LWG3266 <https://wg21.link/LWG3266>`__","``to_chars(bool)``\ should be deleted","2019-11 (Belfast)","|Complete|","14","" -"`LWG3272 <https://wg21.link/LWG3272>`__","``%I%p``\ should parse/format ``duration``\ since midnight","2019-11 (Belfast)","","","" -"`LWG3259 <https://wg21.link/LWG3259>`__","The definition of *constexpr iterators* should be adjusted","2019-11 (Belfast)","|Nothing To Do|","","" -"`LWG3103 <https://wg21.link/LWG3103>`__","Errors in taking subview of ``span``\ should be ill-formed where possible","2019-11 (Belfast)","|Complete|","11","" -"`LWG3274 <https://wg21.link/LWG3274>`__","Missing feature test macro for ``<span>``\ ","2019-11 (Belfast)","|Complete|","11","" -"`LWG3276 <https://wg21.link/LWG3276>`__","Class ``split_view::outer_iterator::value_type``\ should inherit from ``view_interface``\ ","2019-11 (Belfast)","|Complete|","15","" -"`LWG3277 <https://wg21.link/LWG3277>`__","Pre-increment on prvalues is not a requirement of ``weakly_incrementable``\ ","2019-11 (Belfast)","|Nothing To Do|","","" -"`LWG3149 <https://wg21.link/LWG3149>`__","``DefaultConstructible``\ should require default initialization","2019-11 (Belfast)","|Complete|","13","" +"`LWG3231 <https://wg21.link/LWG3231>`__","``year_month_day_last::day``\ specification does not cover ``!ok()``\ values","2019-11 (Belfast)","|Nothing To Do|","","`#103862 <https://github.com/llvm/llvm-project/issues/103862>`__","" +"`LWG3225 <https://wg21.link/LWG3225>`__","``zoned_time``\ converting constructor shall not be ``noexcept``\ ","2019-11 (Belfast)","|Complete|","19","`#103863 <https://github.com/llvm/llvm-project/issues/103863>`__","" +"`LWG3190 <https://wg21.link/LWG3190>`__","``std::allocator::allocate``\ sometimes returns too little storage","2019-11 (Belfast)","|Complete|","14","`#103864 <https://github.com/llvm/llvm-project/issues/103864>`__","" +"`LWG3218 <https://wg21.link/LWG3218>`__","Modifier for ``%d``\ parse flag does not match POSIX and ``format``\ specification","2019-11 (Belfast)","","","`#100258 <https://github.com/llvm/llvm-project/issues/100258>`__","" +"`LWG3224 <https://wg21.link/LWG3224>`__","``zoned_time``\ constructor from ``TimeZonePtr``\ does not specify initialization of ``tp_``\ ","2019-11 (Belfast)","|Complete|","19","`#103865 <https://github.com/llvm/llvm-project/issues/103865>`__","" +"`LWG3230 <https://wg21.link/LWG3230>`__","Format specifier ``%y/%Y``\ is missing locale alternative versions","2019-11 (Belfast)","|Complete|","16","`#103868 <https://github.com/llvm/llvm-project/issues/103868>`__","" +"`LWG3232 <https://wg21.link/LWG3232>`__","Inconsistency in ``zoned_time``\ deduction guides","2019-11 (Belfast)","|Complete|","19","`#103869 <https://github.com/llvm/llvm-project/issues/103869>`__","" +"`LWG3222 <https://wg21.link/LWG3222>`__","P0574R1 introduced preconditions on non-existent parameters","2019-11 (Belfast)","","","`#100259 <https://github.com/llvm/llvm-project/issues/100259>`__","" +"`LWG3221 <https://wg21.link/LWG3221>`__","Result of ``year_month``\ arithmetic with ``months``\ is ambiguous","2019-11 (Belfast)","|Complete|","8","`#103870 <https://github.com/llvm/llvm-project/issues/103870>`__","" +"`LWG3235 <https://wg21.link/LWG3235>`__","``parse``\ manipulator without abbreviation is not callable","2019-11 (Belfast)","","","`#100262 <https://github.com/llvm/llvm-project/issues/100262>`__","" +"`LWG3246 <https://wg21.link/LWG3246>`__","LWG3246: What are the constraints on the template parameter of `basic_format_arg`?","2019-11 (Belfast)","|Nothing To Do|","","`#100263 <https://github.com/llvm/llvm-project/issues/100263>`__","" +"`LWG3253 <https://wg21.link/LWG3253>`__","``basic_syncbuf::basic_syncbuf()``\ should not be explicit","2019-11 (Belfast)","|Complete|","20","`#100264 <https://github.com/llvm/llvm-project/issues/100264>`__","" +"`LWG3245 <https://wg21.link/LWG3245>`__","Unnecessary restriction on ``'%p'``\ parse specifier","2019-11 (Belfast)","","","`#100265 <https://github.com/llvm/llvm-project/issues/100265>`__","" +"`LWG3244 <https://wg21.link/LWG3244>`__","Constraints for ``Source``\ in |sect|\ [fs.path.req] insufficiently constrainty","2019-11 (Belfast)","","","`#100266 <https://github.com/llvm/llvm-project/issues/100266>`__","" +"`LWG3241 <https://wg21.link/LWG3241>`__","``chrono-spec``\ grammar ambiguity in |sect|\ [time.format]","2019-11 (Belfast)","|Complete|","16","`#103871 <https://github.com/llvm/llvm-project/issues/103871>`__","" +"`LWG3257 <https://wg21.link/LWG3257>`__","Missing feature testing macro update from P0858","2019-11 (Belfast)","|Complete|","12","`#103873 <https://github.com/llvm/llvm-project/issues/103873>`__","" +"`LWG3256 <https://wg21.link/LWG3256>`__","Feature testing macro for ``constexpr``\ algorithms","2019-11 (Belfast)","|Complete|","13","`#103874 <https://github.com/llvm/llvm-project/issues/103874>`__","" +"`LWG3273 <https://wg21.link/LWG3273>`__","Specify ``weekday_indexed``\ to range of ``[0, 7]``\ ","2019-11 (Belfast)","|Complete|","16","`#103875 <https://github.com/llvm/llvm-project/issues/103875>`__","" +"`LWG3070 <https://wg21.link/LWG3070>`__","``path::lexically_relative``\ causes surprising results if a filename can also be a *root-name*","2019-11 (Belfast)","","","`#100267 <https://github.com/llvm/llvm-project/issues/100267>`__","" +"`LWG3266 <https://wg21.link/LWG3266>`__","``to_chars(bool)``\ should be deleted","2019-11 (Belfast)","|Complete|","14","`#103876 <https://github.com/llvm/llvm-project/issues/103876>`__","" +"`LWG3272 <https://wg21.link/LWG3272>`__","``%I%p``\ should parse/format ``duration``\ since midnight","2019-11 (Belfast)","","","`#100268 <https://github.com/llvm/llvm-project/issues/100268>`__","" +"`LWG3259 <https://wg21.link/LWG3259>`__","The definition of *constexpr iterators* should be adjusted","2019-11 (Belfast)","|Nothing To Do|","","`#103877 <https://github.com/llvm/llvm-project/issues/103877>`__","" +"`LWG3103 <https://wg21.link/LWG3103>`__","Errors in taking subview of ``span``\ should be ill-formed where possible","2019-11 (Belfast)","|Complete|","11","`#103878 <https://github.com/llvm/llvm-project/issues/103878>`__","" +"`LWG3274 <https://wg21.link/LWG3274>`__","Missing feature test macro for ``<span>``\ ","2019-11 (Belfast)","|Complete|","11","`#103880 <https://github.com/llvm/llvm-project/issues/103880>`__","" +"`LWG3276 <https://wg21.link/LWG3276>`__","Class ``split_view::outer_iterator::value_type``\ should inherit from ``view_interface``\ ","2019-11 (Belfast)","|Complete|","15","`#103881 <https://github.com/llvm/llvm-project/issues/103881>`__","" +"`LWG3277 <https://wg21.link/LWG3277>`__","Pre-increment on prvalues is not a requirement of ``weakly_incrementable``\ ","2019-11 (Belfast)","|Nothing To Do|","","`#103882 <https://github.com/llvm/llvm-project/issues/103882>`__","" +"`LWG3149 <https://wg21.link/LWG3149>`__","``DefaultConstructible``\ should require default initialization","2019-11 (Belfast)","|Complete|","13","`#103883 <https://github.com/llvm/llvm-project/issues/103883>`__","" "","","","","","" -"`LWG1203 <https://wg21.link/LWG1203>`__","More useful rvalue stream insertion","2020-02 (Prague)","|Complete|","12","" -"`LWG2859 <https://wg21.link/LWG2859>`__","Definition of *reachable* in [ptr.launder] misses pointer arithmetic from pointer-interconvertible object","2020-02 (Prague)","","","" -"`LWG3018 <https://wg21.link/LWG3018>`__","``shared_ptr``\ of function type","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3050 <https://wg21.link/LWG3050>`__","Conversion specification problem in ``chrono::duration``\ constructor","2020-02 (Prague)","|Complete|","19","" -"`LWG3141 <https://wg21.link/LWG3141>`__","``CopyConstructible``\ doesn't preserve source values","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3150 <https://wg21.link/LWG3150>`__","``UniformRandomBitGenerator``\ should validate ``min``\ and ``max``\ ","2020-02 (Prague)","|Complete|","13","" -"`LWG3175 <https://wg21.link/LWG3175>`__","The ``CommonReference``\ requirement of concept ``SwappableWith``\ is not satisfied in the example","2020-02 (Prague)","|Complete|","13","" -"`LWG3194 <https://wg21.link/LWG3194>`__","``ConvertibleTo``\ prose does not match code","2020-02 (Prague)","|Complete|","13","" -"`LWG3200 <https://wg21.link/LWG3200>`__","``midpoint``\ should not constrain ``T``\ is complete","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3201 <https://wg21.link/LWG3201>`__","``lerp``\ should be marked as ``noexcept``\ ","2020-02 (Prague)","|Complete|","","" -"`LWG3226 <https://wg21.link/LWG3226>`__","``zoned_time``\ constructor from ``string_view``\ should accept ``zoned_time<Duration2, TimeZonePtr2>``\ ","2020-02 (Prague)","|Complete|","19","" -"`LWG3233 <https://wg21.link/LWG3233>`__","Broken requirements for ``shared_ptr``\ converting constructors","2020-02 (Prague)","|Complete|","19","" -"`LWG3237 <https://wg21.link/LWG3237>`__","LWG 3038 and 3190 have inconsistent PRs","2020-02 (Prague)","|Complete|","16","" -"`LWG3238 <https://wg21.link/LWG3238>`__","Insufficiently-defined behavior of ``std::function``\ deduction guides","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3242 <https://wg21.link/LWG3242>`__","``std::format``\ : missing rules for ``arg-id``\ in ``width``\ and ``precision``\ ","2020-02 (Prague)","|Complete|","14","" -"`LWG3243 <https://wg21.link/LWG3243>`__","``std::format``\ and negative zeroes","2020-02 (Prague)","|Complete|","14","" -"`LWG3247 <https://wg21.link/LWG3247>`__","``ranges::iter_move``\ should perform ADL-only lookup of ``iter_move``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3248 <https://wg21.link/LWG3248>`__","``std::format``\ ``#b``\ , ``#B``\ , ``#o``\ , ``#x``\ , and ``#X``\ presentation types misformat negative numbers","2020-02 (Prague)","|Complete|","14","" -"`LWG3250 <https://wg21.link/LWG3250>`__","``std::format``\ : ``#``\ (alternate form) for NaN and inf","2020-02 (Prague)","|Complete|","14","" -"`LWG3251 <https://wg21.link/LWG3251>`__","Are ``std::format``\ alignment specifiers applied to string arguments?","2020-02 (Prague)","|Complete|","14","" -"`LWG3252 <https://wg21.link/LWG3252>`__","Parse locale's aware modifiers for commands are not consistent with POSIX spec","2020-02 (Prague)","","","" -"`LWG3254 <https://wg21.link/LWG3254>`__","Strike ``stop_token``\ 's ``operator!=``\ ","2020-02 (Prague)","|Complete|","17","" -"`LWG3255 <https://wg21.link/LWG3255>`__","``span``\ 's ``array``\ constructor is too strict","2020-02 (Prague)","|Complete|","","" -"`LWG3260 <https://wg21.link/LWG3260>`__","``year_month*``\ arithmetic rejects durations convertible to years","2020-02 (Prague)","","","" -"`LWG3262 <https://wg21.link/LWG3262>`__","Formatting of negative durations is not specified","2020-02 (Prague)","|Complete|","16","" -"`LWG3264 <https://wg21.link/LWG3264>`__","``sized_range``\ and ``ranges::size``\ redundantly use ``disable_sized_range``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3269 <https://wg21.link/LWG3269>`__","Parse manipulators do not specify the result of the extraction from stream","2020-02 (Prague)","","","" -"`LWG3270 <https://wg21.link/LWG3270>`__","Parsing and formatting ``%j``\ with ``duration``\ s","2020-02 (Prague)","|Partial|","","" -"`LWG3280 <https://wg21.link/LWG3280>`__","View converting constructors can cause constraint recursion and are unneeded","2020-02 (Prague)","|Complete|","15","" -"`LWG3281 <https://wg21.link/LWG3281>`__","Conversion from ``*pair-like*``\ types to ``subrange``\ is a silent semantic promotion","2020-02 (Prague)","|Complete|","13","" -"`LWG3282 <https://wg21.link/LWG3282>`__","``subrange``\ converting constructor should disallow derived to base conversions","2020-02 (Prague)","|Complete|","15","" -"`LWG3284 <https://wg21.link/LWG3284>`__","``random_access_iterator``\ semantic constraints accidentally promote difference type using unary negate","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3285 <https://wg21.link/LWG3285>`__","The type of a customization point object shall satisfy ``semiregular``\ ","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3286 <https://wg21.link/LWG3286>`__","``ranges::size``\ is not required to be valid after a call to ``ranges::begin``\ on an input range","2020-02 (Prague)","|Complete|","15","" -"`LWG3291 <https://wg21.link/LWG3291>`__","``iota_view::iterator``\ has the wrong ``iterator_category``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3292 <https://wg21.link/LWG3292>`__","``iota_view``\ is under-constrained","2020-02 (Prague)","|Complete|","15","" -"`LWG3294 <https://wg21.link/LWG3294>`__","``zoned_time``\ deduction guides misinterprets ``string``\ /``char*``\ ","2020-02 (Prague)","|Complete|","19","" -"`LWG3296 <https://wg21.link/LWG3296>`__","Inconsistent default argument for ``basic_regex<>::assign``\ ","2020-02 (Prague)","|Complete|","","" -"`LWG3299 <https://wg21.link/LWG3299>`__","Pointers don't need customized iterator behavior","2020-02 (Prague)","|Complete|","15","" -"`LWG3300 <https://wg21.link/LWG3300>`__","Non-array ``ssize``\ overload is underconstrained","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3301 <https://wg21.link/LWG3301>`__","``transform_view::iterator``\ has incorrect ``iterator_category``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3302 <https://wg21.link/LWG3302>`__","Range adaptor objects ``keys``\ and ``values``\ are unspecified","2020-02 (Prague)","|Complete|","16","" -"`LWG3303 <https://wg21.link/LWG3303>`__","Bad ""``constexpr``\ "" marker for ``destroy/destroy_n``\ ","2020-02 (Prague)","","","" -"`LWG3304 <https://wg21.link/LWG3304>`__","Allocate functions of ``std::polymorphic_allocator``\ should require ``[[nodiscard]]``\ ","2020-02 (Prague)","|Complete|","16","" -"`LWG3307 <https://wg21.link/LWG3307>`__","``std::allocator<void>().allocate(n)``\ ","2020-02 (Prague)","|Complete|","20","" -"`LWG3310 <https://wg21.link/LWG3310>`__","Replace ``SIZE_MAX``\ with ``numeric_limits<size_t>::max()``\ ","2020-02 (Prague)","|Complete|","16","" -"`LWG3313 <https://wg21.link/LWG3313>`__","``join_view::iterator::operator--``\ is incorrectly constrained","2020-02 (Prague)","|Complete|","14","" -"`LWG3314 <https://wg21.link/LWG3314>`__","Is stream insertion behavior locale dependent when ``Period::type``\ is ``micro``\ ?","2020-02 (Prague)","|Complete|","16","" -"`LWG3315 <https://wg21.link/LWG3315>`__","Correct Allocator Default Behavior","2020-02 (Prague)","|Complete|","","" -"`LWG3316 <https://wg21.link/LWG3316>`__","Correctly define epoch for ``utc_clock``\ / ``utc_timepoint``\ ","2020-02 (Prague)","","","" -"`LWG3317 <https://wg21.link/LWG3317>`__","Incorrect ``operator<<``\ for floating-point durations","2020-02 (Prague)","|Complete|","16","" -"`LWG3318 <https://wg21.link/LWG3318>`__","Clarify whether clocks can represent time before their epoch","2020-02 (Prague)","","","" -"`LWG3319 <https://wg21.link/LWG3319>`__","Properly reference specification of IANA time zone database","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3320 <https://wg21.link/LWG3320>`__","``span::cbegin/cend``\ methods produce different results than ``std::[ranges::]cbegin/cend``\ ","2020-02 (Prague)","|Complete|","","" -"`LWG3321 <https://wg21.link/LWG3321>`__","``uninitialized_construct_using_allocator``\ should use ``construct_at``\ ","2020-02 (Prague)","|Complete|","16","" -"`LWG3323 <https://wg21.link/LWG3323>`__","``*has-tuple-element*``\ helper concept needs ``convertible_to``\ ","2020-02 (Prague)","|Complete|","16","" -"`LWG3324 <https://wg21.link/LWG3324>`__","Special-case ``std::strong/weak/partial_order``\ for pointers","2020-02 (Prague)","|Complete|","14","" -"`LWG3325 <https://wg21.link/LWG3325>`__","Constrain return type of transformation function for ``transform_view``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3326 <https://wg21.link/LWG3326>`__","``enable_view``\ has false positives","2020-02 (Prague)","|Complete|","15","" -"`LWG3327 <https://wg21.link/LWG3327>`__","Format alignment specifiers vs. text direction","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3328 <https://wg21.link/LWG3328>`__","Clarify that ``std::string``\ is not good for UTF-8","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3329 <https://wg21.link/LWG3329>`__","``totally_ordered_with``\ both directly and indirectly requires ``common_reference_with``\ ","2020-02 (Prague)","|Complete|","13","" -"`LWG3330 <https://wg21.link/LWG3330>`__","Include ``<compare>``\ from most library headers","2020-02 (Prague)","|Complete|","13","" -"`LWG3331 <https://wg21.link/LWG3331>`__","Define ``totally_ordered/_with``\ in terms of ``partially-ordered-with``\ ","2020-02 (Prague)","|Complete|","13","" -"`LWG3332 <https://wg21.link/LWG3332>`__","Issue in |sect|\ [time.format]","2020-02 (Prague)","|Complete|","16","" -"`LWG3334 <https://wg21.link/LWG3334>`__","``basic_osyncstream``\ move assignment and destruction calls ``basic_syncbuf::emit()``\ twice","2020-02 (Prague)","|Complete|","18","" -"`LWG3335 <https://wg21.link/LWG3335>`__","Resolve C++20 NB comments US 273 and GB 274","2020-02 (Prague)","|Complete|","15","" -"`LWG3338 <https://wg21.link/LWG3338>`__","Rename ``default_constructible``\ to ``default_initializable``\ ","2020-02 (Prague)","|Complete|","13","" -"`LWG3340 <https://wg21.link/LWG3340>`__","Formatting functions should throw on argument/format string mismatch in |sect|\ [format.functions]","2020-02 (Prague)","|Complete|","14","" -"`LWG3346 <https://wg21.link/LWG3346>`__","``pair``\ and ``tuple``\ copy and move constructor have backwards specification","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3347 <https://wg21.link/LWG3347>`__","``std::pair<T, U>``\ now requires ``T``\ and ``U``\ to be less-than-comparable","2020-02 (Prague)","|Complete|","17","" -"`LWG3348 <https://wg21.link/LWG3348>`__","``__cpp_lib_unwrap_ref``\ in wrong header","2020-02 (Prague)","|Complete|","12","" -"`LWG3349 <https://wg21.link/LWG3349>`__","Missing ``__cpp_lib_constexpr_complex``\ for P0415R1","2020-02 (Prague)","|Complete|","16","" -"`LWG3350 <https://wg21.link/LWG3350>`__","Simplify return type of ``lexicographical_compare_three_way``\ ","2020-02 (Prague)","|Complete|","17","" -"`LWG3351 <https://wg21.link/LWG3351>`__","``ranges::enable_safe_range``\ should not be constrained","2020-02 (Prague)","|Complete|","15","" -"`LWG3352 <https://wg21.link/LWG3352>`__","``strong_equality``\ isn't a thing","2020-02 (Prague)","|Complete|","19","" -"`LWG3354 <https://wg21.link/LWG3354>`__","``has_strong_structural_equality``\ has a meaningless definition","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3355 <https://wg21.link/LWG3355>`__","The memory algorithms should support move-only input iterators introduced by P1207","2020-02 (Prague)","|Complete|","15","" -"`LWG3356 <https://wg21.link/LWG3356>`__","``__cpp_lib_nothrow_convertible``\ should be ``__cpp_lib_is_nothrow_convertible``\ ","2020-02 (Prague)","|Complete|","12","" -"`LWG3358 <https://wg21.link/LWG3358>`__","|sect|\ [span.cons] is mistaken that ``to_address``\ can throw","2020-02 (Prague)","|Complete|","17","" -"`LWG3359 <https://wg21.link/LWG3359>`__","``<chrono>``\ leap second support should allow for negative leap seconds","2020-02 (Prague)","|Complete|","21","" -"`LWG3360 <https://wg21.link/LWG3360>`__","``three_way_comparable_with``\ is inconsistent with similar concepts","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3362 <https://wg21.link/LWG3362>`__","Strike ``stop_source``\ 's ``operator!=``\ ","2020-02 (Prague)","|Complete|","17","" -"`LWG3363 <https://wg21.link/LWG3363>`__","``drop_while_view``\ should opt-out of ``sized_range``\ ","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3364 <https://wg21.link/LWG3364>`__","Initialize data members of ranges and their iterators","2020-02 (Prague)","|Complete|","16","" -"`LWG3367 <https://wg21.link/LWG3367>`__","Integer-class conversions should not throw","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3369 <https://wg21.link/LWG3369>`__","``span``\ 's deduction-guide for built-in arrays doesn't work","2020-02 (Prague)","|Complete|","14","" -"`LWG3371 <https://wg21.link/LWG3371>`__","``visit_format_arg``\ and ``make_format_args``\ are not hidden friends","2020-02 (Prague)","|Complete|","14","" -"`LWG3372 <https://wg21.link/LWG3372>`__","``vformat_to``\ should not try to deduce ``Out``\ twice","2020-02 (Prague)","|Complete|","14","" -"`LWG3373 <https://wg21.link/LWG3373>`__","``{to,from}_chars_result``\ and ``format_to_n_result``\ need the ""we really mean what we say"" wording","2020-02 (Prague)","|Complete|","14","" -"`LWG3374 <https://wg21.link/LWG3374>`__","P0653 + P1006 should have made the other ``std::to_address``\ overload ``constexpr``\ ","2020-02 (Prague)","|Complete|","12","" -"`LWG3375 <https://wg21.link/LWG3375>`__","``decay``\ in ``viewable_range``\ should be ``remove_cvref``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3377 <https://wg21.link/LWG3377>`__","``elements_view::iterator``\ befriends a specialization of itself","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3379 <https://wg21.link/LWG3379>`__","""``safe``\ "" in several library names is misleading","2020-02 (Prague)","|Complete|","15","" -"`LWG3380 <https://wg21.link/LWG3380>`__","``common_type``\ and comparison categories","2020-02 (Prague)","|Complete|","15","" -"`LWG3381 <https://wg21.link/LWG3381>`__","``begin``\ and ``data``\ must agree for ``contiguous_range``\ ","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3382 <https://wg21.link/LWG3382>`__","NTTP for ``pair``\ and ``array``\ ","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3383 <https://wg21.link/LWG3383>`__","|sect|\ [time.zone.leap.nonmembers] ``sys_seconds``\ should be replaced with ``seconds``\ ","2020-02 (Prague)","|Complete|","19","" -"`LWG3384 <https://wg21.link/LWG3384>`__","``transform_view::*sentinel*``\ has an incorrect ``operator-``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3385 <https://wg21.link/LWG3385>`__","``common_iterator``\ is not sufficiently constrained for non-copyable iterators","2020-02 (Prague)","|Complete|","15","" -"`LWG3387 <https://wg21.link/LWG3387>`__","|sect|\ [range.reverse.view] ``reverse_view<V>``\ unintentionally requires ``range<const V>``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3388 <https://wg21.link/LWG3388>`__","``view``\ iterator types have ill-formed ``<=>``\ operators","2020-02 (Prague)","|Complete|","16","" -"`LWG3389 <https://wg21.link/LWG3389>`__","A move-only iterator still does not have a ``counted_iterator``\ ","2020-02 (Prague)","|Complete|","15","" -"`LWG3390 <https://wg21.link/LWG3390>`__","``make_move_iterator()``\ cannot be used to construct a ``move_iterator``\ for a move-only iterator","2020-02 (Prague)","|Complete|","14","" -"`LWG3393 <https://wg21.link/LWG3393>`__","Missing/incorrect feature test macro for coroutines","2020-02 (Prague)","|Complete|","14","" -"`LWG3395 <https://wg21.link/LWG3395>`__","Definition for three-way comparison needs to be updated (US 152)","2020-02 (Prague)","|Nothing To Do|","","" -"`LWG3396 <https://wg21.link/LWG3396>`__","Clarify point of reference for ``source_location::current()``\ (DE 169)","2020-02 (Prague)","|Nothing To Do|","16","" -"`LWG3397 <https://wg21.link/LWG3397>`__","``ranges::basic_istream_view::iterator``\ should not provide ``iterator_category``\ ","2020-02 (Prague)","|Complete|","16","" -"`LWG3398 <https://wg21.link/LWG3398>`__","``tuple_element_t``\ is also wrong for ``const subrange``\ ","2020-02 (Prague)","|Complete|","14","" +"`LWG1203 <https://wg21.link/LWG1203>`__","More useful rvalue stream insertion","2020-02 (Prague)","|Complete|","12","`#103884 <https://github.com/llvm/llvm-project/issues/103884>`__","" +"`LWG2859 <https://wg21.link/LWG2859>`__","Definition of *reachable* in [ptr.launder] misses pointer arithmetic from pointer-interconvertible object","2020-02 (Prague)","","","`#100269 <https://github.com/llvm/llvm-project/issues/100269>`__","" +"`LWG3018 <https://wg21.link/LWG3018>`__","``shared_ptr``\ of function type","2020-02 (Prague)","|Nothing To Do|","","`#103885 <https://github.com/llvm/llvm-project/issues/103885>`__","" +"`LWG3050 <https://wg21.link/LWG3050>`__","Conversion specification problem in ``chrono::duration``\ constructor","2020-02 (Prague)","|Complete|","19","`#103887 <https://github.com/llvm/llvm-project/issues/103887>`__","" +"`LWG3141 <https://wg21.link/LWG3141>`__","``CopyConstructible``\ doesn't preserve source values","2020-02 (Prague)","|Nothing To Do|","","`#103889 <https://github.com/llvm/llvm-project/issues/103889>`__","" +"`LWG3150 <https://wg21.link/LWG3150>`__","``UniformRandomBitGenerator``\ should validate ``min``\ and ``max``\ ","2020-02 (Prague)","|Complete|","13","`#103890 <https://github.com/llvm/llvm-project/issues/103890>`__","" +"`LWG3175 <https://wg21.link/LWG3175>`__","The ``CommonReference``\ requirement of concept ``SwappableWith``\ is not satisfied in the example","2020-02 (Prague)","|Complete|","13","`#103891 <https://github.com/llvm/llvm-project/issues/103891>`__","" +"`LWG3194 <https://wg21.link/LWG3194>`__","``ConvertibleTo``\ prose does not match code","2020-02 (Prague)","|Complete|","13","`#103892 <https://github.com/llvm/llvm-project/issues/103892>`__","" +"`LWG3200 <https://wg21.link/LWG3200>`__","``midpoint``\ should not constrain ``T``\ is complete","2020-02 (Prague)","|Nothing To Do|","","`#103893 <https://github.com/llvm/llvm-project/issues/103893>`__","" +"`LWG3201 <https://wg21.link/LWG3201>`__","``lerp``\ should be marked as ``noexcept``\ ","2020-02 (Prague)","|Complete|","","`#103894 <https://github.com/llvm/llvm-project/issues/103894>`__","" +"`LWG3226 <https://wg21.link/LWG3226>`__","``zoned_time``\ constructor from ``string_view``\ should accept ``zoned_time<Duration2, TimeZonePtr2>``\ ","2020-02 (Prague)","|Complete|","19","`#103896 <https://github.com/llvm/llvm-project/issues/103896>`__","" +"`LWG3233 <https://wg21.link/LWG3233>`__","Broken requirements for ``shared_ptr``\ converting constructors","2020-02 (Prague)","|Complete|","19","`#103897 <https://github.com/llvm/llvm-project/issues/103897>`__","" +"`LWG3237 <https://wg21.link/LWG3237>`__","LWG 3038 and 3190 have inconsistent PRs","2020-02 (Prague)","|Complete|","16","`#103899 <https://github.com/llvm/llvm-project/issues/103899>`__","" +"`LWG3238 <https://wg21.link/LWG3238>`__","Insufficiently-defined behavior of ``std::function``\ deduction guides","2020-02 (Prague)","|Nothing To Do|","","`#103901 <https://github.com/llvm/llvm-project/issues/103901>`__","" +"`LWG3242 <https://wg21.link/LWG3242>`__","``std::format``\ : missing rules for ``arg-id``\ in ``width``\ and ``precision``\ ","2020-02 (Prague)","|Complete|","14","`#103902 <https://github.com/llvm/llvm-project/issues/103902>`__","" +"`LWG3243 <https://wg21.link/LWG3243>`__","``std::format``\ and negative zeroes","2020-02 (Prague)","|Complete|","14","`#103904 <https://github.com/llvm/llvm-project/issues/103904>`__","" +"`LWG3247 <https://wg21.link/LWG3247>`__","``ranges::iter_move``\ should perform ADL-only lookup of ``iter_move``\ ","2020-02 (Prague)","|Complete|","15","`#103906 <https://github.com/llvm/llvm-project/issues/103906>`__","" +"`LWG3248 <https://wg21.link/LWG3248>`__","``std::format``\ ``#b``\ , ``#B``\ , ``#o``\ , ``#x``\ , and ``#X``\ presentation types misformat negative numbers","2020-02 (Prague)","|Complete|","14","`#103907 <https://github.com/llvm/llvm-project/issues/103907>`__","" +"`LWG3250 <https://wg21.link/LWG3250>`__","``std::format``\ : ``#``\ (alternate form) for NaN and inf","2020-02 (Prague)","|Complete|","14","`#103908 <https://github.com/llvm/llvm-project/issues/103908>`__","" +"`LWG3251 <https://wg21.link/LWG3251>`__","Are ``std::format``\ alignment specifiers applied to string arguments?","2020-02 (Prague)","|Complete|","14","`#103909 <https://github.com/llvm/llvm-project/issues/103909>`__","" +"`LWG3252 <https://wg21.link/LWG3252>`__","Parse locale's aware modifiers for commands are not consistent with POSIX spec","2020-02 (Prague)","","","`#100271 <https://github.com/llvm/llvm-project/issues/100271>`__","" +"`LWG3254 <https://wg21.link/LWG3254>`__","Strike ``stop_token``\ 's ``operator!=``\ ","2020-02 (Prague)","|Complete|","17","`#103910 <https://github.com/llvm/llvm-project/issues/103910>`__","" +"`LWG3255 <https://wg21.link/LWG3255>`__","``span``\ 's ``array``\ constructor is too strict","2020-02 (Prague)","|Complete|","","`#103911 <https://github.com/llvm/llvm-project/issues/103911>`__","" +"`LWG3260 <https://wg21.link/LWG3260>`__","``year_month*``\ arithmetic rejects durations convertible to years","2020-02 (Prague)","","","`#100274 <https://github.com/llvm/llvm-project/issues/100274>`__","" +"`LWG3262 <https://wg21.link/LWG3262>`__","Formatting of negative durations is not specified","2020-02 (Prague)","|Complete|","16","`#103912 <https://github.com/llvm/llvm-project/issues/103912>`__","" +"`LWG3264 <https://wg21.link/LWG3264>`__","``sized_range``\ and ``ranges::size``\ redundantly use ``disable_sized_range``\ ","2020-02 (Prague)","|Complete|","15","`#103913 <https://github.com/llvm/llvm-project/issues/103913>`__","" +"`LWG3269 <https://wg21.link/LWG3269>`__","Parse manipulators do not specify the result of the extraction from stream","2020-02 (Prague)","","","`#100275 <https://github.com/llvm/llvm-project/issues/100275>`__","" +"`LWG3270 <https://wg21.link/LWG3270>`__","Parsing and formatting ``%j``\ with ``duration``\ s","2020-02 (Prague)","|Partial|","","`#100418 <https://github.com/llvm/llvm-project/issues/100418>`__","" +"`LWG3280 <https://wg21.link/LWG3280>`__","View converting constructors can cause constraint recursion and are unneeded","2020-02 (Prague)","|Complete|","15","`#103914 <https://github.com/llvm/llvm-project/issues/103914>`__","" +"`LWG3281 <https://wg21.link/LWG3281>`__","Conversion from ``*pair-like*``\ types to ``subrange``\ is a silent semantic promotion","2020-02 (Prague)","|Complete|","13","`#103915 <https://github.com/llvm/llvm-project/issues/103915>`__","" +"`LWG3282 <https://wg21.link/LWG3282>`__","``subrange``\ converting constructor should disallow derived to base conversions","2020-02 (Prague)","|Complete|","15","`#103916 <https://github.com/llvm/llvm-project/issues/103916>`__","" +"`LWG3284 <https://wg21.link/LWG3284>`__","``random_access_iterator``\ semantic constraints accidentally promote difference type using unary negate","2020-02 (Prague)","|Nothing To Do|","","`#103918 <https://github.com/llvm/llvm-project/issues/103918>`__","" +"`LWG3285 <https://wg21.link/LWG3285>`__","The type of a customization point object shall satisfy ``semiregular``\ ","2020-02 (Prague)","|Nothing To Do|","","`#103919 <https://github.com/llvm/llvm-project/issues/103919>`__","" +"`LWG3286 <https://wg21.link/LWG3286>`__","``ranges::size``\ is not required to be valid after a call to ``ranges::begin``\ on an input range","2020-02 (Prague)","|Complete|","15","`#103920 <https://github.com/llvm/llvm-project/issues/103920>`__","" +"`LWG3291 <https://wg21.link/LWG3291>`__","``iota_view::iterator``\ has the wrong ``iterator_category``\ ","2020-02 (Prague)","|Complete|","15","`#103921 <https://github.com/llvm/llvm-project/issues/103921>`__","" +"`LWG3292 <https://wg21.link/LWG3292>`__","``iota_view``\ is under-constrained","2020-02 (Prague)","|Complete|","15","`#103922 <https://github.com/llvm/llvm-project/issues/103922>`__","" +"`LWG3294 <https://wg21.link/LWG3294>`__","``zoned_time``\ deduction guides misinterprets ``string``\ /``char*``\ ","2020-02 (Prague)","|Complete|","19","`#103924 <https://github.com/llvm/llvm-project/issues/103924>`__","" +"`LWG3296 <https://wg21.link/LWG3296>`__","Inconsistent default argument for ``basic_regex<>::assign``\ ","2020-02 (Prague)","|Complete|","","`#103925 <https://github.com/llvm/llvm-project/issues/103925>`__","" +"`LWG3299 <https://wg21.link/LWG3299>`__","Pointers don't need customized iterator behavior","2020-02 (Prague)","|Complete|","15","`#103926 <https://github.com/llvm/llvm-project/issues/103926>`__","" +"`LWG3300 <https://wg21.link/LWG3300>`__","Non-array ``ssize``\ overload is underconstrained","2020-02 (Prague)","|Nothing To Do|","","`#103929 <https://github.com/llvm/llvm-project/issues/103929>`__","" +"`LWG3301 <https://wg21.link/LWG3301>`__","``transform_view::iterator``\ has incorrect ``iterator_category``\ ","2020-02 (Prague)","|Complete|","15","`#103932 <https://github.com/llvm/llvm-project/issues/103932>`__","" +"`LWG3302 <https://wg21.link/LWG3302>`__","Range adaptor objects ``keys``\ and ``values``\ are unspecified","2020-02 (Prague)","|Complete|","16","`#103933 <https://github.com/llvm/llvm-project/issues/103933>`__","" +"`LWG3303 <https://wg21.link/LWG3303>`__","Bad ""``constexpr``\ "" marker for ``destroy/destroy_n``\ ","2020-02 (Prague)","","","`#101693 <https://github.com/llvm/llvm-project/issues/101693>`__","" +"`LWG3304 <https://wg21.link/LWG3304>`__","Allocate functions of ``std::polymorphic_allocator``\ should require ``[[nodiscard]]``\ ","2020-02 (Prague)","|Complete|","16","`#103934 <https://github.com/llvm/llvm-project/issues/103934>`__","" +"`LWG3307 <https://wg21.link/LWG3307>`__","``std::allocator<void>().allocate(n)``\ ","2020-02 (Prague)","|Complete|","20","`#100422 <https://github.com/llvm/llvm-project/issues/100422>`__","" +"`LWG3310 <https://wg21.link/LWG3310>`__","Replace ``SIZE_MAX``\ with ``numeric_limits<size_t>::max()``\ ","2020-02 (Prague)","|Complete|","16","`#103936 <https://github.com/llvm/llvm-project/issues/103936>`__","" +"`LWG3313 <https://wg21.link/LWG3313>`__","``join_view::iterator::operator--``\ is incorrectly constrained","2020-02 (Prague)","|Complete|","14","`#103937 <https://github.com/llvm/llvm-project/issues/103937>`__","" +"`LWG3314 <https://wg21.link/LWG3314>`__","Is stream insertion behavior locale dependent when ``Period::type``\ is ``micro``\ ?","2020-02 (Prague)","|Complete|","16","`#103940 <https://github.com/llvm/llvm-project/issues/103940>`__","" +"`LWG3315 <https://wg21.link/LWG3315>`__","Correct Allocator Default Behavior","2020-02 (Prague)","|Complete|","","`#100426 <https://github.com/llvm/llvm-project/issues/100426>`__","" +"`LWG3316 <https://wg21.link/LWG3316>`__","Correctly define epoch for ``utc_clock``\ / ``utc_timepoint``\ ","2020-02 (Prague)","","","`#100428 <https://github.com/llvm/llvm-project/issues/100428>`__","" +"`LWG3317 <https://wg21.link/LWG3317>`__","Incorrect ``operator<<``\ for floating-point durations","2020-02 (Prague)","|Complete|","16","`#100429 <https://github.com/llvm/llvm-project/issues/100429>`__","" +"`LWG3318 <https://wg21.link/LWG3318>`__","Clarify whether clocks can represent time before their epoch","2020-02 (Prague)","","","`#100430 <https://github.com/llvm/llvm-project/issues/100430>`__","" +"`LWG3319 <https://wg21.link/LWG3319>`__","Properly reference specification of IANA time zone database","2020-02 (Prague)","|Nothing To Do|","","`#103941 <https://github.com/llvm/llvm-project/issues/103941>`__","" +"`LWG3320 <https://wg21.link/LWG3320>`__","``span::cbegin/cend``\ methods produce different results than ``std::[ranges::]cbegin/cend``\ ","2020-02 (Prague)","|Complete|","","`#103942 <https://github.com/llvm/llvm-project/issues/103942>`__","" +"`LWG3321 <https://wg21.link/LWG3321>`__","``uninitialized_construct_using_allocator``\ should use ``construct_at``\ ","2020-02 (Prague)","|Complete|","16","`#103943 <https://github.com/llvm/llvm-project/issues/103943>`__","" +"`LWG3323 <https://wg21.link/LWG3323>`__","``*has-tuple-element*``\ helper concept needs ``convertible_to``\ ","2020-02 (Prague)","|Complete|","16","`#103944 <https://github.com/llvm/llvm-project/issues/103944>`__","" +"`LWG3324 <https://wg21.link/LWG3324>`__","Special-case ``std::strong/weak/partial_order``\ for pointers","2020-02 (Prague)","|Complete|","14","`#103945 <https://github.com/llvm/llvm-project/issues/103945>`__","" +"`LWG3325 <https://wg21.link/LWG3325>`__","Constrain return type of transformation function for ``transform_view``\ ","2020-02 (Prague)","|Complete|","15","`#103947 <https://github.com/llvm/llvm-project/issues/103947>`__","" +"`LWG3326 <https://wg21.link/LWG3326>`__","``enable_view``\ has false positives","2020-02 (Prague)","|Complete|","15","`#103948 <https://github.com/llvm/llvm-project/issues/103948>`__","" +"`LWG3327 <https://wg21.link/LWG3327>`__","Format alignment specifiers vs. text direction","2020-02 (Prague)","|Nothing To Do|","","`#103949 <https://github.com/llvm/llvm-project/issues/103949>`__","" +"`LWG3328 <https://wg21.link/LWG3328>`__","Clarify that ``std::string``\ is not good for UTF-8","2020-02 (Prague)","|Nothing To Do|","","`#100431 <https://github.com/llvm/llvm-project/issues/100431>`__","" +"`LWG3329 <https://wg21.link/LWG3329>`__","``totally_ordered_with``\ both directly and indirectly requires ``common_reference_with``\ ","2020-02 (Prague)","|Complete|","13","`#103950 <https://github.com/llvm/llvm-project/issues/103950>`__","" +"`LWG3330 <https://wg21.link/LWG3330>`__","Include ``<compare>``\ from most library headers","2020-02 (Prague)","|Complete|","13","`#103951 <https://github.com/llvm/llvm-project/issues/103951>`__","" +"`LWG3331 <https://wg21.link/LWG3331>`__","Define ``totally_ordered/_with``\ in terms of ``partially-ordered-with``\ ","2020-02 (Prague)","|Complete|","13","`#103952 <https://github.com/llvm/llvm-project/issues/103952>`__","" +"`LWG3332 <https://wg21.link/LWG3332>`__","Issue in |sect|\ [time.format]","2020-02 (Prague)","|Complete|","16","`#103953 <https://github.com/llvm/llvm-project/issues/103953>`__","" +"`LWG3334 <https://wg21.link/LWG3334>`__","``basic_osyncstream``\ move assignment and destruction calls ``basic_syncbuf::emit()``\ twice","2020-02 (Prague)","|Complete|","18","`#103954 <https://github.com/llvm/llvm-project/issues/103954>`__","" +"`LWG3335 <https://wg21.link/LWG3335>`__","Resolve C++20 NB comments US 273 and GB 274","2020-02 (Prague)","|Complete|","15","`#103955 <https://github.com/llvm/llvm-project/issues/103955>`__","" +"`LWG3338 <https://wg21.link/LWG3338>`__","Rename ``default_constructible``\ to ``default_initializable``\ ","2020-02 (Prague)","|Complete|","13","`#103956 <https://github.com/llvm/llvm-project/issues/103956>`__","" +"`LWG3340 <https://wg21.link/LWG3340>`__","Formatting functions should throw on argument/format string mismatch in |sect|\ [format.functions]","2020-02 (Prague)","|Complete|","14","`#103957 <https://github.com/llvm/llvm-project/issues/103957>`__","" +"`LWG3346 <https://wg21.link/LWG3346>`__","``pair``\ and ``tuple``\ copy and move constructor have backwards specification","2020-02 (Prague)","|Nothing To Do|","","`#103958 <https://github.com/llvm/llvm-project/issues/103958>`__","" +"`LWG3347 <https://wg21.link/LWG3347>`__","``std::pair<T, U>``\ now requires ``T``\ and ``U``\ to be less-than-comparable","2020-02 (Prague)","|Complete|","17","`#103959 <https://github.com/llvm/llvm-project/issues/103959>`__","" +"`LWG3348 <https://wg21.link/LWG3348>`__","``__cpp_lib_unwrap_ref``\ in wrong header","2020-02 (Prague)","|Complete|","12","`#103960 <https://github.com/llvm/llvm-project/issues/103960>`__","" +"`LWG3349 <https://wg21.link/LWG3349>`__","Missing ``__cpp_lib_constexpr_complex``\ for P0415R1","2020-02 (Prague)","|Complete|","16","`#103961 <https://github.com/llvm/llvm-project/issues/103961>`__","" +"`LWG3350 <https://wg21.link/LWG3350>`__","Simplify return type of ``lexicographical_compare_three_way``\ ","2020-02 (Prague)","|Complete|","17","`#103962 <https://github.com/llvm/llvm-project/issues/103962>`__","" +"`LWG3351 <https://wg21.link/LWG3351>`__","``ranges::enable_safe_range``\ should not be constrained","2020-02 (Prague)","|Complete|","15","`#103963 <https://github.com/llvm/llvm-project/issues/103963>`__","" +"`LWG3352 <https://wg21.link/LWG3352>`__","``strong_equality``\ isn't a thing","2020-02 (Prague)","|Complete|","19","`#103964 <https://github.com/llvm/llvm-project/issues/103964>`__","" +"`LWG3354 <https://wg21.link/LWG3354>`__","``has_strong_structural_equality``\ has a meaningless definition","2020-02 (Prague)","|Nothing To Do|","","`#103965 <https://github.com/llvm/llvm-project/issues/103965>`__","" +"`LWG3355 <https://wg21.link/LWG3355>`__","The memory algorithms should support move-only input iterators introduced by P1207","2020-02 (Prague)","|Complete|","15","`#103966 <https://github.com/llvm/llvm-project/issues/103966>`__","" +"`LWG3356 <https://wg21.link/LWG3356>`__","``__cpp_lib_nothrow_convertible``\ should be ``__cpp_lib_is_nothrow_convertible``\ ","2020-02 (Prague)","|Complete|","12","`#103967 <https://github.com/llvm/llvm-project/issues/103967>`__","" +"`LWG3358 <https://wg21.link/LWG3358>`__","|sect|\ [span.cons] is mistaken that ``to_address``\ can throw","2020-02 (Prague)","|Complete|","17","`#103968 <https://github.com/llvm/llvm-project/issues/103968>`__","" +"`LWG3359 <https://wg21.link/LWG3359>`__","``<chrono>``\ leap second support should allow for negative leap seconds","2020-02 (Prague)","|Complete|","21","`#100432 <https://github.com/llvm/llvm-project/issues/100432>`__","" +"`LWG3360 <https://wg21.link/LWG3360>`__","``three_way_comparable_with``\ is inconsistent with similar concepts","2020-02 (Prague)","|Nothing To Do|","","`#103969 <https://github.com/llvm/llvm-project/issues/103969>`__","" +"`LWG3362 <https://wg21.link/LWG3362>`__","Strike ``stop_source``\ 's ``operator!=``\ ","2020-02 (Prague)","|Complete|","17","`#100433 <https://github.com/llvm/llvm-project/issues/100433>`__","" +"`LWG3363 <https://wg21.link/LWG3363>`__","``drop_while_view``\ should opt-out of ``sized_range``\ ","2020-02 (Prague)","|Nothing To Do|","","`#103970 <https://github.com/llvm/llvm-project/issues/103970>`__","" +"`LWG3364 <https://wg21.link/LWG3364>`__","Initialize data members of ranges and their iterators","2020-02 (Prague)","|Complete|","16","`#103971 <https://github.com/llvm/llvm-project/issues/103971>`__","" +"`LWG3367 <https://wg21.link/LWG3367>`__","Integer-class conversions should not throw","2020-02 (Prague)","|Nothing To Do|","","`#103973 <https://github.com/llvm/llvm-project/issues/103973>`__","" +"`LWG3369 <https://wg21.link/LWG3369>`__","``span``\ 's deduction-guide for built-in arrays doesn't work","2020-02 (Prague)","|Complete|","14","`#103974 <https://github.com/llvm/llvm-project/issues/103974>`__","" +"`LWG3371 <https://wg21.link/LWG3371>`__","``visit_format_arg``\ and ``make_format_args``\ are not hidden friends","2020-02 (Prague)","|Complete|","14","`#103975 <https://github.com/llvm/llvm-project/issues/103975>`__","" +"`LWG3372 <https://wg21.link/LWG3372>`__","``vformat_to``\ should not try to deduce ``Out``\ twice","2020-02 (Prague)","|Complete|","14","`#103976 <https://github.com/llvm/llvm-project/issues/103976>`__","" +"`LWG3373 <https://wg21.link/LWG3373>`__","``{to,from}_chars_result``\ and ``format_to_n_result``\ need the ""we really mean what we say"" wording","2020-02 (Prague)","|Complete|","14","`#103977 <https://github.com/llvm/llvm-project/issues/103977>`__","" +"`LWG3374 <https://wg21.link/LWG3374>`__","P0653 + P1006 should have made the other ``std::to_address``\ overload ``constexpr``\ ","2020-02 (Prague)","|Complete|","12","`#103978 <https://github.com/llvm/llvm-project/issues/103978>`__","" +"`LWG3375 <https://wg21.link/LWG3375>`__","``decay``\ in ``viewable_range``\ should be ``remove_cvref``\ ","2020-02 (Prague)","|Complete|","15","`#103979 <https://github.com/llvm/llvm-project/issues/103979>`__","" +"`LWG3377 <https://wg21.link/LWG3377>`__","``elements_view::iterator``\ befriends a specialization of itself","2020-02 (Prague)","|Nothing To Do|","","`#103981 <https://github.com/llvm/llvm-project/issues/103981>`__","" +"`LWG3379 <https://wg21.link/LWG3379>`__","""``safe``\ "" in several library names is misleading","2020-02 (Prague)","|Complete|","15","`#103982 <https://github.com/llvm/llvm-project/issues/103982>`__","" +"`LWG3380 <https://wg21.link/LWG3380>`__","``common_type``\ and comparison categories","2020-02 (Prague)","|Complete|","15","`#103983 <https://github.com/llvm/llvm-project/issues/103983>`__","" +"`LWG3381 <https://wg21.link/LWG3381>`__","``begin``\ and ``data``\ must agree for ``contiguous_range``\ ","2020-02 (Prague)","|Nothing To Do|","","`#103984 <https://github.com/llvm/llvm-project/issues/103984>`__","" +"`LWG3382 <https://wg21.link/LWG3382>`__","NTTP for ``pair``\ and ``array``\ ","2020-02 (Prague)","|Nothing To Do|","","`#103985 <https://github.com/llvm/llvm-project/issues/103985>`__","" +"`LWG3383 <https://wg21.link/LWG3383>`__","|sect|\ [time.zone.leap.nonmembers] ``sys_seconds``\ should be replaced with ``seconds``\ ","2020-02 (Prague)","|Complete|","19","`#103987 <https://github.com/llvm/llvm-project/issues/103987>`__","" +"`LWG3384 <https://wg21.link/LWG3384>`__","``transform_view::*sentinel*``\ has an incorrect ``operator-``\ ","2020-02 (Prague)","|Complete|","15","`#103988 <https://github.com/llvm/llvm-project/issues/103988>`__","" +"`LWG3385 <https://wg21.link/LWG3385>`__","``common_iterator``\ is not sufficiently constrained for non-copyable iterators","2020-02 (Prague)","|Complete|","15","`#103989 <https://github.com/llvm/llvm-project/issues/103989>`__","" +"`LWG3387 <https://wg21.link/LWG3387>`__","|sect|\ [range.reverse.view] ``reverse_view<V>``\ unintentionally requires ``range<const V>``\ ","2020-02 (Prague)","|Complete|","15","`#103990 <https://github.com/llvm/llvm-project/issues/103990>`__","" +"`LWG3388 <https://wg21.link/LWG3388>`__","``view``\ iterator types have ill-formed ``<=>``\ operators","2020-02 (Prague)","|Complete|","16","`#103991 <https://github.com/llvm/llvm-project/issues/103991>`__","" +"`LWG3389 <https://wg21.link/LWG3389>`__","A move-only iterator still does not have a ``counted_iterator``\ ","2020-02 (Prague)","|Complete|","15","`#103992 <https://github.com/llvm/llvm-project/issues/103992>`__","" +"`LWG3390 <https://wg21.link/LWG3390>`__","``make_move_iterator()``\ cannot be used to construct a ``move_iterator``\ for a move-only iterator","2020-02 (Prague)","|Complete|","14","`#103993 <https://github.com/llvm/llvm-project/issues/103993>`__","" +"`LWG3393 <https://wg21.link/LWG3393>`__","Missing/incorrect feature test macro for coroutines","2020-02 (Prague)","|Complete|","14","`#103994 <https://github.com/llvm/llvm-project/issues/103994>`__","" +"`LWG3395 <https://wg21.link/LWG3395>`__","Definition for three-way comparison needs to be updated (US 152)","2020-02 (Prague)","|Nothing To Do|","","`#100434 <https://github.com/llvm/llvm-project/issues/100434>`__","" +"`LWG3396 <https://wg21.link/LWG3396>`__","Clarify point of reference for ``source_location::current()``\ (DE 169)","2020-02 (Prague)","|Nothing To Do|","16","`#103995 <https://github.com/llvm/llvm-project/issues/103995>`__","" +"`LWG3397 <https://wg21.link/LWG3397>`__","``ranges::basic_istream_view::iterator``\ should not provide ``iterator_category``\ ","2020-02 (Prague)","|Complete|","16","`#103996 <https://github.com/llvm/llvm-project/issues/103996>`__","" +"`LWG3398 <https://wg21.link/LWG3398>`__","``tuple_element_t``\ is also wrong for ``const subrange``\ ","2020-02 (Prague)","|Complete|","14","`#103997 <https://github.com/llvm/llvm-project/issues/103997>`__","" "","","","","","" -"`LWG3446 <https://wg21.link/LWG3446>`__","``indirectly_readable_traits``\ ambiguity for types with both ``value_type``\ and ``element_type``\ ","2020-11 (Virtual)","|Complete|","13","" +"`LWG3446 <https://wg21.link/LWG3446>`__","``indirectly_readable_traits``\ ambiguity for types with both ``value_type``\ and ``element_type``\ ","2020-11 (Virtual)","|Complete|","13","`#103998 <https://github.com/llvm/llvm-project/issues/103998>`__","" diff --git a/libcxx/docs/Status/Cxx20Papers.csv b/libcxx/docs/Status/Cxx20Papers.csv index e692bb2dc088..a0c49df0a3f8 100644 --- a/libcxx/docs/Status/Cxx20Papers.csv +++ b/libcxx/docs/Status/Cxx20Papers.csv @@ -1,206 +1,206 @@ "Paper #","Paper Name","Meeting","Status","First released version","Notes" -"`P0463R1 <https://wg21.link/P0463R1>`__","Endian just Endian","2017-07 (Toronto)","|Complete|","7","" -"`P0674R1 <https://wg21.link/P0674R1>`__","Extending make_shared to Support Arrays","2017-07 (Toronto)","|Complete|","15","" +"`P0463R1 <https://wg21.link/P0463R1>`__","Endian just Endian","2017-07 (Toronto)","|Complete|","7","`#103999 <https://github.com/llvm/llvm-project/issues/103999>`__","" +"`P0674R1 <https://wg21.link/P0674R1>`__","Extending make_shared to Support Arrays","2017-07 (Toronto)","|Complete|","15","`#104000 <https://github.com/llvm/llvm-project/issues/104000>`__","" "","","","","","" -"`P0020R6 <https://wg21.link/P0020R6>`__","Floating Point Atomic","2017-11 (Albuquerque)","|Complete|","18","The feature-test macro was not set until LLVM 20." -"`P0053R7 <https://wg21.link/P0053R7>`__","C++ Synchronized Buffered Ostream","2017-11 (Albuquerque)","|Complete|","18","" -"`P0202R3 <https://wg21.link/P0202R3>`__","Add constexpr modifiers to functions in <algorithm> and <utility> Headers","2017-11 (Albuquerque)","|Complete|","12","" -"`P0415R1 <https://wg21.link/P0415R1>`__","Constexpr for ``std::complex``\ ","2017-11 (Albuquerque)","|Complete|","16","" -"`P0439R0 <https://wg21.link/P0439R0>`__","Make ``std::memory_order``\ a scoped enumeration","2017-11 (Albuquerque)","|Complete|","","" -"`P0457R2 <https://wg21.link/P0457R2>`__","String Prefix and Suffix Checking","2017-11 (Albuquerque)","|Complete|","6","" -"`P0550R2 <https://wg21.link/P0550R2>`__","Transformation Trait ``remove_cvref``\ ","2017-11 (Albuquerque)","|Complete|","6","" -"`P0600R1 <https://wg21.link/P0600R1>`__","nodiscard in the Library","2017-11 (Albuquerque)","|Complete|","16","" -"`P0616R0 <https://wg21.link/P0616R0>`__","de-pessimize legacy <numeric> algorithms with std::move","2017-11 (Albuquerque)","|Complete|","12","" -"`P0653R2 <https://wg21.link/P0653R2>`__","Utility to convert a pointer to a raw pointer","2017-11 (Albuquerque)","|Complete|","6","" -"`P0718R2 <https://wg21.link/P0718R2>`__","Atomic shared_ptr","2017-11 (Albuquerque)","","","" -"`P0767R1 <https://wg21.link/P0767R1>`__","Deprecate POD","2017-11 (Albuquerque)","|Complete|","21","It was previously erroneously marked as complete in LLVM 7." -"`P0768R1 <https://wg21.link/P0768R1>`__","Library Support for the Spaceship (Comparison) Operator","2017-11 (Albuquerque)","|Complete|","","" -"`P0777R1 <https://wg21.link/P0777R1>`__","Treating Unnecessary ``decay``\ ","2017-11 (Albuquerque)","|Complete|","7","" +"`P0020R6 <https://wg21.link/P0020R6>`__","Floating Point Atomic","2017-11 (Albuquerque)","|Complete|","18","`#104001 <https://github.com/llvm/llvm-project/issues/104001>`__","The feature-test macro was not set until LLVM 20." +"`P0053R7 <https://wg21.link/P0053R7>`__","C++ Synchronized Buffered Ostream","2017-11 (Albuquerque)","|Complete|","18","`#104002 <https://github.com/llvm/llvm-project/issues/104002>`__","" +"`P0202R3 <https://wg21.link/P0202R3>`__","Add constexpr modifiers to functions in <algorithm> and <utility> Headers","2017-11 (Albuquerque)","|Complete|","12","`#104003 <https://github.com/llvm/llvm-project/issues/104003>`__","" +"`P0415R1 <https://wg21.link/P0415R1>`__","Constexpr for ``std::complex``\ ","2017-11 (Albuquerque)","|Complete|","16","`#104004 <https://github.com/llvm/llvm-project/issues/104004>`__","" +"`P0439R0 <https://wg21.link/P0439R0>`__","Make ``std::memory_order``\ a scoped enumeration","2017-11 (Albuquerque)","|Complete|","","`#104005 <https://github.com/llvm/llvm-project/issues/104005>`__","" +"`P0457R2 <https://wg21.link/P0457R2>`__","String Prefix and Suffix Checking","2017-11 (Albuquerque)","|Complete|","6","`#104006 <https://github.com/llvm/llvm-project/issues/104006>`__","" +"`P0550R2 <https://wg21.link/P0550R2>`__","Transformation Trait ``remove_cvref``\ ","2017-11 (Albuquerque)","|Complete|","6","`#104007 <https://github.com/llvm/llvm-project/issues/104007>`__","" +"`P0600R1 <https://wg21.link/P0600R1>`__","nodiscard in the Library","2017-11 (Albuquerque)","|Complete|","16","`#104010 <https://github.com/llvm/llvm-project/issues/104010>`__","" +"`P0616R0 <https://wg21.link/P0616R0>`__","de-pessimize legacy <numeric> algorithms with std::move","2017-11 (Albuquerque)","|Complete|","12","`#104011 <https://github.com/llvm/llvm-project/issues/104011>`__","" +"`P0653R2 <https://wg21.link/P0653R2>`__","Utility to convert a pointer to a raw pointer","2017-11 (Albuquerque)","|Complete|","6","`#104012 <https://github.com/llvm/llvm-project/issues/104012>`__","" +"`P0718R2 <https://wg21.link/P0718R2>`__","Atomic shared_ptr","2017-11 (Albuquerque)","","","`#99980 <https://github.com/llvm/llvm-project/issues/99980>`__","" +"`P0767R1 <https://wg21.link/P0767R1>`__","Deprecate POD","2017-11 (Albuquerque)","|Complete|","21","`#104013 <https://github.com/llvm/llvm-project/issues/104013>`__","It was previously erroneously marked as complete in LLVM 7." +"`P0768R1 <https://wg21.link/P0768R1>`__","Library Support for the Spaceship (Comparison) Operator","2017-11 (Albuquerque)","|Complete|","","`#104014 <https://github.com/llvm/llvm-project/issues/104014>`__","" +"`P0777R1 <https://wg21.link/P0777R1>`__","Treating Unnecessary ``decay``\ ","2017-11 (Albuquerque)","|Complete|","7","`#104016 <https://github.com/llvm/llvm-project/issues/104016>`__","" "","","","","","" -"`P0122R7 <https://wg21.link/P0122R7>`__","<span>","2018-03 (Jacksonville)","|Complete|","7","" -"`P0355R7 <https://wg21.link/P0355R7>`__","Extending chrono to Calendars and Time Zones","2018-03 (Jacksonville)","|Partial|","","See the `Github issue <https://github.com/llvm/llvm-project/issues/99982>`__ for detailed status" -"`P0551R3 <https://wg21.link/P0551R3>`__","Thou Shalt Not Specialize ``std``\ Function Templates!","2018-03 (Jacksonville)","|Complete|","11","" -"`P0753R2 <https://wg21.link/P0753R2>`__","Manipulators for C++ Synchronized Buffered Ostream","2018-03 (Jacksonville)","","","" -"`P0754R2 <https://wg21.link/P0754R2>`__","<version>","2018-03 (Jacksonville)","|Complete|","7","" -"`P0809R0 <https://wg21.link/P0809R0>`__","Comparing Unordered Containers","2018-03 (Jacksonville)","|Nothing To Do|","","" -"`P0858R0 <https://wg21.link/P0858R0>`__","Constexpr iterator requirements","2018-03 (Jacksonville)","|Complete|","12","" -"`P0905R1 <https://wg21.link/P0905R1>`__","Symmetry for spaceship","2018-03 (Jacksonville)","|Complete|","7","" -"`P0966R1 <https://wg21.link/P0966R1>`__","``string::reserve``\ Should Not Shrink","2018-03 (Jacksonville)","|Complete|","12","It was previously erroneously marked as complete in version 8. See `bug 45368 <https://llvm.org/PR45368>`__" +"`P0122R7 <https://wg21.link/P0122R7>`__","<span>","2018-03 (Jacksonville)","|Complete|","7","`#104017 <https://github.com/llvm/llvm-project/issues/104017>`__","" +"`P0355R7 <https://wg21.link/P0355R7>`__","Extending chrono to Calendars and Time Zones","2018-03 (Jacksonville)","|Partial|","","`#99982 <https://github.com/llvm/llvm-project/issues/99982>`__","See the `Github issue <https://github.com/llvm/llvm-project/issues/99982>`__ for detailed status" +"`P0551R3 <https://wg21.link/P0551R3>`__","Thou Shalt Not Specialize ``std``\ Function Templates!","2018-03 (Jacksonville)","|Complete|","11","`#104018 <https://github.com/llvm/llvm-project/issues/104018>`__","" +"`P0753R2 <https://wg21.link/P0753R2>`__","Manipulators for C++ Synchronized Buffered Ostream","2018-03 (Jacksonville)","","","`#99983 <https://github.com/llvm/llvm-project/issues/99983>`__","" +"`P0754R2 <https://wg21.link/P0754R2>`__","<version>","2018-03 (Jacksonville)","|Complete|","7","`#104021 <https://github.com/llvm/llvm-project/issues/104021>`__","" +"`P0809R0 <https://wg21.link/P0809R0>`__","Comparing Unordered Containers","2018-03 (Jacksonville)","|Nothing To Do|","","`#104022 <https://github.com/llvm/llvm-project/issues/104022>`__","" +"`P0858R0 <https://wg21.link/P0858R0>`__","Constexpr iterator requirements","2018-03 (Jacksonville)","|Complete|","12","`#104024 <https://github.com/llvm/llvm-project/issues/104024>`__","" +"`P0905R1 <https://wg21.link/P0905R1>`__","Symmetry for spaceship","2018-03 (Jacksonville)","|Complete|","7","`#104025 <https://github.com/llvm/llvm-project/issues/104025>`__","" +"`P0966R1 <https://wg21.link/P0966R1>`__","``string::reserve``\ Should Not Shrink","2018-03 (Jacksonville)","|Complete|","12","`#104026 <https://github.com/llvm/llvm-project/issues/104026>`__","It was previously erroneously marked as complete in version 8. See `bug 45368 <https://llvm.org/PR45368>`__" "","","","","","" -"`P0019R8 <https://wg21.link/P0019R8>`__","Atomic Ref","2018-06 (Rapperswil)","|Complete|","19","" -"`P0458R2 <https://wg21.link/P0458R2>`__","Checking for Existence of an Element in Associative Containers","2018-06 (Rapperswil)","|Complete|","13","" -"`P0475R1 <https://wg21.link/P0475R1>`__","LWG 2511: guaranteed copy elision for piecewise construction","2018-06 (Rapperswil)","|Complete|","","" -"`P0476R2 <https://wg21.link/P0476R2>`__","Bit-casting object representations","2018-06 (Rapperswil)","|Complete|","14","" -"`P0528R3 <https://wg21.link/P0528R3>`__","The Curious Case of Padding Bits, Featuring Atomic Compare-and-Exchange","2018-06 (Rapperswil)","","","" -"`P0542R5 <https://wg21.link/P0542R5>`__","Support for contract based programming in C++","2018-06 (Rapperswil)","|Nothing To Do|","n/a","Pulled at the 2019-07 meeting in Cologne" -"`P0556R3 <https://wg21.link/P0556R3>`__","Integral power-of-2 operations","2018-06 (Rapperswil)","|Complete|","9","" -"`P0619R4 <https://wg21.link/P0619R4>`__","Reviewing Deprecated Facilities of C++17 for C++20","2018-06 (Rapperswil)","|Complete|","20","Removed headers are still provided as an extension, but with deprecation warnings." -"`P0646R1 <https://wg21.link/P0646R1>`__","Improving the Return Value of Erase-Like Algorithms","2018-06 (Rapperswil)","|Complete|","10","" -"`P0722R3 <https://wg21.link/P0722R3>`__","Efficient sized delete for variable sized classes","2018-06 (Rapperswil)","|Complete|","9","" -"`P0758R1 <https://wg21.link/P0758R1>`__","Implicit conversion traits and utility functions","2018-06 (Rapperswil)","|Complete|","","" -"`P0759R1 <https://wg21.link/P0759R1>`__","fpos Requirements","2018-06 (Rapperswil)","|Complete|","11","" -"`P0769R2 <https://wg21.link/P0769R2>`__","Add shift to <algorithm>","2018-06 (Rapperswil)","|Complete|","12","" -"`P0788R3 <https://wg21.link/P0788R3>`__","Standard Library Specification in a Concepts and Contracts World","2018-06 (Rapperswil)","|Nothing To Do|","n/a","Pulled at the 2019-07 meeting in Cologne" -"`P0879R0 <https://wg21.link/P0879R0>`__","Constexpr for swap and swap related functions Also resolves LWG issue 2800.","2018-06 (Rapperswil)","|Complete|","13","" -"`P0887R1 <https://wg21.link/P0887R1>`__","The identity metafunction","2018-06 (Rapperswil)","|Complete|","8","" -"`P0892R2 <https://wg21.link/P0892R2>`__","P0892R2: explicit(bool)","2018-06 (Rapperswil)","|Nothing To Do|","","" -"`P0898R3 <https://wg21.link/P0898R3>`__","Standard Library Concepts","2018-06 (Rapperswil)","|Complete|","13","" -"`P0935R0 <https://wg21.link/P0935R0>`__","Eradicating unnecessarily explicit default constructors from the standard library","2018-06 (Rapperswil)","|Complete|","12","" -"`P0941R2 <https://wg21.link/P0941R2>`__","Integrating feature-test macros into the C++ WD","2018-06 (Rapperswil)","|In Progress|","","" -"`P1023R0 <https://wg21.link/P1023R0>`__","constexpr comparison operators for std::array","2018-06 (Rapperswil)","|Complete|","8","" -"`P1025R1 <https://wg21.link/P1025R1>`__","Update The Reference To The Unicode Standard","2018-06 (Rapperswil)","","","" -"`P1120R0 <https://wg21.link/P1120R0>`__","Consistency improvements for <=> and other comparison operators","2018-06 (Rapperswil)","","","" +"`P0019R8 <https://wg21.link/P0019R8>`__","Atomic Ref","2018-06 (Rapperswil)","|Complete|","19","`#104028 <https://github.com/llvm/llvm-project/issues/104028>`__","" +"`P0458R2 <https://wg21.link/P0458R2>`__","Checking for Existence of an Element in Associative Containers","2018-06 (Rapperswil)","|Complete|","13","`#104029 <https://github.com/llvm/llvm-project/issues/104029>`__","" +"`P0475R1 <https://wg21.link/P0475R1>`__","LWG 2511: guaranteed copy elision for piecewise construction","2018-06 (Rapperswil)","|Complete|","","`#104031 <https://github.com/llvm/llvm-project/issues/104031>`__","" +"`P0476R2 <https://wg21.link/P0476R2>`__","Bit-casting object representations","2018-06 (Rapperswil)","|Complete|","14","`#104087 <https://github.com/llvm/llvm-project/issues/104087>`__","" +"`P0528R3 <https://wg21.link/P0528R3>`__","The Curious Case of Padding Bits, Featuring Atomic Compare-and-Exchange","2018-06 (Rapperswil)","","","`#99984 <https://github.com/llvm/llvm-project/issues/99984>`__","" +"`P0542R5 <https://wg21.link/P0542R5>`__","Support for contract based programming in C++","2018-06 (Rapperswil)","|Nothing To Do|","n/a","`#104089 <https://github.com/llvm/llvm-project/issues/104089>`__","Pulled at the 2019-07 meeting in Cologne" +"`P0556R3 <https://wg21.link/P0556R3>`__","Integral power-of-2 operations","2018-06 (Rapperswil)","|Complete|","9","`#104090 <https://github.com/llvm/llvm-project/issues/104090>`__","" +"`P0619R4 <https://wg21.link/P0619R4>`__","Reviewing Deprecated Facilities of C++17 for C++20","2018-06 (Rapperswil)","|Complete|","20","`#99985 <https://github.com/llvm/llvm-project/issues/99985>`__","Removed headers are still provided as an extension, but with deprecation warnings." +"`P0646R1 <https://wg21.link/P0646R1>`__","Improving the Return Value of Erase-Like Algorithms","2018-06 (Rapperswil)","|Complete|","10","`#104091 <https://github.com/llvm/llvm-project/issues/104091>`__","" +"`P0722R3 <https://wg21.link/P0722R3>`__","Efficient sized delete for variable sized classes","2018-06 (Rapperswil)","|Complete|","9","`#104092 <https://github.com/llvm/llvm-project/issues/104092>`__","" +"`P0758R1 <https://wg21.link/P0758R1>`__","Implicit conversion traits and utility functions","2018-06 (Rapperswil)","|Complete|","","`#104093 <https://github.com/llvm/llvm-project/issues/104093>`__","" +"`P0759R1 <https://wg21.link/P0759R1>`__","fpos Requirements","2018-06 (Rapperswil)","|Complete|","11","`#104094 <https://github.com/llvm/llvm-project/issues/104094>`__","" +"`P0769R2 <https://wg21.link/P0769R2>`__","Add shift to <algorithm>","2018-06 (Rapperswil)","|Complete|","12","`#104095 <https://github.com/llvm/llvm-project/issues/104095>`__","" +"`P0788R3 <https://wg21.link/P0788R3>`__","Standard Library Specification in a Concepts and Contracts World","2018-06 (Rapperswil)","|Nothing To Do|","n/a","`#104096 <https://github.com/llvm/llvm-project/issues/104096>`__","Pulled at the 2019-07 meeting in Cologne" +"`P0879R0 <https://wg21.link/P0879R0>`__","Constexpr for swap and swap related functions Also resolves LWG issue 2800.","2018-06 (Rapperswil)","|Complete|","13","`#104097 <https://github.com/llvm/llvm-project/issues/104097>`__","" +"`P0887R1 <https://wg21.link/P0887R1>`__","The identity metafunction","2018-06 (Rapperswil)","|Complete|","8","`#104099 <https://github.com/llvm/llvm-project/issues/104099>`__","" +"`P0892R2 <https://wg21.link/P0892R2>`__","P0892R2: explicit(bool)","2018-06 (Rapperswil)","|Nothing To Do|","","`#100597 <https://github.com/llvm/llvm-project/issues/100597>`__","" +"`P0898R3 <https://wg21.link/P0898R3>`__","Standard Library Concepts","2018-06 (Rapperswil)","|Complete|","13","`#104100 <https://github.com/llvm/llvm-project/issues/104100>`__","" +"`P0935R0 <https://wg21.link/P0935R0>`__","Eradicating unnecessarily explicit default constructors from the standard library","2018-06 (Rapperswil)","|Complete|","12","`#104101 <https://github.com/llvm/llvm-project/issues/104101>`__","" +"`P0941R2 <https://wg21.link/P0941R2>`__","Integrating feature-test macros into the C++ WD","2018-06 (Rapperswil)","|In Progress|","","`#99986 <https://github.com/llvm/llvm-project/issues/99986>`__","" +"`P1023R0 <https://wg21.link/P1023R0>`__","constexpr comparison operators for std::array","2018-06 (Rapperswil)","|Complete|","8","`#104103 <https://github.com/llvm/llvm-project/issues/104103>`__","" +"`P1025R1 <https://wg21.link/P1025R1>`__","Update The Reference To The Unicode Standard","2018-06 (Rapperswil)","","","`#100598 <https://github.com/llvm/llvm-project/issues/100598>`__","" +"`P1120R0 <https://wg21.link/P1120R0>`__","Consistency improvements for <=> and other comparison operators","2018-06 (Rapperswil)","","","`#99989 <https://github.com/llvm/llvm-project/issues/99989>`__","" "","","","","","" -"`P0318R1 <https://wg21.link/P0318R1>`__","unwrap_ref_decay and unwrap_reference","2018-11 (San Diego)","|Complete|","8","" -"`P0356R5 <https://wg21.link/P0356R5>`__","Simplified partial function application","2018-11 (San Diego)","|Complete|","13","" -"`P0357R3 <https://wg21.link/P0357R3>`__","reference_wrapper for incomplete types","2018-11 (San Diego)","|Complete|","8","" -"`P0482R6 <https://wg21.link/P0482R6>`__","char8_t: A type for UTF-8 characters and strings","2018-11 (San Diego)","|Complete|","16","" -"`P0487R1 <https://wg21.link/P0487R1>`__","Fixing ``operator>>(basic_istream&, CharT*)``\ (LWG 2499)","2018-11 (San Diego)","|Complete|","8","" -"`P0591R4 <https://wg21.link/P0591R4>`__","Utility functions to implement uses-allocator construction","2018-11 (San Diego)","|Partial|","","The changes in [mem.poly.allocator.mem] are missing" -"`P0595R2 <https://wg21.link/P0595R2>`__","std::is_constant_evaluated()","2018-11 (San Diego)","|Complete|","9","" -"`P0602R4 <https://wg21.link/P0602R4>`__","variant and optional should propagate copy/move triviality","2018-11 (San Diego)","|Complete|","8","" -"`P0608R3 <https://wg21.link/P0608R3>`__","A sane variant converting constructor","2018-11 (San Diego)","|Complete|","9","" -"`P0655R1 <https://wg21.link/P0655R1>`__","visit<R>: Explicit Return Type for visit","2018-11 (San Diego)","|Complete|","12","" -"`P0771R1 <https://wg21.link/P0771R1>`__","std::function move constructor should be noexcept","2018-11 (San Diego)","|Complete|","6","" -"`P0896R4 <https://wg21.link/P0896R4>`__","The One Ranges Proposal","2018-11 (San Diego)","|Complete|","15","" -"`P0899R1 <https://wg21.link/P0899R1>`__","P0899R1 - LWG 3016 is not a defect","2018-11 (San Diego)","|Nothing To Do|","","" -"`P0919R3 <https://wg21.link/P0919R3>`__","Heterogeneous lookup for unordered containers","2018-11 (San Diego)","|Complete|","12","" -"`P0972R0 <https://wg21.link/P0972R0>`__","<chrono> ``zero()``\ , ``min()``\ , and ``max()``\ should be noexcept","2018-11 (San Diego)","|Complete|","8","" -"`P1006R1 <https://wg21.link/P1006R1>`__","Constexpr in std::pointer_traits","2018-11 (San Diego)","|Complete|","8","" -"`P1007R3 <https://wg21.link/P1007R3>`__","``std::assume_aligned``\ ","2018-11 (San Diego)","|Complete|","15","" -"`P1020R1 <https://wg21.link/P1020R1>`__","Smart pointer creation with default initialization","2018-11 (San Diego)","|Complete|","16","The feature-test macro was not set until LLVM 20." -"`P1032R1 <https://wg21.link/P1032R1>`__","Misc constexpr bits","2018-11 (San Diego)","|Complete|","13","" -"`P1085R2 <https://wg21.link/P1085R2>`__","Should Span be Regular?","2018-11 (San Diego)","|Complete|","8","" -"`P1123R0 <https://wg21.link/P1123R0>`__","Editorial Guidance for merging P0019r8 and P0528r3","2018-11 (San Diego)","","","" -"`P1148R0 <https://wg21.link/P1148R0>`__","Cleaning up Clause 20","2018-11 (San Diego)","","","" -"`P1165R1 <https://wg21.link/P1165R1>`__","Make stateful allocator propagation more consistent for ``operator+(basic_string)``\ ","2018-11 (San Diego)","|Complete|","15","" -"`P1209R0 <https://wg21.link/P1209R0>`__","Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20","2018-11 (San Diego)","|Complete|","8","" -"`P1210R0 <https://wg21.link/P1210R0>`__","P1210R0: Completing the Rebase of Library Fundamentals, Version 3, Working Draft","2018-11 (San Diego)","|Nothing To Do|","","" -"`P1236R1 <https://wg21.link/P1236R1>`__","Alternative Wording for P0907R4 Signed Integers are Two's Complement","2018-11 (San Diego)","","","" -"`P1248R1 <https://wg21.link/P1248R1>`__","Remove CommonReference requirement from StrictWeakOrdering (a.k.a Fixing Relations)","2018-11 (San Diego)","|Complete|","13","" -"`P1285R0 <https://wg21.link/P1285R0>`__","Improving Completeness Requirements for Type Traits","2018-11 (San Diego)","","","" -"`P1353R0 <https://wg21.link/P1353R0>`__","Missing feature test macros","2018-11 (San Diego)","|Complete|","19","" +"`P0318R1 <https://wg21.link/P0318R1>`__","unwrap_ref_decay and unwrap_reference","2018-11 (San Diego)","|Complete|","8","`#104105 <https://github.com/llvm/llvm-project/issues/104105>`__","" +"`P0356R5 <https://wg21.link/P0356R5>`__","Simplified partial function application","2018-11 (San Diego)","|Complete|","13","`#104106 <https://github.com/llvm/llvm-project/issues/104106>`__","" +"`P0357R3 <https://wg21.link/P0357R3>`__","reference_wrapper for incomplete types","2018-11 (San Diego)","|Complete|","8","`#104107 <https://github.com/llvm/llvm-project/issues/104107>`__","" +"`P0482R6 <https://wg21.link/P0482R6>`__","char8_t: A type for UTF-8 characters and strings","2018-11 (San Diego)","|Complete|","16","`#104108 <https://github.com/llvm/llvm-project/issues/104108>`__","" +"`P0487R1 <https://wg21.link/P0487R1>`__","Fixing ``operator>>(basic_istream&, CharT*)``\ (LWG 2499)","2018-11 (San Diego)","|Complete|","8","`#104110 <https://github.com/llvm/llvm-project/issues/104110>`__","" +"`P0591R4 <https://wg21.link/P0591R4>`__","Utility functions to implement uses-allocator construction","2018-11 (San Diego)","|Partial|","","`#99990 <https://github.com/llvm/llvm-project/issues/99990>`__","The changes in [mem.poly.allocator.mem] are missing" +"`P0595R2 <https://wg21.link/P0595R2>`__","std::is_constant_evaluated()","2018-11 (San Diego)","|Complete|","9","`#104111 <https://github.com/llvm/llvm-project/issues/104111>`__","" +"`P0602R4 <https://wg21.link/P0602R4>`__","variant and optional should propagate copy/move triviality","2018-11 (San Diego)","|Complete|","8","`#104112 <https://github.com/llvm/llvm-project/issues/104112>`__","" +"`P0608R3 <https://wg21.link/P0608R3>`__","A sane variant converting constructor","2018-11 (San Diego)","|Complete|","9","`#104113 <https://github.com/llvm/llvm-project/issues/104113>`__","" +"`P0655R1 <https://wg21.link/P0655R1>`__","visit<R>: Explicit Return Type for visit","2018-11 (San Diego)","|Complete|","12","`#104115 <https://github.com/llvm/llvm-project/issues/104115>`__","" +"`P0771R1 <https://wg21.link/P0771R1>`__","std::function move constructor should be noexcept","2018-11 (San Diego)","|Complete|","6","`#104116 <https://github.com/llvm/llvm-project/issues/104116>`__","" +"`P0896R4 <https://wg21.link/P0896R4>`__","The One Ranges Proposal","2018-11 (San Diego)","|Complete|","15","`#104118 <https://github.com/llvm/llvm-project/issues/104118>`__","" +"`P0899R1 <https://wg21.link/P0899R1>`__","P0899R1 - LWG 3016 is not a defect","2018-11 (San Diego)","|Nothing To Do|","","`#104120 <https://github.com/llvm/llvm-project/issues/104120>`__","" +"`P0919R3 <https://wg21.link/P0919R3>`__","Heterogeneous lookup for unordered containers","2018-11 (San Diego)","|Complete|","12","`#104122 <https://github.com/llvm/llvm-project/issues/104122>`__","" +"`P0972R0 <https://wg21.link/P0972R0>`__","<chrono> ``zero()``\ , ``min()``\ , and ``max()``\ should be noexcept","2018-11 (San Diego)","|Complete|","8","`#104123 <https://github.com/llvm/llvm-project/issues/104123>`__","" +"`P1006R1 <https://wg21.link/P1006R1>`__","Constexpr in std::pointer_traits","2018-11 (San Diego)","|Complete|","8","`#104124 <https://github.com/llvm/llvm-project/issues/104124>`__","" +"`P1007R3 <https://wg21.link/P1007R3>`__","``std::assume_aligned``\ ","2018-11 (San Diego)","|Complete|","15","`#104125 <https://github.com/llvm/llvm-project/issues/104125>`__","" +"`P1020R1 <https://wg21.link/P1020R1>`__","Smart pointer creation with default initialization","2018-11 (San Diego)","|Complete|","16","`#104126 <https://github.com/llvm/llvm-project/issues/104126>`__","The feature-test macro was not set until LLVM 20." +"`P1032R1 <https://wg21.link/P1032R1>`__","Misc constexpr bits","2018-11 (San Diego)","|Complete|","13","`#104127 <https://github.com/llvm/llvm-project/issues/104127>`__","" +"`P1085R2 <https://wg21.link/P1085R2>`__","Should Span be Regular?","2018-11 (San Diego)","|Complete|","8","`#104128 <https://github.com/llvm/llvm-project/issues/104128>`__","" +"`P1123R0 <https://wg21.link/P1123R0>`__","Editorial Guidance for merging P0019r8 and P0528r3","2018-11 (San Diego)","","","`#99991 <https://github.com/llvm/llvm-project/issues/99991>`__","" +"`P1148R0 <https://wg21.link/P1148R0>`__","Cleaning up Clause 20","2018-11 (San Diego)","","","`#99992 <https://github.com/llvm/llvm-project/issues/99992>`__","" +"`P1165R1 <https://wg21.link/P1165R1>`__","Make stateful allocator propagation more consistent for ``operator+(basic_string)``\ ","2018-11 (San Diego)","|Complete|","15","`#104129 <https://github.com/llvm/llvm-project/issues/104129>`__","" +"`P1209R0 <https://wg21.link/P1209R0>`__","Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20","2018-11 (San Diego)","|Complete|","8","`#104130 <https://github.com/llvm/llvm-project/issues/104130>`__","" +"`P1210R0 <https://wg21.link/P1210R0>`__","P1210R0: Completing the Rebase of Library Fundamentals, Version 3, Working Draft","2018-11 (San Diego)","|Nothing To Do|","","`#100612 <https://github.com/llvm/llvm-project/issues/100612>`__","" +"`P1236R1 <https://wg21.link/P1236R1>`__","Alternative Wording for P0907R4 Signed Integers are Two's Complement","2018-11 (San Diego)","","","`#99994 <https://github.com/llvm/llvm-project/issues/99994>`__","" +"`P1248R1 <https://wg21.link/P1248R1>`__","Remove CommonReference requirement from StrictWeakOrdering (a.k.a Fixing Relations)","2018-11 (San Diego)","|Complete|","13","`#104131 <https://github.com/llvm/llvm-project/issues/104131>`__","" +"`P1285R0 <https://wg21.link/P1285R0>`__","Improving Completeness Requirements for Type Traits","2018-11 (San Diego)","","","`#99995 <https://github.com/llvm/llvm-project/issues/99995>`__","" +"`P1353R0 <https://wg21.link/P1353R0>`__","Missing feature test macros","2018-11 (San Diego)","|Complete|","19","`#100006 <https://github.com/llvm/llvm-project/issues/100006>`__","" "","","","","","" -"`P0339R6 <https://wg21.link/P0339R6>`__","polymorphic_allocator<> as a vocabulary type","2019-02 (Kona)","|Complete|","16","" -"`P0340R3 <https://wg21.link/P0340R3>`__","Making std::underlying_type SFINAE-friendly","2019-02 (Kona)","|Complete|","9","" -"`P0738R2 <https://wg21.link/P0738R2>`__","I Stream, You Stream, We All Stream for istream_iterator","2019-02 (Kona)","","","" -"`P0811R3 <https://wg21.link/P0811R3>`__","Well-behaved interpolation for numbers and pointers","2019-02 (Kona)","|Complete|","9","" -"`P0920R2 <https://wg21.link/P0920R2>`__","Precalculated hash values in lookup","2019-02 (Kona)","|Nothing To Do|","","Reverted by `P1661 <https://wg21.link/P1661>`__" -"`P1001R2 <https://wg21.link/P1001R2>`__","Target Vectorization Policies from Parallelism V2 TS to C++20","2019-02 (Kona)","|Complete|","17","" -"`P1024R3 <https://wg21.link/P1024R3>`__","Usability Enhancements for std::span","2019-02 (Kona)","|Complete|","9","" -"`P1164R1 <https://wg21.link/P1164R1>`__","Make create_directory() Intuitive","2019-02 (Kona)","|Complete|","12","" -"`P1227R2 <https://wg21.link/P1227R2>`__","Signed ssize() functions, unsigned size() functions","2019-02 (Kona)","|Complete|","9","" -"`P1252R2 <https://wg21.link/P1252R2>`__","Ranges Design Cleanup","2019-02 (Kona)","|Complete|","15","" -"`P1286R2 <https://wg21.link/P1286R2>`__","Contra CWG DR1778","2019-02 (Kona)","","","" -"`P1357R1 <https://wg21.link/P1357R1>`__","Traits for [Un]bounded Arrays","2019-02 (Kona)","|Complete|","9","" -"`P1458R1 <https://wg21.link/P1458R1>`__","Mandating the Standard Library: Clause 16 - Language support library","2019-02 (Kona)","|Complete|","9","" -"`P1459R1 <https://wg21.link/P1459R1>`__","Mandating the Standard Library: Clause 18 - Diagnostics library","2019-02 (Kona)","|Complete|","9","" -"`P1462R1 <https://wg21.link/P1462R1>`__","Mandating the Standard Library: Clause 20 - Strings library","2019-02 (Kona)","|Complete|","9","" -"`P1463R1 <https://wg21.link/P1463R1>`__","Mandating the Standard Library: Clause 21 - Containers library","2019-02 (Kona)","","","" -"`P1464R1 <https://wg21.link/P1464R1>`__","Mandating the Standard Library: Clause 22 - Iterators library","2019-02 (Kona)","|Complete|","9","" +"`P0339R6 <https://wg21.link/P0339R6>`__","polymorphic_allocator<> as a vocabulary type","2019-02 (Kona)","|Complete|","16","`#104132 <https://github.com/llvm/llvm-project/issues/104132>`__","" +"`P0340R3 <https://wg21.link/P0340R3>`__","Making std::underlying_type SFINAE-friendly","2019-02 (Kona)","|Complete|","9","`#104133 <https://github.com/llvm/llvm-project/issues/104133>`__","" +"`P0738R2 <https://wg21.link/P0738R2>`__","I Stream, You Stream, We All Stream for istream_iterator","2019-02 (Kona)","","","`#100007 <https://github.com/llvm/llvm-project/issues/100007>`__","" +"`P0811R3 <https://wg21.link/P0811R3>`__","Well-behaved interpolation for numbers and pointers","2019-02 (Kona)","|Complete|","9","`#104134 <https://github.com/llvm/llvm-project/issues/104134>`__","" +"`P0920R2 <https://wg21.link/P0920R2>`__","Precalculated hash values in lookup","2019-02 (Kona)","|Nothing To Do|","","`#104135 <https://github.com/llvm/llvm-project/issues/104135>`__","Reverted by `P1661 <https://wg21.link/P1661>`__" +"`P1001R2 <https://wg21.link/P1001R2>`__","Target Vectorization Policies from Parallelism V2 TS to C++20","2019-02 (Kona)","|Complete|","17","`#104136 <https://github.com/llvm/llvm-project/issues/104136>`__","" +"`P1024R3 <https://wg21.link/P1024R3>`__","Usability Enhancements for std::span","2019-02 (Kona)","|Complete|","9","`#104137 <https://github.com/llvm/llvm-project/issues/104137>`__","" +"`P1164R1 <https://wg21.link/P1164R1>`__","Make create_directory() Intuitive","2019-02 (Kona)","|Complete|","12","`#104138 <https://github.com/llvm/llvm-project/issues/104138>`__","" +"`P1227R2 <https://wg21.link/P1227R2>`__","Signed ssize() functions, unsigned size() functions","2019-02 (Kona)","|Complete|","9","`#104139 <https://github.com/llvm/llvm-project/issues/104139>`__","" +"`P1252R2 <https://wg21.link/P1252R2>`__","Ranges Design Cleanup","2019-02 (Kona)","|Complete|","15","`#104140 <https://github.com/llvm/llvm-project/issues/104140>`__","" +"`P1286R2 <https://wg21.link/P1286R2>`__","Contra CWG DR1778","2019-02 (Kona)","","","`#100009 <https://github.com/llvm/llvm-project/issues/100009>`__","" +"`P1357R1 <https://wg21.link/P1357R1>`__","Traits for [Un]bounded Arrays","2019-02 (Kona)","|Complete|","9","`#104141 <https://github.com/llvm/llvm-project/issues/104141>`__","" +"`P1458R1 <https://wg21.link/P1458R1>`__","Mandating the Standard Library: Clause 16 - Language support library","2019-02 (Kona)","|Complete|","9","`#104142 <https://github.com/llvm/llvm-project/issues/104142>`__","" +"`P1459R1 <https://wg21.link/P1459R1>`__","Mandating the Standard Library: Clause 18 - Diagnostics library","2019-02 (Kona)","|Complete|","9","`#104143 <https://github.com/llvm/llvm-project/issues/104143>`__","" +"`P1462R1 <https://wg21.link/P1462R1>`__","Mandating the Standard Library: Clause 20 - Strings library","2019-02 (Kona)","|Complete|","9","`#104145 <https://github.com/llvm/llvm-project/issues/104145>`__","" +"`P1463R1 <https://wg21.link/P1463R1>`__","Mandating the Standard Library: Clause 21 - Containers library","2019-02 (Kona)","","","`#100010 <https://github.com/llvm/llvm-project/issues/100010>`__","" +"`P1464R1 <https://wg21.link/P1464R1>`__","Mandating the Standard Library: Clause 22 - Iterators library","2019-02 (Kona)","|Complete|","9","`#104147 <https://github.com/llvm/llvm-project/issues/104147>`__","" "","","","","","" -"`P0325R4 <https://wg21.link/P0325R4>`__","to_array from LFTS with updates","2019-07 (Cologne)","|Complete|","10","" -"`P0408R7 <https://wg21.link/P0408R7>`__","Efficient Access to basic_stringbuf's Buffer","2019-07 (Cologne)","|Complete|","17","" -"`P0466R5 <https://wg21.link/P0466R5>`__","Layout-compatibility and Pointer-interconvertibility Traits","2019-07 (Cologne)","","","" -"`P0553R4 <https://wg21.link/P0553R4>`__","Bit operations","2019-07 (Cologne)","|Complete|","9","" -"`P0631R8 <https://wg21.link/P0631R8>`__","Math Constants","2019-07 (Cologne)","|Complete|","11","" -"`P0645R10 <https://wg21.link/P0645R10>`__","Text Formatting","2019-07 (Cologne)","|Complete|","14","The implementation was complete since LLVM 14, but the feature-test macro was not set until LLVM 19" -"`P0660R10 <https://wg21.link/P0660R10>`__","Stop Token and Joining Thread, Rev 10.","2019-07 (Cologne)","|Complete|","20","The feature was implemented since LLVM 18 but was guarded behind ``-fexperimental-library``." -"`P0784R7 <https://wg21.link/P0784R7>`__","More constexpr containers","2019-07 (Cologne)","|Complete|","12","" -"`P0980R1 <https://wg21.link/P0980R1>`__","Making std::string constexpr","2019-07 (Cologne)","|Complete|","15","" -"`P1004R2 <https://wg21.link/P1004R2>`__","Making std::vector constexpr","2019-07 (Cologne)","|Complete|","15","" -"`P1035R7 <https://wg21.link/P1035R7>`__","Input Range Adaptors","2019-07 (Cologne)","|Complete|","16","" -"`P1065R2 <https://wg21.link/P1065R2>`__","Constexpr INVOKE","2019-07 (Cologne)","|Complete|","12","" -"`P1135R6 <https://wg21.link/P1135R6>`__","The C++20 Synchronization Library","2019-07 (Cologne)","|Complete|","11","" -"`P1207R4 <https://wg21.link/P1207R4>`__","Movability of Single-pass Iterators","2019-07 (Cologne)","|Complete|","15","" -"`P1208R6 <https://wg21.link/P1208R6>`__","Adopt source_location for C++20","2019-07 (Cologne)","|Complete|","16","" -"`P1355R2 <https://wg21.link/P1355R2>`__","Exposing a narrow contract for ceil2","2019-07 (Cologne)","|Complete|","9","" -"`P1361R2 <https://wg21.link/P1361R2>`__","Integration of chrono with text formatting","2019-07 (Cologne)","|Complete|","21","" -"`P1423R3 <https://wg21.link/P1423R3>`__","char8_t backward compatibility remediation","2019-07 (Cologne)","|Complete|","15","" -"`P1424R1 <https://wg21.link/P1424R1>`__","'constexpr' feature macro concerns","2019-07 (Cologne)","|Nothing To Do|","","Superseded by `P1902 <https://wg21.link/P1902>`__" -"`P1466R3 <https://wg21.link/P1466R3>`__","Miscellaneous minor fixes for chrono","2019-07 (Cologne)","|Partial|","","" -"`P1474R1 <https://wg21.link/P1474R1>`__","Helpful pointers for ContiguousIterator","2019-07 (Cologne)","|Complete|","15","" -"`P1502R1 <https://wg21.link/P1502R1>`__","Standard library header units for C++20","2019-07 (Cologne)","","","" -"`P1522R1 <https://wg21.link/P1522R1>`__","Iterator Difference Type and Integer Overflow","2019-07 (Cologne)","|Complete|","15","" -"`P1523R1 <https://wg21.link/P1523R1>`__","Views and Size Types","2019-07 (Cologne)","|Complete|","15","" -"`P1612R1 <https://wg21.link/P1612R1>`__","Relocate Endian's Specification","2019-07 (Cologne)","|Complete|","10","" -"`P1614R2 <https://wg21.link/P1614R2>`__","The Mothership has Landed","2019-07 (Cologne)","|Complete|","19","``std::strong_order(long double, long double)`` is partly implemented." -"`P1638R1 <https://wg21.link/P1638R1>`__","basic_istream_view::iterator should not be copyable","2019-07 (Cologne)","|Complete|","16","" -"`P1643R1 <https://wg21.link/P1643R1>`__","Add wait/notify to atomic_ref","2019-07 (Cologne)","|Complete|","19","" -"`P1644R0 <https://wg21.link/P1644R0>`__","Add wait/notify to atomic<shared_ptr>","2019-07 (Cologne)","","","" -"`P1650R0 <https://wg21.link/P1650R0>`__","Output std::chrono::days with 'd' suffix","2019-07 (Cologne)","|Complete|","16","" -"`P1651R0 <https://wg21.link/P1651R0>`__","bind_front should not unwrap reference_wrapper","2019-07 (Cologne)","|Complete|","13","" -"`P1652R1 <https://wg21.link/P1652R1>`__","Printf corner cases in std::format","2019-07 (Cologne)","|Complete|","14","" -"`P1661R1 <https://wg21.link/P1661R1>`__","Remove dedicated precalculated hash lookup interface","2019-07 (Cologne)","|Nothing To Do|","","" -"`P1754R1 <https://wg21.link/P1754R1>`__","Rename concepts to standard_case for C++20, while we still can","2019-07 (Cologne)","|Complete|","15","" +"`P0325R4 <https://wg21.link/P0325R4>`__","to_array from LFTS with updates","2019-07 (Cologne)","|Complete|","10","`#104149 <https://github.com/llvm/llvm-project/issues/104149>`__","" +"`P0408R7 <https://wg21.link/P0408R7>`__","Efficient Access to basic_stringbuf's Buffer","2019-07 (Cologne)","|Complete|","17","`#104150 <https://github.com/llvm/llvm-project/issues/104150>`__","" +"`P0466R5 <https://wg21.link/P0466R5>`__","Layout-compatibility and Pointer-interconvertibility Traits","2019-07 (Cologne)","","","`#100013 <https://github.com/llvm/llvm-project/issues/100013>`__","" +"`P0553R4 <https://wg21.link/P0553R4>`__","Bit operations","2019-07 (Cologne)","|Complete|","9","`#104151 <https://github.com/llvm/llvm-project/issues/104151>`__","" +"`P0631R8 <https://wg21.link/P0631R8>`__","Math Constants","2019-07 (Cologne)","|Complete|","11","`#104152 <https://github.com/llvm/llvm-project/issues/104152>`__","" +"`P0645R10 <https://wg21.link/P0645R10>`__","Text Formatting","2019-07 (Cologne)","|Complete|","14","`#104153 <https://github.com/llvm/llvm-project/issues/104153>`__","The implementation was complete since LLVM 14, but the feature-test macro was not set until LLVM 19" +"`P0660R10 <https://wg21.link/P0660R10>`__","Stop Token and Joining Thread, Rev 10.","2019-07 (Cologne)","|Complete|","20","`#104154 <https://github.com/llvm/llvm-project/issues/104154>`__","The feature was implemented since LLVM 18 but was guarded behind ``-fexperimental-library``." +"`P0784R7 <https://wg21.link/P0784R7>`__","More constexpr containers","2019-07 (Cologne)","|Complete|","12","`#104156 <https://github.com/llvm/llvm-project/issues/104156>`__","" +"`P0980R1 <https://wg21.link/P0980R1>`__","Making std::string constexpr","2019-07 (Cologne)","|Complete|","15","`#104157 <https://github.com/llvm/llvm-project/issues/104157>`__","" +"`P1004R2 <https://wg21.link/P1004R2>`__","Making std::vector constexpr","2019-07 (Cologne)","|Complete|","15","`#104158 <https://github.com/llvm/llvm-project/issues/104158>`__","" +"`P1035R7 <https://wg21.link/P1035R7>`__","Input Range Adaptors","2019-07 (Cologne)","|Complete|","16","`#104159 <https://github.com/llvm/llvm-project/issues/104159>`__","" +"`P1065R2 <https://wg21.link/P1065R2>`__","Constexpr INVOKE","2019-07 (Cologne)","|Complete|","12","`#104160 <https://github.com/llvm/llvm-project/issues/104160>`__","" +"`P1135R6 <https://wg21.link/P1135R6>`__","The C++20 Synchronization Library","2019-07 (Cologne)","|Complete|","11","`#104161 <https://github.com/llvm/llvm-project/issues/104161>`__","" +"`P1207R4 <https://wg21.link/P1207R4>`__","Movability of Single-pass Iterators","2019-07 (Cologne)","|Complete|","15","`#104162 <https://github.com/llvm/llvm-project/issues/104162>`__","" +"`P1208R6 <https://wg21.link/P1208R6>`__","Adopt source_location for C++20","2019-07 (Cologne)","|Complete|","16","`#104163 <https://github.com/llvm/llvm-project/issues/104163>`__","" +"`P1355R2 <https://wg21.link/P1355R2>`__","Exposing a narrow contract for ceil2","2019-07 (Cologne)","|Complete|","9","`#104164 <https://github.com/llvm/llvm-project/issues/104164>`__","" +"`P1361R2 <https://wg21.link/P1361R2>`__","Integration of chrono with text formatting","2019-07 (Cologne)","|Complete|","21","`#100014 <https://github.com/llvm/llvm-project/issues/100014>`__","" +"`P1423R3 <https://wg21.link/P1423R3>`__","char8_t backward compatibility remediation","2019-07 (Cologne)","|Complete|","15","`#104165 <https://github.com/llvm/llvm-project/issues/104165>`__","" +"`P1424R1 <https://wg21.link/P1424R1>`__","'constexpr' feature macro concerns","2019-07 (Cologne)","|Nothing To Do|","","`#104166 <https://github.com/llvm/llvm-project/issues/104166>`__","Superseded by `P1902 <https://wg21.link/P1902>`__" +"`P1466R3 <https://wg21.link/P1466R3>`__","Miscellaneous minor fixes for chrono","2019-07 (Cologne)","|Partial|","","`#100015 <https://github.com/llvm/llvm-project/issues/100015>`__","" +"`P1474R1 <https://wg21.link/P1474R1>`__","Helpful pointers for ContiguousIterator","2019-07 (Cologne)","|Complete|","15","`#104167 <https://github.com/llvm/llvm-project/issues/104167>`__","" +"`P1502R1 <https://wg21.link/P1502R1>`__","Standard library header units for C++20","2019-07 (Cologne)","","","`#100016 <https://github.com/llvm/llvm-project/issues/100016>`__","" +"`P1522R1 <https://wg21.link/P1522R1>`__","Iterator Difference Type and Integer Overflow","2019-07 (Cologne)","|Complete|","15","`#104169 <https://github.com/llvm/llvm-project/issues/104169>`__","" +"`P1523R1 <https://wg21.link/P1523R1>`__","Views and Size Types","2019-07 (Cologne)","|Complete|","15","`#104170 <https://github.com/llvm/llvm-project/issues/104170>`__","" +"`P1612R1 <https://wg21.link/P1612R1>`__","Relocate Endian's Specification","2019-07 (Cologne)","|Complete|","10","`#104172 <https://github.com/llvm/llvm-project/issues/104172>`__","" +"`P1614R2 <https://wg21.link/P1614R2>`__","The Mothership has Landed","2019-07 (Cologne)","|Complete|","19","`#100018 <https://github.com/llvm/llvm-project/issues/100018>`__","``std::strong_order(long double, long double)`` is partly implemented." +"`P1638R1 <https://wg21.link/P1638R1>`__","basic_istream_view::iterator should not be copyable","2019-07 (Cologne)","|Complete|","16","`#104173 <https://github.com/llvm/llvm-project/issues/104173>`__","" +"`P1643R1 <https://wg21.link/P1643R1>`__","Add wait/notify to atomic_ref","2019-07 (Cologne)","|Complete|","19","`#104174 <https://github.com/llvm/llvm-project/issues/104174>`__","" +"`P1644R0 <https://wg21.link/P1644R0>`__","Add wait/notify to atomic<shared_ptr>","2019-07 (Cologne)","","","`#100019 <https://github.com/llvm/llvm-project/issues/100019>`__","" +"`P1650R0 <https://wg21.link/P1650R0>`__","Output std::chrono::days with 'd' suffix","2019-07 (Cologne)","|Complete|","16","`#104175 <https://github.com/llvm/llvm-project/issues/104175>`__","" +"`P1651R0 <https://wg21.link/P1651R0>`__","bind_front should not unwrap reference_wrapper","2019-07 (Cologne)","|Complete|","13","`#104176 <https://github.com/llvm/llvm-project/issues/104176>`__","" +"`P1652R1 <https://wg21.link/P1652R1>`__","Printf corner cases in std::format","2019-07 (Cologne)","|Complete|","14","`#104177 <https://github.com/llvm/llvm-project/issues/104177>`__","" +"`P1661R1 <https://wg21.link/P1661R1>`__","Remove dedicated precalculated hash lookup interface","2019-07 (Cologne)","|Nothing To Do|","","`#104178 <https://github.com/llvm/llvm-project/issues/104178>`__","" +"`P1754R1 <https://wg21.link/P1754R1>`__","Rename concepts to standard_case for C++20, while we still can","2019-07 (Cologne)","|Complete|","15","`#104179 <https://github.com/llvm/llvm-project/issues/104179>`__","" "","","","","","" -"`P0883R2 <https://wg21.link/P0883R2>`__","Fixing Atomic Initialization","2019-11 (Belfast)","|Complete|","14","shared_ptr and floating-point changes weren't applied as they themselves aren't implemented yet. Also, ``ATOMIC_FLAG_INIT`` was marked deprecated in version 14, but was undeprecated with the implementation of LWG3659 in version 15." -"`P1391R4 <https://wg21.link/P1391R4>`__","Range constructor for std::string_view","2019-11 (Belfast)","|Complete|","14","" -"`P1394R4 <https://wg21.link/P1394R4>`__","Range constructor for std::span","2019-11 (Belfast)","|Complete|","14","" -"`P1456R1 <https://wg21.link/P1456R1>`__","Move-only views","2019-11 (Belfast)","|Complete|","15","" -"`P1622R3 <https://wg21.link/P1622R3>`__","Mandating the Standard Library: Clause 32 - Thread support library","2019-11 (Belfast)","","","" -"`P1645R1 <https://wg21.link/P1645R1>`__","constexpr for numeric algorithms","2019-11 (Belfast)","|Complete|","12","" -"`P1686R2 <https://wg21.link/P1686R2>`__","Mandating the Standard Library: Clause 27 - Time library","2019-11 (Belfast)","","","" -"`P1690R1 <https://wg21.link/P1690R1>`__","Refinement Proposal for P0919 Heterogeneous lookup for unordered containers","2019-11 (Belfast)","|Complete|","12","" -"`P1716R3 <https://wg21.link/P1716R3>`__","ranges compare algorithm are over-constrained","2019-11 (Belfast)","|Complete|","15","" -"`P1718R2 <https://wg21.link/P1718R2>`__","Mandating the Standard Library: Clause 25 - Algorithms library","2019-11 (Belfast)","","","" -"`P1719R2 <https://wg21.link/P1719R2>`__","Mandating the Standard Library: Clause 26 - Numerics library","2019-11 (Belfast)","","","" -"`P1720R2 <https://wg21.link/P1720R2>`__","Mandating the Standard Library: Clause 28 - Localization library","2019-11 (Belfast)","","","" -"`P1721R2 <https://wg21.link/P1721R2>`__","Mandating the Standard Library: Clause 29 - Input/Output library","2019-11 (Belfast)","","","" -"`P1722R2 <https://wg21.link/P1722R2>`__","Mandating the Standard Library: Clause 30 - Regular Expression library","2019-11 (Belfast)","","","" -"`P1723R2 <https://wg21.link/P1723R2>`__","Mandating the Standard Library: Clause 31 - Atomics library","2019-11 (Belfast)","","","" -"`P1855R0 <https://wg21.link/P1855R0>`__","Make ``<compare>``\ freestanding","2019-11 (Belfast)","","","" -"`P1862R1 <https://wg21.link/P1862R1>`__","Ranges adaptors for non-copyable iterators","2019-11 (Belfast)","|Complete|","16","" -"`P1865R1 <https://wg21.link/P1865R1>`__","Add max() to latch and barrier","2019-11 (Belfast)","|Complete|","11","" -"`P1869R1 <https://wg21.link/P1869R1>`__","Rename 'condition_variable_any' interruptible wait methods","2019-11 (Belfast)","|Complete|","18","" -"`P1870R1 <https://wg21.link/P1870R1>`__","forwarding-range is too subtle","2019-11 (Belfast)","|Complete|","15","" -"`P1871R1 <https://wg21.link/P1871R1>`__","Concept traits should be named after concepts","2019-11 (Belfast)","|Complete|","14","" -"`P1872R0 <https://wg21.link/P1872R0>`__","span should have size_type, not index_type","2019-11 (Belfast)","|Complete|","10","" -"`P1878R1 <https://wg21.link/P1878R1>`__","Constraining Readable Types","2019-11 (Belfast)","|Complete|","15","" -"`P1892R1 <https://wg21.link/P1892R1>`__","Extended locale-specific presentation specifiers for std::format","2019-11 (Belfast)","|Complete|","14","" -"`P1902R1 <https://wg21.link/P1902R1>`__","Missing feature-test macros 2018-2019","2019-11 (Belfast)","","","" -"`P1959R0 <https://wg21.link/P1959R0>`__","Remove std::weak_equality and std::strong_equality","2019-11 (Belfast)","|Nothing To Do|","","" -"`P1960R0 <https://wg21.link/P1960R0>`__","NB Comment Changes Reviewed by SG1","2019-11 (Belfast)","","","" -"`P1961R0 <https://wg21.link/P1961R0>`__","Harmonizing the definitions of total order for pointers","2019-11 (Belfast)","","","" -"`P1965R0 <https://wg21.link/P1965R0>`__","Blanket Wording for Specifying ""Hidden Friends""","2019-11 (Belfast)","","","" +"`P0883R2 <https://wg21.link/P0883R2>`__","Fixing Atomic Initialization","2019-11 (Belfast)","|Complete|","14","`#104180 <https://github.com/llvm/llvm-project/issues/104180>`__","shared_ptr and floating-point changes weren't applied as they themselves aren't implemented yet. Also, ``ATOMIC_FLAG_INIT`` was marked deprecated in version 14, but was undeprecated with the implementation of LWG3659 in version 15." +"`P1391R4 <https://wg21.link/P1391R4>`__","Range constructor for std::string_view","2019-11 (Belfast)","|Complete|","14","`#104181 <https://github.com/llvm/llvm-project/issues/104181>`__","" +"`P1394R4 <https://wg21.link/P1394R4>`__","Range constructor for std::span","2019-11 (Belfast)","|Complete|","14","`#104182 <https://github.com/llvm/llvm-project/issues/104182>`__","" +"`P1456R1 <https://wg21.link/P1456R1>`__","Move-only views","2019-11 (Belfast)","|Complete|","15","`#104183 <https://github.com/llvm/llvm-project/issues/104183>`__","" +"`P1622R3 <https://wg21.link/P1622R3>`__","Mandating the Standard Library: Clause 32 - Thread support library","2019-11 (Belfast)","","","`#100020 <https://github.com/llvm/llvm-project/issues/100020>`__","" +"`P1645R1 <https://wg21.link/P1645R1>`__","constexpr for numeric algorithms","2019-11 (Belfast)","|Complete|","12","`#104184 <https://github.com/llvm/llvm-project/issues/104184>`__","" +"`P1686R2 <https://wg21.link/P1686R2>`__","Mandating the Standard Library: Clause 27 - Time library","2019-11 (Belfast)","","","`#100021 <https://github.com/llvm/llvm-project/issues/100021>`__","" +"`P1690R1 <https://wg21.link/P1690R1>`__","Refinement Proposal for P0919 Heterogeneous lookup for unordered containers","2019-11 (Belfast)","|Complete|","12","`#104185 <https://github.com/llvm/llvm-project/issues/104185>`__","" +"`P1716R3 <https://wg21.link/P1716R3>`__","ranges compare algorithm are over-constrained","2019-11 (Belfast)","|Complete|","15","`#104186 <https://github.com/llvm/llvm-project/issues/104186>`__","" +"`P1718R2 <https://wg21.link/P1718R2>`__","Mandating the Standard Library: Clause 25 - Algorithms library","2019-11 (Belfast)","","","`#100022 <https://github.com/llvm/llvm-project/issues/100022>`__","" +"`P1719R2 <https://wg21.link/P1719R2>`__","Mandating the Standard Library: Clause 26 - Numerics library","2019-11 (Belfast)","","","`#100023 <https://github.com/llvm/llvm-project/issues/100023>`__","" +"`P1720R2 <https://wg21.link/P1720R2>`__","Mandating the Standard Library: Clause 28 - Localization library","2019-11 (Belfast)","","","`#100025 <https://github.com/llvm/llvm-project/issues/100025>`__","" +"`P1721R2 <https://wg21.link/P1721R2>`__","Mandating the Standard Library: Clause 29 - Input/Output library","2019-11 (Belfast)","","","`#100026 <https://github.com/llvm/llvm-project/issues/100026>`__","" +"`P1722R2 <https://wg21.link/P1722R2>`__","Mandating the Standard Library: Clause 30 - Regular Expression library","2019-11 (Belfast)","","","`#100027 <https://github.com/llvm/llvm-project/issues/100027>`__","" +"`P1723R2 <https://wg21.link/P1723R2>`__","Mandating the Standard Library: Clause 31 - Atomics library","2019-11 (Belfast)","","","`#100029 <https://github.com/llvm/llvm-project/issues/100029>`__","" +"`P1855R0 <https://wg21.link/P1855R0>`__","Make ``<compare>``\ freestanding","2019-11 (Belfast)","","","`#100030 <https://github.com/llvm/llvm-project/issues/100030>`__","" +"`P1862R1 <https://wg21.link/P1862R1>`__","Ranges adaptors for non-copyable iterators","2019-11 (Belfast)","|Complete|","16","`#104187 <https://github.com/llvm/llvm-project/issues/104187>`__","" +"`P1865R1 <https://wg21.link/P1865R1>`__","Add max() to latch and barrier","2019-11 (Belfast)","|Complete|","11","`#104188 <https://github.com/llvm/llvm-project/issues/104188>`__","" +"`P1869R1 <https://wg21.link/P1869R1>`__","Rename 'condition_variable_any' interruptible wait methods","2019-11 (Belfast)","|Complete|","18","`#100031 <https://github.com/llvm/llvm-project/issues/100031>`__","" +"`P1870R1 <https://wg21.link/P1870R1>`__","forwarding-range is too subtle","2019-11 (Belfast)","|Complete|","15","`#104190 <https://github.com/llvm/llvm-project/issues/104190>`__","" +"`P1871R1 <https://wg21.link/P1871R1>`__","Concept traits should be named after concepts","2019-11 (Belfast)","|Complete|","14","`#104191 <https://github.com/llvm/llvm-project/issues/104191>`__","" +"`P1872R0 <https://wg21.link/P1872R0>`__","span should have size_type, not index_type","2019-11 (Belfast)","|Complete|","10","`#104192 <https://github.com/llvm/llvm-project/issues/104192>`__","" +"`P1878R1 <https://wg21.link/P1878R1>`__","Constraining Readable Types","2019-11 (Belfast)","|Complete|","15","`#104194 <https://github.com/llvm/llvm-project/issues/104194>`__","" +"`P1892R1 <https://wg21.link/P1892R1>`__","Extended locale-specific presentation specifiers for std::format","2019-11 (Belfast)","|Complete|","14","`#104196 <https://github.com/llvm/llvm-project/issues/104196>`__","" +"`P1902R1 <https://wg21.link/P1902R1>`__","Missing feature-test macros 2018-2019","2019-11 (Belfast)","","","`#100032 <https://github.com/llvm/llvm-project/issues/100032>`__","" +"`P1959R0 <https://wg21.link/P1959R0>`__","Remove std::weak_equality and std::strong_equality","2019-11 (Belfast)","|Nothing To Do|","","`#104198 <https://github.com/llvm/llvm-project/issues/104198>`__","" +"`P1960R0 <https://wg21.link/P1960R0>`__","NB Comment Changes Reviewed by SG1","2019-11 (Belfast)","","","`#100033 <https://github.com/llvm/llvm-project/issues/100033>`__","" +"`P1961R0 <https://wg21.link/P1961R0>`__","Harmonizing the definitions of total order for pointers","2019-11 (Belfast)","","","`#100611 <https://github.com/llvm/llvm-project/issues/100611>`__","" +"`P1965R0 <https://wg21.link/P1965R0>`__","Blanket Wording for Specifying ""Hidden Friends""","2019-11 (Belfast)","","","`#100034 <https://github.com/llvm/llvm-project/issues/100034>`__","" "","","","","","" -"`P0586R2 <https://wg21.link/P0586R2>`__","Safe integral comparisons","2020-02 (Prague)","|Complete|","13","" -"`P0593R6 <https://wg21.link/P0593R6>`__","Implicit creation of objects for low-level object manipulation","2020-02 (Prague)","","","" -"`P1115R3 <https://wg21.link/P1115R3>`__","Improving the Return Value of Erase-Like Algorithms II: Free erase/erase if","2020-02 (Prague)","|Complete|","11","" -"`P1243R4 <https://wg21.link/P1243R4>`__","Rangify New Algorithms","2020-02 (Prague)","|Complete|","15","" -"`P1460R1 <https://wg21.link/P1460R1>`__","Mandating the Standard Library: Clause 20 - Utilities library","2020-02 (Prague)","","","" -"`P1739R4 <https://wg21.link/P1739R4>`__","Avoid template bloat for safe_ranges in combination with ""subrange-y"" view adaptors","2020-02 (Prague)","|Complete|","15","" -"`P1831R1 <https://wg21.link/P1831R1>`__","Deprecating volatile: library","2020-02 (Prague)","","","" -"`P1868R2 <https://wg21.link/P1868R2>`__","width: clarifying units of width and precision in std::format","2020-02 (Prague)","|Complete|","14","" -"`P1956R1 <https://wg21.link/P1956R1>`__","On the names of low-level bit manipulation functions","2020-02 (Prague)","|Complete|","12","" -"`P1957R2 <https://wg21.link/P1957R2>`__","Converting from ``T*``\ to bool should be considered narrowing (re: US 212)","2020-02 (Prague)","|Complete|","18","" -"`P1963R0 <https://wg21.link/P1963R0>`__","P1963R0: Fixing US 313","2020-02 (Prague)","|Nothing To Do|","","" -"`P1964R2 <https://wg21.link/P1964R2>`__","Wording for boolean-testable","2020-02 (Prague)","|Complete|","13","" -"`P1970R2 <https://wg21.link/P1970R2>`__","Consistency for size() functions: Add ranges::ssize","2020-02 (Prague)","|Complete|","15","" -"`P1973R1 <https://wg21.link/P1973R1>`__","Rename ""_default_init"" Functions, Rev1","2020-02 (Prague)","|Complete|","16","The feature-test macro was not set until LLVM 20." -"`P1976R2 <https://wg21.link/P1976R2>`__","Fixed-size span construction from dynamic range","2020-02 (Prague)","|Complete|","11","" -"`P1981R0 <https://wg21.link/P1981R0>`__","Rename leap to leap_second","2020-02 (Prague)","|Complete|","19","" -"`P1982R0 <https://wg21.link/P1982R0>`__","Rename link to time_zone_link","2020-02 (Prague)","|Complete|","19","" -"`P1983R0 <https://wg21.link/P1983R0>`__","Wording for GB301, US296, US292, US291, and US283","2020-02 (Prague)","|Complete|","15","" -"`P1994R1 <https://wg21.link/P1994R1>`__","elements_view needs its own sentinel","2020-02 (Prague)","|Complete|","16","" -"`P2002R1 <https://wg21.link/P2002R1>`__","Defaulted comparison specification cleanups","2020-02 (Prague)","|Complete|","7","" -"`P2045R1 <https://wg21.link/P2045R1>`__","P2045R1: Missing Mandates for the standard library","2020-02 (Prague)","|Nothing To Do|","","" -"`P2085R0 <https://wg21.link/P2085R0>`__","Consistent defaulted comparisons","2020-02 (Prague)","","","" -"`P2091R0 <https://wg21.link/P2091R0>`__","Issues with range access CPOs","2020-02 (Prague)","|Complete|","15","" -"`P2101R0 <https://wg21.link/P2101R0>`__","P2101R0: 'Models' subsumes 'satisfies' (Wording for US298 and US300)","2020-02 (Prague)","|Nothing To Do|","","" -"`P2102R0 <https://wg21.link/P2102R0>`__","Make 'implicit expression variations' more explicit (Wording for US185)","2020-02 (Prague)","|Complete|","15","" -"`P2106R0 <https://wg21.link/P2106R0>`__","Alternative wording for GB315 and GB316","2020-02 (Prague)","|Complete|","15","" -"`P2116R0 <https://wg21.link/P2116R0>`__","Remove tuple-like protocol support from fixed-extent span","2020-02 (Prague)","|Complete|","11","" +"`P0586R2 <https://wg21.link/P0586R2>`__","Safe integral comparisons","2020-02 (Prague)","|Complete|","13","`#104199 <https://github.com/llvm/llvm-project/issues/104199>`__","" +"`P0593R6 <https://wg21.link/P0593R6>`__","Implicit creation of objects for low-level object manipulation","2020-02 (Prague)","","","`#100035 <https://github.com/llvm/llvm-project/issues/100035>`__","" +"`P1115R3 <https://wg21.link/P1115R3>`__","Improving the Return Value of Erase-Like Algorithms II: Free erase/erase if","2020-02 (Prague)","|Complete|","11","`#104200 <https://github.com/llvm/llvm-project/issues/104200>`__","" +"`P1243R4 <https://wg21.link/P1243R4>`__","Rangify New Algorithms","2020-02 (Prague)","|Complete|","15","`#104201 <https://github.com/llvm/llvm-project/issues/104201>`__","" +"`P1460R1 <https://wg21.link/P1460R1>`__","Mandating the Standard Library: Clause 20 - Utilities library","2020-02 (Prague)","","","`#100037 <https://github.com/llvm/llvm-project/issues/100037>`__","" +"`P1739R4 <https://wg21.link/P1739R4>`__","Avoid template bloat for safe_ranges in combination with ""subrange-y"" view adaptors","2020-02 (Prague)","|Complete|","15","`#104202 <https://github.com/llvm/llvm-project/issues/104202>`__","" +"`P1831R1 <https://wg21.link/P1831R1>`__","Deprecating volatile: library","2020-02 (Prague)","","","`#100038 <https://github.com/llvm/llvm-project/issues/100038>`__","" +"`P1868R2 <https://wg21.link/P1868R2>`__","width: clarifying units of width and precision in std::format","2020-02 (Prague)","|Complete|","14","`#104203 <https://github.com/llvm/llvm-project/issues/104203>`__","" +"`P1956R1 <https://wg21.link/P1956R1>`__","On the names of low-level bit manipulation functions","2020-02 (Prague)","|Complete|","12","`#104204 <https://github.com/llvm/llvm-project/issues/104204>`__","" +"`P1957R2 <https://wg21.link/P1957R2>`__","Converting from ``T*``\ to bool should be considered narrowing (re: US 212)","2020-02 (Prague)","|Complete|","18","`#104205 <https://github.com/llvm/llvm-project/issues/104205>`__","" +"`P1963R0 <https://wg21.link/P1963R0>`__","P1963R0: Fixing US 313","2020-02 (Prague)","|Nothing To Do|","","`#100039 <https://github.com/llvm/llvm-project/issues/100039>`__","" +"`P1964R2 <https://wg21.link/P1964R2>`__","Wording for boolean-testable","2020-02 (Prague)","|Complete|","13","`#104206 <https://github.com/llvm/llvm-project/issues/104206>`__","" +"`P1970R2 <https://wg21.link/P1970R2>`__","Consistency for size() functions: Add ranges::ssize","2020-02 (Prague)","|Complete|","15","`#104207 <https://github.com/llvm/llvm-project/issues/104207>`__","" +"`P1973R1 <https://wg21.link/P1973R1>`__","Rename ""_default_init"" Functions, Rev1","2020-02 (Prague)","|Complete|","16","`#104208 <https://github.com/llvm/llvm-project/issues/104208>`__","The feature-test macro was not set until LLVM 20." +"`P1976R2 <https://wg21.link/P1976R2>`__","Fixed-size span construction from dynamic range","2020-02 (Prague)","|Complete|","11","`#104209 <https://github.com/llvm/llvm-project/issues/104209>`__","" +"`P1981R0 <https://wg21.link/P1981R0>`__","Rename leap to leap_second","2020-02 (Prague)","|Complete|","19","`#104210 <https://github.com/llvm/llvm-project/issues/104210>`__","" +"`P1982R0 <https://wg21.link/P1982R0>`__","Rename link to time_zone_link","2020-02 (Prague)","|Complete|","19","`#104211 <https://github.com/llvm/llvm-project/issues/104211>`__","" +"`P1983R0 <https://wg21.link/P1983R0>`__","Wording for GB301, US296, US292, US291, and US283","2020-02 (Prague)","|Complete|","15","`#104212 <https://github.com/llvm/llvm-project/issues/104212>`__","" +"`P1994R1 <https://wg21.link/P1994R1>`__","elements_view needs its own sentinel","2020-02 (Prague)","|Complete|","16","`#104213 <https://github.com/llvm/llvm-project/issues/104213>`__","" +"`P2002R1 <https://wg21.link/P2002R1>`__","Defaulted comparison specification cleanups","2020-02 (Prague)","|Complete|","7","`#100615 <https://github.com/llvm/llvm-project/issues/100615>`__","" +"`P2045R1 <https://wg21.link/P2045R1>`__","P2045R1: Missing Mandates for the standard library","2020-02 (Prague)","|Nothing To Do|","","`#100041 <https://github.com/llvm/llvm-project/issues/100041>`__","" +"`P2085R0 <https://wg21.link/P2085R0>`__","Consistent defaulted comparisons","2020-02 (Prague)","","","`#100617 <https://github.com/llvm/llvm-project/issues/100617>`__","" +"`P2091R0 <https://wg21.link/P2091R0>`__","Issues with range access CPOs","2020-02 (Prague)","|Complete|","15","`#104214 <https://github.com/llvm/llvm-project/issues/104214>`__","" +"`P2101R0 <https://wg21.link/P2101R0>`__","P2101R0: 'Models' subsumes 'satisfies' (Wording for US298 and US300)","2020-02 (Prague)","|Nothing To Do|","","`#100618 <https://github.com/llvm/llvm-project/issues/100618>`__","" +"`P2102R0 <https://wg21.link/P2102R0>`__","Make 'implicit expression variations' more explicit (Wording for US185)","2020-02 (Prague)","|Complete|","15","`#100042 <https://github.com/llvm/llvm-project/issues/100042>`__","" +"`P2106R0 <https://wg21.link/P2106R0>`__","Alternative wording for GB315 and GB316","2020-02 (Prague)","|Complete|","15","`#104215 <https://github.com/llvm/llvm-project/issues/104215>`__","" +"`P2116R0 <https://wg21.link/P2116R0>`__","Remove tuple-like protocol support from fixed-extent span","2020-02 (Prague)","|Complete|","11","`#104216 <https://github.com/llvm/llvm-project/issues/104216>`__","" "","","","","","" -"`P2231R1 <https://wg21.link/P2231R1>`__","Missing constexpr in std::optional and std::variant","2021-06 (Virtual)","|Complete|","19","Changes of feature-test macros are completed in LLVM 20." -"`P2325R3 <https://wg21.link/P2325R3>`__","Views should not be required to be default constructible","2021-06 (Virtual)","|Complete|","16","" -"`P2210R2 <https://wg21.link/P2210R2>`__","Superior String Splitting","2021-06 (Virtual)","|Complete|","16","" -"`P2216R3 <https://wg21.link/P2216R3>`__","std::format improvements","2021-06 (Virtual)","|Complete|","15","" -"`P2281R1 <https://wg21.link/P2281R1>`__","Clarifying range adaptor objects","2021-06 (Virtual)","|Complete|","14","" -"`P2328R1 <https://wg21.link/P2328R1>`__","join_view should join all views of ranges","2021-06 (Virtual)","|Complete|","15","" -"`P2367R0 <https://wg21.link/P2367R0>`__","Remove misuses of list-initialization from Clause 24","2021-06 (Virtual)","|Complete|","15","" +"`P2231R1 <https://wg21.link/P2231R1>`__","Missing constexpr in std::optional and std::variant","2021-06 (Virtual)","|Complete|","19","`#104217 <https://github.com/llvm/llvm-project/issues/104217>`__","Changes of feature-test macros are completed in LLVM 20." +"`P2325R3 <https://wg21.link/P2325R3>`__","Views should not be required to be default constructible","2021-06 (Virtual)","|Complete|","16","`#104218 <https://github.com/llvm/llvm-project/issues/104218>`__","" +"`P2210R2 <https://wg21.link/P2210R2>`__","Superior String Splitting","2021-06 (Virtual)","|Complete|","16","`#104219 <https://github.com/llvm/llvm-project/issues/104219>`__","" +"`P2216R3 <https://wg21.link/P2216R3>`__","std::format improvements","2021-06 (Virtual)","|Complete|","15","`#104220 <https://github.com/llvm/llvm-project/issues/104220>`__","" +"`P2281R1 <https://wg21.link/P2281R1>`__","Clarifying range adaptor objects","2021-06 (Virtual)","|Complete|","14","`#104221 <https://github.com/llvm/llvm-project/issues/104221>`__","" +"`P2328R1 <https://wg21.link/P2328R1>`__","join_view should join all views of ranges","2021-06 (Virtual)","|Complete|","15","`#104222 <https://github.com/llvm/llvm-project/issues/104222>`__","" +"`P2367R0 <https://wg21.link/P2367R0>`__","Remove misuses of list-initialization from Clause 24","2021-06 (Virtual)","|Complete|","15","`#104223 <https://github.com/llvm/llvm-project/issues/104223>`__","" "","","","","","" -"`P2372R3 <https://wg21.link/P2372R3>`__","Fixing locale handling in chrono formatters","2021-10 (Virtual)","|Complete|","21","" -"`P2415R2 <https://wg21.link/P2415R2>`__","What is a ``view``","2021-10 (Virtual)","|Complete|","14","" -"`P2418R2 <https://wg21.link/P2418R2>`__","Add support for ``std::generator``-like types to ``std::format``","2021-10 (Virtual)","|Complete|","15","" -"`P2432R1 <https://wg21.link/P2432R1>`__","Fix ``istream_view``","2021-10 (Virtual)","|Complete|","16","" +"`P2372R3 <https://wg21.link/P2372R3>`__","Fixing locale handling in chrono formatters","2021-10 (Virtual)","|Complete|","21","`#100043 <https://github.com/llvm/llvm-project/issues/100043>`__","" +"`P2415R2 <https://wg21.link/P2415R2>`__","What is a ``view``","2021-10 (Virtual)","|Complete|","14","`#104224 <https://github.com/llvm/llvm-project/issues/104224>`__","" +"`P2418R2 <https://wg21.link/P2418R2>`__","Add support for ``std::generator``-like types to ``std::format``","2021-10 (Virtual)","|Complete|","15","`#104225 <https://github.com/llvm/llvm-project/issues/104225>`__","" +"`P2432R1 <https://wg21.link/P2432R1>`__","Fix ``istream_view``","2021-10 (Virtual)","|Complete|","16","`#104226 <https://github.com/llvm/llvm-project/issues/104226>`__","" diff --git a/libcxx/docs/Status/Cxx23Issues.csv b/libcxx/docs/Status/Cxx23Issues.csv index d1546f4a452b..9318176ac964 100644 --- a/libcxx/docs/Status/Cxx23Issues.csv +++ b/libcxx/docs/Status/Cxx23Issues.csv @@ -1,308 +1,308 @@ "Issue #","Issue Name","Meeting","Status","First released version","Notes" -"`LWG2839 <https://wg21.link/LWG2839>`__","Self-move-assignment of library types, again","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3117 <https://wg21.link/LWG3117>`__","Missing ``packaged_task`` deduction guides","2020-11 (Virtual)","|Complete|","16","" -"`LWG3143 <https://wg21.link/LWG3143>`__","``monotonic_buffer_resource`` growth policy is unclear","2020-11 (Virtual)","","","" -"`LWG3195 <https://wg21.link/LWG3195>`__","What is the stored pointer value of an empty ``weak_ptr``?","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3211 <https://wg21.link/LWG3211>`__","``std::tuple<>`` should be trivially constructible","2020-11 (Virtual)","|Complete|","9","" -"`LWG3236 <https://wg21.link/LWG3236>`__","Random access iterator requirements lack limiting relational operators domain to comparing those from the same range","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3265 <https://wg21.link/LWG3265>`__","``move_iterator``'s conversions are more broken after P1207","2020-11 (Virtual)","|Nothing To Do|","","Resolved by `LWG3435 <https://wg21.link/LWG3435>`__" -"`LWG3435 <https://wg21.link/LWG3435>`__","``three_way_comparable_with<reverse_iterator<int*>, reverse_iterator<const int*>>``","2020-11 (Virtual)","|Complete|","13","" -"`LWG3432 <https://wg21.link/LWG3432>`__","Missing requirement for ``comparison_category``","2020-11 (Virtual)","|Complete|","16","" -"`LWG3447 <https://wg21.link/LWG3447>`__","Deduction guides for ``take_view`` and ``drop_view`` have different constraints","2020-11 (Virtual)","|Complete|","14","" -"`LWG3450 <https://wg21.link/LWG3450>`__","The const overloads of ``take_while_view::begin/end`` are underconstrained","2020-11 (Virtual)","|Complete|","16","" -"`LWG3464 <https://wg21.link/LWG3464>`__","``istream::gcount()`` can overflow","2020-11 (Virtual)","|Complete|","18","" -"`LWG2731 <https://wg21.link/LWG2731>`__","Existence of ``lock_guard<MutexTypes...>::mutex_type`` typedef unclear","2020-11 (Virtual)","|Complete|","5","" -"`LWG2743 <https://wg21.link/LWG2743>`__","P0083R3 ``node_handle`` private members missing ""exposition only"" comment","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG2820 <https://wg21.link/LWG2820>`__","Clarify ``<cstdint>`` macros","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3120 <https://wg21.link/LWG3120>`__","Unclear behavior of ``monotonic_buffer_resource::release()``","2020-11 (Virtual)","|Complete|","16","" -"`LWG3170 <https://wg21.link/LWG3170>`__","``is_always_equal`` added to ``std::allocator`` makes the standard library treat derived types as always equal","2020-11 (Virtual)","|Complete|","18","" -"`LWG3036 <https://wg21.link/LWG3036>`__","``polymorphic_allocator::destroy`` is extraneous","2020-11 (Virtual)","|Nothing To Do|","","Reverted by P2875R4" -"`LWG3171 <https://wg21.link/LWG3171>`__","LWG2989 breaks ``directory_entry`` stream insertion","2020-11 (Virtual)","|Complete|","14","" -"`LWG3306 <https://wg21.link/LWG3306>`__","``ranges::advance`` violates its preconditions","2020-11 (Virtual)","|Complete|","14","" -"`LWG3403 <https://wg21.link/LWG3403>`__","Domain of ``ranges::ssize(E)`` doesn't ``match ranges::size(E)``","2020-11 (Virtual)","","","" -"`LWG3404 <https://wg21.link/LWG3404>`__","Finish removing subrange's conversions from pair-like","2020-11 (Virtual)","|Complete|","13","" -"`LWG3405 <https://wg21.link/LWG3405>`__","``common_view``'s converting constructor is bad, too","2020-11 (Virtual)","|Complete|","14","" -"`LWG3406 <https://wg21.link/LWG3406>`__","``elements_view::begin()`` and ``elements_view::end()`` have incompatible constraints","2020-11 (Virtual)","|Complete|","16","" -"`LWG3419 <https://wg21.link/LWG3419>`__","[algorithms.requirements]/15 doesn't reserve as many rights as it intends to","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3420 <https://wg21.link/LWG3420>`__","cpp17-iterator should check that the type looks like an iterator first","2020-11 (Virtual)","|Complete|","14","" -"`LWG3421 <https://wg21.link/LWG3421>`__","Imperfect ADL emulation for boolean-testable","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3425 <https://wg21.link/LWG3425>`__","``condition_variable_any`` fails to constrain its Lock parameters","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3426 <https://wg21.link/LWG3426>`__","``operator<=>(const unique_ptr<T, D>&, nullptr_t)`` can't get no satisfaction","2020-11 (Virtual)","|Complete|","16","" -"`LWG3427 <https://wg21.link/LWG3427>`__","``operator<=>(const shared_ptr<T>&, nullptr_t)`` definition ill-formed","2020-11 (Virtual)","|Complete|","16","" -"`LWG3428 <https://wg21.link/LWG3428>`__","``single_view``'s in place constructor should be explicit","2020-11 (Virtual)","|Complete|","14","" -"`LWG3434 <https://wg21.link/LWG3434>`__","``ios_base`` never reclaims memory for iarray and parray","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3437 <https://wg21.link/LWG3437>`__","``__cpp_lib_polymorphic_allocator`` is in the wrong header","2020-11 (Virtual)","|Complete|","14","" -"`LWG3446 <https://wg21.link/LWG3446>`__","``indirectly_readable_traits`` ambiguity for types with both ``value_type`` and ``element_type``","2020-11 (Virtual)","|Complete|","14","" -"`LWG3448 <https://wg21.link/LWG3448>`__","``transform_view``'s ``sentinel<false>`` not comparable with ``iterator<true>``","2020-11 (Virtual)","","","" -"`LWG3449 <https://wg21.link/LWG3449>`__","``take_view`` and ``take_while_view``'s ``sentinel<false>`` not comparable with their ``const iterator``","2020-11 (Virtual)","|Complete|","16","" -"`LWG3453 <https://wg21.link/LWG3453>`__","Generic code cannot call ``ranges::advance(i, s)``","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3455 <https://wg21.link/LWG3455>`__","Incorrect Postconditions on ``unique_ptr`` move assignment","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3460 <https://wg21.link/LWG3460>`__","Unimplementable ``noop_coroutine_handle`` guarantees","2020-11 (Virtual)","|Complete|","14","" -"`LWG3461 <https://wg21.link/LWG3461>`__","``convertible_to``'s description mishandles cv-qualified ``void``","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3465 <https://wg21.link/LWG3465>`__","``compare_partial_order_fallback`` requires ``F < E``","2020-11 (Virtual)","|Complete|","14","" -"`LWG3466 <https://wg21.link/LWG3466>`__","Specify the requirements for ``promise``/``future``/``shared_future`` consistently","2020-11 (Virtual)","|Nothing To Do|","","" -"`LWG3467 <https://wg21.link/LWG3467>`__","``bool`` can't be an integer-like type","2020-11 (Virtual)","|Complete|","14","" -"`LWG3472 <https://wg21.link/LWG3472>`__","``counted_iterator`` is missing preconditions","2020-11 (Virtual)","|Complete|","14","" -"`LWG3473 <https://wg21.link/LWG3473>`__","Normative encouragement in non-normative note","2020-11 (Virtual)","|Complete|","15","" -"`LWG3474 <https://wg21.link/LWG3474>`__","Nesting ``join_views`` is broken because of CTAD","2020-11 (Virtual)","|Complete|","15","" -"`LWG3476 <https://wg21.link/LWG3476>`__","``thread`` and ``jthread`` constructors require that the parameters be move-constructible but never move construct the parameters","2020-11 (Virtual)","","","" -"`LWG3477 <https://wg21.link/LWG3477>`__","Simplify constraints for ``semiregular-box``","2020-11 (Virtual)","|Complete|","13","" -"`LWG3482 <https://wg21.link/LWG3482>`__","``drop_view``'s const begin should additionally require ``sized_range``","2020-11 (Virtual)","|Complete|","14","" -"`LWG3483 <https://wg21.link/LWG3483>`__","``transform_view::iterator``'s difference is overconstrained","2020-11 (Virtual)","|Complete|","14","" +"`LWG2839 <https://wg21.link/LWG2839>`__","Self-move-assignment of library types, again","2020-11 (Virtual)","|Nothing To Do|","","`#104255 <https://github.com/llvm/llvm-project/issues/104255>`__","" +"`LWG3117 <https://wg21.link/LWG3117>`__","Missing ``packaged_task`` deduction guides","2020-11 (Virtual)","|Complete|","16","`#104256 <https://github.com/llvm/llvm-project/issues/104256>`__","" +"`LWG3143 <https://wg21.link/LWG3143>`__","``monotonic_buffer_resource`` growth policy is unclear","2020-11 (Virtual)","","","`#104258 <https://github.com/llvm/llvm-project/issues/104258>`__","" +"`LWG3195 <https://wg21.link/LWG3195>`__","What is the stored pointer value of an empty ``weak_ptr``?","2020-11 (Virtual)","|Nothing To Do|","","`#104259 <https://github.com/llvm/llvm-project/issues/104259>`__","" +"`LWG3211 <https://wg21.link/LWG3211>`__","``std::tuple<>`` should be trivially constructible","2020-11 (Virtual)","|Complete|","9","`#104260 <https://github.com/llvm/llvm-project/issues/104260>`__","" +"`LWG3236 <https://wg21.link/LWG3236>`__","Random access iterator requirements lack limiting relational operators domain to comparing those from the same range","2020-11 (Virtual)","|Nothing To Do|","","`#104261 <https://github.com/llvm/llvm-project/issues/104261>`__","" +"`LWG3265 <https://wg21.link/LWG3265>`__","``move_iterator``'s conversions are more broken after P1207","2020-11 (Virtual)","|Nothing To Do|","","`#104262 <https://github.com/llvm/llvm-project/issues/104262>`__","Resolved by `LWG3435 <https://wg21.link/LWG3435>`__" +"`LWG3435 <https://wg21.link/LWG3435>`__","``three_way_comparable_with<reverse_iterator<int*>, reverse_iterator<const int*>>``","2020-11 (Virtual)","|Complete|","13","`#104263 <https://github.com/llvm/llvm-project/issues/104263>`__","" +"`LWG3432 <https://wg21.link/LWG3432>`__","Missing requirement for ``comparison_category``","2020-11 (Virtual)","|Complete|","16","`#104265 <https://github.com/llvm/llvm-project/issues/104265>`__","" +"`LWG3447 <https://wg21.link/LWG3447>`__","Deduction guides for ``take_view`` and ``drop_view`` have different constraints","2020-11 (Virtual)","|Complete|","14","`#104266 <https://github.com/llvm/llvm-project/issues/104266>`__","" +"`LWG3450 <https://wg21.link/LWG3450>`__","The const overloads of ``take_while_view::begin/end`` are underconstrained","2020-11 (Virtual)","|Complete|","16","`#104267 <https://github.com/llvm/llvm-project/issues/104267>`__","" +"`LWG3464 <https://wg21.link/LWG3464>`__","``istream::gcount()`` can overflow","2020-11 (Virtual)","|Complete|","18","`#104269 <https://github.com/llvm/llvm-project/issues/104269>`__","" +"`LWG2731 <https://wg21.link/LWG2731>`__","Existence of ``lock_guard<MutexTypes...>::mutex_type`` typedef unclear","2020-11 (Virtual)","|Complete|","5","`#104270 <https://github.com/llvm/llvm-project/issues/104270>`__","" +"`LWG2743 <https://wg21.link/LWG2743>`__","P0083R3 ``node_handle`` private members missing ""exposition only"" comment","2020-11 (Virtual)","|Nothing To Do|","","`#104272 <https://github.com/llvm/llvm-project/issues/104272>`__","" +"`LWG2820 <https://wg21.link/LWG2820>`__","Clarify ``<cstdint>`` macros","2020-11 (Virtual)","|Nothing To Do|","","`#104273 <https://github.com/llvm/llvm-project/issues/104273>`__","" +"`LWG3120 <https://wg21.link/LWG3120>`__","Unclear behavior of ``monotonic_buffer_resource::release()``","2020-11 (Virtual)","|Complete|","16","`#104274 <https://github.com/llvm/llvm-project/issues/104274>`__","" +"`LWG3170 <https://wg21.link/LWG3170>`__","``is_always_equal`` added to ``std::allocator`` makes the standard library treat derived types as always equal","2020-11 (Virtual)","|Complete|","18","`#104275 <https://github.com/llvm/llvm-project/issues/104275>`__","" +"`LWG3036 <https://wg21.link/LWG3036>`__","``polymorphic_allocator::destroy`` is extraneous","2020-11 (Virtual)","|Nothing To Do|","","`#104276 <https://github.com/llvm/llvm-project/issues/104276>`__","Reverted by P2875R4" +"`LWG3171 <https://wg21.link/LWG3171>`__","LWG2989 breaks ``directory_entry`` stream insertion","2020-11 (Virtual)","|Complete|","14","`#104277 <https://github.com/llvm/llvm-project/issues/104277>`__","" +"`LWG3306 <https://wg21.link/LWG3306>`__","``ranges::advance`` violates its preconditions","2020-11 (Virtual)","|Complete|","14","`#104279 <https://github.com/llvm/llvm-project/issues/104279>`__","" +"`LWG3403 <https://wg21.link/LWG3403>`__","Domain of ``ranges::ssize(E)`` doesn't ``match ranges::size(E)``","2020-11 (Virtual)","","","`#104280 <https://github.com/llvm/llvm-project/issues/104280>`__","" +"`LWG3404 <https://wg21.link/LWG3404>`__","Finish removing subrange's conversions from pair-like","2020-11 (Virtual)","|Complete|","13","`#104282 <https://github.com/llvm/llvm-project/issues/104282>`__","" +"`LWG3405 <https://wg21.link/LWG3405>`__","``common_view``'s converting constructor is bad, too","2020-11 (Virtual)","|Complete|","14","`#104283 <https://github.com/llvm/llvm-project/issues/104283>`__","" +"`LWG3406 <https://wg21.link/LWG3406>`__","``elements_view::begin()`` and ``elements_view::end()`` have incompatible constraints","2020-11 (Virtual)","|Complete|","16","`#104284 <https://github.com/llvm/llvm-project/issues/104284>`__","" +"`LWG3419 <https://wg21.link/LWG3419>`__","[algorithms.requirements]/15 doesn't reserve as many rights as it intends to","2020-11 (Virtual)","|Nothing To Do|","","`#104286 <https://github.com/llvm/llvm-project/issues/104286>`__","" +"`LWG3420 <https://wg21.link/LWG3420>`__","cpp17-iterator should check that the type looks like an iterator first","2020-11 (Virtual)","|Complete|","14","`#104287 <https://github.com/llvm/llvm-project/issues/104287>`__","" +"`LWG3421 <https://wg21.link/LWG3421>`__","Imperfect ADL emulation for boolean-testable","2020-11 (Virtual)","|Nothing To Do|","","`#104288 <https://github.com/llvm/llvm-project/issues/104288>`__","" +"`LWG3425 <https://wg21.link/LWG3425>`__","``condition_variable_any`` fails to constrain its Lock parameters","2020-11 (Virtual)","|Nothing To Do|","","`#104289 <https://github.com/llvm/llvm-project/issues/104289>`__","" +"`LWG3426 <https://wg21.link/LWG3426>`__","``operator<=>(const unique_ptr<T, D>&, nullptr_t)`` can't get no satisfaction","2020-11 (Virtual)","|Complete|","16","`#104290 <https://github.com/llvm/llvm-project/issues/104290>`__","" +"`LWG3427 <https://wg21.link/LWG3427>`__","``operator<=>(const shared_ptr<T>&, nullptr_t)`` definition ill-formed","2020-11 (Virtual)","|Complete|","16","`#104291 <https://github.com/llvm/llvm-project/issues/104291>`__","" +"`LWG3428 <https://wg21.link/LWG3428>`__","``single_view``'s in place constructor should be explicit","2020-11 (Virtual)","|Complete|","14","`#104292 <https://github.com/llvm/llvm-project/issues/104292>`__","" +"`LWG3434 <https://wg21.link/LWG3434>`__","``ios_base`` never reclaims memory for iarray and parray","2020-11 (Virtual)","|Nothing To Do|","","`#104293 <https://github.com/llvm/llvm-project/issues/104293>`__","" +"`LWG3437 <https://wg21.link/LWG3437>`__","``__cpp_lib_polymorphic_allocator`` is in the wrong header","2020-11 (Virtual)","|Complete|","14","`#104294 <https://github.com/llvm/llvm-project/issues/104294>`__","" +"`LWG3446 <https://wg21.link/LWG3446>`__","``indirectly_readable_traits`` ambiguity for types with both ``value_type`` and ``element_type``","2020-11 (Virtual)","|Complete|","14","`#103998 <https://github.com/llvm/llvm-project/issues/103998>`__","" +"`LWG3448 <https://wg21.link/LWG3448>`__","``transform_view``'s ``sentinel<false>`` not comparable with ``iterator<true>``","2020-11 (Virtual)","","","`#104295 <https://github.com/llvm/llvm-project/issues/104295>`__","" +"`LWG3449 <https://wg21.link/LWG3449>`__","``take_view`` and ``take_while_view``'s ``sentinel<false>`` not comparable with their ``const iterator``","2020-11 (Virtual)","|Complete|","16","`#104296 <https://github.com/llvm/llvm-project/issues/104296>`__","" +"`LWG3453 <https://wg21.link/LWG3453>`__","Generic code cannot call ``ranges::advance(i, s)``","2020-11 (Virtual)","|Nothing To Do|","","`#104297 <https://github.com/llvm/llvm-project/issues/104297>`__","" +"`LWG3455 <https://wg21.link/LWG3455>`__","Incorrect Postconditions on ``unique_ptr`` move assignment","2020-11 (Virtual)","|Nothing To Do|","","`#104298 <https://github.com/llvm/llvm-project/issues/104298>`__","" +"`LWG3460 <https://wg21.link/LWG3460>`__","Unimplementable ``noop_coroutine_handle`` guarantees","2020-11 (Virtual)","|Complete|","14","`#104299 <https://github.com/llvm/llvm-project/issues/104299>`__","" +"`LWG3461 <https://wg21.link/LWG3461>`__","``convertible_to``'s description mishandles cv-qualified ``void``","2020-11 (Virtual)","|Nothing To Do|","","`#104300 <https://github.com/llvm/llvm-project/issues/104300>`__","" +"`LWG3465 <https://wg21.link/LWG3465>`__","``compare_partial_order_fallback`` requires ``F < E``","2020-11 (Virtual)","|Complete|","14","`#104301 <https://github.com/llvm/llvm-project/issues/104301>`__","" +"`LWG3466 <https://wg21.link/LWG3466>`__","Specify the requirements for ``promise``/``future``/``shared_future`` consistently","2020-11 (Virtual)","|Nothing To Do|","","`#104302 <https://github.com/llvm/llvm-project/issues/104302>`__","" +"`LWG3467 <https://wg21.link/LWG3467>`__","``bool`` can't be an integer-like type","2020-11 (Virtual)","|Complete|","14","`#104303 <https://github.com/llvm/llvm-project/issues/104303>`__","" +"`LWG3472 <https://wg21.link/LWG3472>`__","``counted_iterator`` is missing preconditions","2020-11 (Virtual)","|Complete|","14","`#104304 <https://github.com/llvm/llvm-project/issues/104304>`__","" +"`LWG3473 <https://wg21.link/LWG3473>`__","Normative encouragement in non-normative note","2020-11 (Virtual)","|Complete|","15","`#104305 <https://github.com/llvm/llvm-project/issues/104305>`__","" +"`LWG3474 <https://wg21.link/LWG3474>`__","Nesting ``join_views`` is broken because of CTAD","2020-11 (Virtual)","|Complete|","15","`#104306 <https://github.com/llvm/llvm-project/issues/104306>`__","" +"`LWG3476 <https://wg21.link/LWG3476>`__","``thread`` and ``jthread`` constructors require that the parameters be move-constructible but never move construct the parameters","2020-11 (Virtual)","","","`#104307 <https://github.com/llvm/llvm-project/issues/104307>`__","" +"`LWG3477 <https://wg21.link/LWG3477>`__","Simplify constraints for ``semiregular-box``","2020-11 (Virtual)","|Complete|","13","`#104308 <https://github.com/llvm/llvm-project/issues/104308>`__","" +"`LWG3482 <https://wg21.link/LWG3482>`__","``drop_view``'s const begin should additionally require ``sized_range``","2020-11 (Virtual)","|Complete|","14","`#104309 <https://github.com/llvm/llvm-project/issues/104309>`__","" +"`LWG3483 <https://wg21.link/LWG3483>`__","``transform_view::iterator``'s difference is overconstrained","2020-11 (Virtual)","|Complete|","14","`#104310 <https://github.com/llvm/llvm-project/issues/104310>`__","" "","","","","","" -"`LWG3391 <https://wg21.link/LWG3391>`__","Problems with ``counted_iterator``/``move_iterator::base() const &``","2021-02 (Virtual)","","","" -"`LWG3433 <https://wg21.link/LWG3433>`__","``subrange::advance(n)`` has UB when ``n < 0``","2021-02 (Virtual)","|Complete|","14","" -"`LWG3490 <https://wg21.link/LWG3490>`__","``ranges::drop_while_view::begin()`` is missing a precondition","2021-02 (Virtual)","|Nothing To Do|","","" -"`LWG3492 <https://wg21.link/LWG3492>`__","Minimal improvements to ``elements_view::iterator``","2021-02 (Virtual)","|Complete|","16","" -"`LWG3494 <https://wg21.link/LWG3494>`__","Allow ranges to be conditionally borrowed","2021-02 (Virtual)","|Nothing To Do|","","Superseded by `P2017R1 <https://wg21.link/P2017R1>`__" -"`LWG3495 <https://wg21.link/LWG3495>`__","``constexpr launder`` makes pointers to inactive members of unions usable","2021-02 (Virtual)","|Nothing To Do|","","" -"`LWG3500 <https://wg21.link/LWG3500>`__","``join_view::iterator::operator->()`` is bogus","2021-02 (Virtual)","|Complete|","14","" -"`LWG3502 <https://wg21.link/LWG3502>`__","``elements_view`` should not be allowed to return dangling reference","2021-02 (Virtual)","|Complete|","16","" -"`LWG3505 <https://wg21.link/LWG3505>`__","``split_view::outer-iterator::operator++`` misspecified","2021-02 (Virtual)","","","" +"`LWG3391 <https://wg21.link/LWG3391>`__","Problems with ``counted_iterator``/``move_iterator::base() const &``","2021-02 (Virtual)","","","`#104311 <https://github.com/llvm/llvm-project/issues/104311>`__","" +"`LWG3433 <https://wg21.link/LWG3433>`__","``subrange::advance(n)`` has UB when ``n < 0``","2021-02 (Virtual)","|Complete|","14","`#104312 <https://github.com/llvm/llvm-project/issues/104312>`__","" +"`LWG3490 <https://wg21.link/LWG3490>`__","``ranges::drop_while_view::begin()`` is missing a precondition","2021-02 (Virtual)","|Nothing To Do|","","`#104313 <https://github.com/llvm/llvm-project/issues/104313>`__","" +"`LWG3492 <https://wg21.link/LWG3492>`__","Minimal improvements to ``elements_view::iterator``","2021-02 (Virtual)","|Complete|","16","`#104314 <https://github.com/llvm/llvm-project/issues/104314>`__","" +"`LWG3494 <https://wg21.link/LWG3494>`__","Allow ranges to be conditionally borrowed","2021-02 (Virtual)","|Nothing To Do|","","`#104315 <https://github.com/llvm/llvm-project/issues/104315>`__","Superseded by `P2017R1 <https://wg21.link/P2017R1>`__" +"`LWG3495 <https://wg21.link/LWG3495>`__","``constexpr launder`` makes pointers to inactive members of unions usable","2021-02 (Virtual)","|Nothing To Do|","","`#104316 <https://github.com/llvm/llvm-project/issues/104316>`__","" +"`LWG3500 <https://wg21.link/LWG3500>`__","``join_view::iterator::operator->()`` is bogus","2021-02 (Virtual)","|Complete|","14","`#104318 <https://github.com/llvm/llvm-project/issues/104318>`__","" +"`LWG3502 <https://wg21.link/LWG3502>`__","``elements_view`` should not be allowed to return dangling reference","2021-02 (Virtual)","|Complete|","16","`#104319 <https://github.com/llvm/llvm-project/issues/104319>`__","" +"`LWG3505 <https://wg21.link/LWG3505>`__","``split_view::outer-iterator::operator++`` misspecified","2021-02 (Virtual)","","","`#104320 <https://github.com/llvm/llvm-project/issues/104320>`__","" "","","","","","" -"`LWG2774 <https://wg21.link/LWG2774>`__","``std::function`` construction vs assignment","2021-06 (Virtual)","","","" -"`LWG2818 <https://wg21.link/LWG2818>`__","``::std::`` everywhere rule needs tweaking","2021-06 (Virtual)","|Nothing To Do|","","" -"`LWG2997 <https://wg21.link/LWG2997>`__","LWG 491 and the specification of ``{forward_,}list::unique``","2021-06 (Virtual)","","","" -"`LWG3410 <https://wg21.link/LWG3410>`__","``lexicographical_compare_three_way`` is overspecified","2021-06 (Virtual)","|Complete|","17","" -"`LWG3430 <https://wg21.link/LWG3430>`__","``std::fstream`` & co. should be constructible from string_view","2021-06 (Virtual)","|Complete|","19","" -"`LWG3462 <https://wg21.link/LWG3462>`__","§[formatter.requirements]: Formatter requirements forbid use of ``fc.arg()``","2021-06 (Virtual)","|Nothing To Do|","","" -"`LWG3481 <https://wg21.link/LWG3481>`__","``viewable_range`` mishandles lvalue move-only views","2021-06 (Virtual)","|Nothing To Do|","","Superseded by `P2415R2 <https://wg21.link/P2415R2>`__" -"`LWG3506 <https://wg21.link/LWG3506>`__","Missing allocator-extended constructors for ``priority_queue``","2021-06 (Virtual)","|Complete|","14","" -"`LWG3517 <https://wg21.link/LWG3517>`__","``join_view::iterator``'s ``iter_swap`` is underconstrained","2021-06 (Virtual)","|Complete|","14","" -"`LWG3518 <https://wg21.link/LWG3518>`__","Exception requirements on char trait operations unclear","2021-06 (Virtual)","|Nothing To Do|","","" -"`LWG3519 <https://wg21.link/LWG3519>`__","Incomplete synopses for ``<random>`` classes","2021-06 (Virtual)","","","" -"`LWG3520 <https://wg21.link/LWG3520>`__","``iter_move`` and ``iter_swap`` are inconsistent for ``transform_view::iterator``","2021-06 (Virtual)","|Complete|","14","" -"`LWG3521 <https://wg21.link/LWG3521>`__","Overly strict requirements on ``qsort`` and ``bsearch``","2021-06 (Virtual)","|Nothing To Do|","","" -"`LWG3522 <https://wg21.link/LWG3522>`__","Missing requirement on ``InputIterator`` template parameter for ``priority_queue`` constructors","2021-06 (Virtual)","|Complete|","14","" -"`LWG3523 <https://wg21.link/LWG3523>`__","``iota_view::sentinel`` is not always ``iota_view``'s sentinel","2021-06 (Virtual)","|Complete|","17","" -"`LWG3526 <https://wg21.link/LWG3526>`__","Return types of ``uses_allocator_construction_args`` unspecified","2021-06 (Virtual)","","","" -"`LWG3527 <https://wg21.link/LWG3527>`__","``uses_allocator_construction_args`` handles rvalue pairs of rvalue references incorrectly","2021-06 (Virtual)","","","" -"`LWG3528 <https://wg21.link/LWG3528>`__","``make_from_tuple`` can perform (the equivalent of) a C-style cast","2021-06 (Virtual)","|Complete|","19","" -"`LWG3529 <https://wg21.link/LWG3529>`__","``priority_queue(first, last)`` should construct ``c`` with ``(first, last)``","2021-06 (Virtual)","|Complete|","14","" -"`LWG3530 <https://wg21.link/LWG3530>`__","``BUILTIN-PTR-MEOW`` should not opt the type out of syntactic checks","2021-06 (Virtual)","","","" -"`LWG3532 <https://wg21.link/LWG3532>`__","``split_view<V, P>::inner-iterator<true>::operator++(int)`` should depend on ``Base``","2021-06 (Virtual)","","","" -"`LWG3533 <https://wg21.link/LWG3533>`__","Make ``base() const &`` consistent across iterator wrappers that supports ``input_iterators``","2021-06 (Virtual)","|Complete|","14","" -"`LWG3536 <https://wg21.link/LWG3536>`__","Should ``chrono::from_stream()`` assign zero to duration for failure?","2021-06 (Virtual)","","","" -"`LWG3539 <https://wg21.link/LWG3539>`__","``format_to`` must not copy models of ``output_iterator<const charT&>``","2021-06 (Virtual)","|Complete|","14","" -"`LWG3540 <https://wg21.link/LWG3540>`__","§[format.arg] There should be no const in ``basic_format_arg(const T* p)``","2021-06 (Virtual)","|Complete|","14","" -"`LWG3541 <https://wg21.link/LWG3541>`__","``indirectly_readable_traits`` should be SFINAE-friendly for all types","2021-06 (Virtual)","|Complete|","14","" -"`LWG3542 <https://wg21.link/LWG3542>`__","``basic_format_arg`` mishandles ``basic_string_view`` with custom traits","2021-06 (Virtual)","|Complete|","14","" -"`LWG3543 <https://wg21.link/LWG3543>`__","Definition of when ``counted_iterators`` refer to the same sequence isn't quite right","2021-06 (Virtual)","|Nothing To Do|","","" -"`LWG3544 <https://wg21.link/LWG3544>`__","``format-arg-store::args`` is unintentionally not exposition-only","2021-06 (Virtual)","|Complete|","14","" -"`LWG3546 <https://wg21.link/LWG3546>`__","``common_iterator``'s postfix-proxy is not quite right","2021-06 (Virtual)","","","" -"`LWG3548 <https://wg21.link/LWG3548>`__","``shared_ptr`` construction from ``unique_ptr`` should move (not copy) the deleter","2021-06 (Virtual)","|Complete|","15","" -"`LWG3549 <https://wg21.link/LWG3549>`__","``view_interface`` is overspecified to derive from ``view_base``","2021-06 (Virtual)","|Complete|","14","" -"`LWG3551 <https://wg21.link/LWG3551>`__","``borrowed_{iterator,subrange}_t`` are overspecified","2021-06 (Virtual)","|Nothing To Do|","","" -"`LWG3552 <https://wg21.link/LWG3552>`__","Parallel specialized memory algorithms should require forward iterators","2021-06 (Virtual)","","","" -"`LWG3553 <https://wg21.link/LWG3553>`__","Useless constraint in ``split_view::outer-iterator::value_type::begin()``","2021-06 (Virtual)","","","" -"`LWG3555 <https://wg21.link/LWG3555>`__","``{transform,elements}_view::iterator::iterator_concept`` should consider const-qualification of the underlying range","2021-06 (Virtual)","","","" +"`LWG2774 <https://wg21.link/LWG2774>`__","``std::function`` construction vs assignment","2021-06 (Virtual)","","","`#104321 <https://github.com/llvm/llvm-project/issues/104321>`__","" +"`LWG2818 <https://wg21.link/LWG2818>`__","``::std::`` everywhere rule needs tweaking","2021-06 (Virtual)","|Nothing To Do|","","`#104322 <https://github.com/llvm/llvm-project/issues/104322>`__","" +"`LWG2997 <https://wg21.link/LWG2997>`__","LWG 491 and the specification of ``{forward_,}list::unique``","2021-06 (Virtual)","","","`#104323 <https://github.com/llvm/llvm-project/issues/104323>`__","" +"`LWG3410 <https://wg21.link/LWG3410>`__","``lexicographical_compare_three_way`` is overspecified","2021-06 (Virtual)","|Complete|","17","`#104324 <https://github.com/llvm/llvm-project/issues/104324>`__","" +"`LWG3430 <https://wg21.link/LWG3430>`__","``std::fstream`` & co. should be constructible from string_view","2021-06 (Virtual)","|Complete|","19","`#104325 <https://github.com/llvm/llvm-project/issues/104325>`__","" +"`LWG3462 <https://wg21.link/LWG3462>`__","§[formatter.requirements]: Formatter requirements forbid use of ``fc.arg()``","2021-06 (Virtual)","|Nothing To Do|","","`#104326 <https://github.com/llvm/llvm-project/issues/104326>`__","" +"`LWG3481 <https://wg21.link/LWG3481>`__","``viewable_range`` mishandles lvalue move-only views","2021-06 (Virtual)","|Nothing To Do|","","`#104327 <https://github.com/llvm/llvm-project/issues/104327>`__","Superseded by `P2415R2 <https://wg21.link/P2415R2>`__" +"`LWG3506 <https://wg21.link/LWG3506>`__","Missing allocator-extended constructors for ``priority_queue``","2021-06 (Virtual)","|Complete|","14","`#104329 <https://github.com/llvm/llvm-project/issues/104329>`__","" +"`LWG3517 <https://wg21.link/LWG3517>`__","``join_view::iterator``'s ``iter_swap`` is underconstrained","2021-06 (Virtual)","|Complete|","14","`#104330 <https://github.com/llvm/llvm-project/issues/104330>`__","" +"`LWG3518 <https://wg21.link/LWG3518>`__","Exception requirements on char trait operations unclear","2021-06 (Virtual)","|Nothing To Do|","","`#104331 <https://github.com/llvm/llvm-project/issues/104331>`__","" +"`LWG3519 <https://wg21.link/LWG3519>`__","Incomplete synopses for ``<random>`` classes","2021-06 (Virtual)","","","`#104332 <https://github.com/llvm/llvm-project/issues/104332>`__","" +"`LWG3520 <https://wg21.link/LWG3520>`__","``iter_move`` and ``iter_swap`` are inconsistent for ``transform_view::iterator``","2021-06 (Virtual)","|Complete|","14","`#104333 <https://github.com/llvm/llvm-project/issues/104333>`__","" +"`LWG3521 <https://wg21.link/LWG3521>`__","Overly strict requirements on ``qsort`` and ``bsearch``","2021-06 (Virtual)","|Nothing To Do|","","`#104334 <https://github.com/llvm/llvm-project/issues/104334>`__","" +"`LWG3522 <https://wg21.link/LWG3522>`__","Missing requirement on ``InputIterator`` template parameter for ``priority_queue`` constructors","2021-06 (Virtual)","|Complete|","14","`#104335 <https://github.com/llvm/llvm-project/issues/104335>`__","" +"`LWG3523 <https://wg21.link/LWG3523>`__","``iota_view::sentinel`` is not always ``iota_view``'s sentinel","2021-06 (Virtual)","|Complete|","17","`#104336 <https://github.com/llvm/llvm-project/issues/104336>`__","" +"`LWG3526 <https://wg21.link/LWG3526>`__","Return types of ``uses_allocator_construction_args`` unspecified","2021-06 (Virtual)","","","`#104337 <https://github.com/llvm/llvm-project/issues/104337>`__","" +"`LWG3527 <https://wg21.link/LWG3527>`__","``uses_allocator_construction_args`` handles rvalue pairs of rvalue references incorrectly","2021-06 (Virtual)","","","`#104338 <https://github.com/llvm/llvm-project/issues/104338>`__","" +"`LWG3528 <https://wg21.link/LWG3528>`__","``make_from_tuple`` can perform (the equivalent of) a C-style cast","2021-06 (Virtual)","|Complete|","19","`#104339 <https://github.com/llvm/llvm-project/issues/104339>`__","" +"`LWG3529 <https://wg21.link/LWG3529>`__","``priority_queue(first, last)`` should construct ``c`` with ``(first, last)``","2021-06 (Virtual)","|Complete|","14","`#104340 <https://github.com/llvm/llvm-project/issues/104340>`__","" +"`LWG3530 <https://wg21.link/LWG3530>`__","``BUILTIN-PTR-MEOW`` should not opt the type out of syntactic checks","2021-06 (Virtual)","","","`#104341 <https://github.com/llvm/llvm-project/issues/104341>`__","" +"`LWG3532 <https://wg21.link/LWG3532>`__","``split_view<V, P>::inner-iterator<true>::operator++(int)`` should depend on ``Base``","2021-06 (Virtual)","","","`#104342 <https://github.com/llvm/llvm-project/issues/104342>`__","" +"`LWG3533 <https://wg21.link/LWG3533>`__","Make ``base() const &`` consistent across iterator wrappers that supports ``input_iterators``","2021-06 (Virtual)","|Complete|","14","`#104343 <https://github.com/llvm/llvm-project/issues/104343>`__","" +"`LWG3536 <https://wg21.link/LWG3536>`__","Should ``chrono::from_stream()`` assign zero to duration for failure?","2021-06 (Virtual)","","","`#104344 <https://github.com/llvm/llvm-project/issues/104344>`__","" +"`LWG3539 <https://wg21.link/LWG3539>`__","``format_to`` must not copy models of ``output_iterator<const charT&>``","2021-06 (Virtual)","|Complete|","14","`#104345 <https://github.com/llvm/llvm-project/issues/104345>`__","" +"`LWG3540 <https://wg21.link/LWG3540>`__","§[format.arg] There should be no const in ``basic_format_arg(const T* p)``","2021-06 (Virtual)","|Complete|","14","`#104348 <https://github.com/llvm/llvm-project/issues/104348>`__","" +"`LWG3541 <https://wg21.link/LWG3541>`__","``indirectly_readable_traits`` should be SFINAE-friendly for all types","2021-06 (Virtual)","|Complete|","14","`#104349 <https://github.com/llvm/llvm-project/issues/104349>`__","" +"`LWG3542 <https://wg21.link/LWG3542>`__","``basic_format_arg`` mishandles ``basic_string_view`` with custom traits","2021-06 (Virtual)","|Complete|","14","`#104350 <https://github.com/llvm/llvm-project/issues/104350>`__","" +"`LWG3543 <https://wg21.link/LWG3543>`__","Definition of when ``counted_iterators`` refer to the same sequence isn't quite right","2021-06 (Virtual)","|Nothing To Do|","","`#104351 <https://github.com/llvm/llvm-project/issues/104351>`__","" +"`LWG3544 <https://wg21.link/LWG3544>`__","``format-arg-store::args`` is unintentionally not exposition-only","2021-06 (Virtual)","|Complete|","14","`#104352 <https://github.com/llvm/llvm-project/issues/104352>`__","" +"`LWG3546 <https://wg21.link/LWG3546>`__","``common_iterator``'s postfix-proxy is not quite right","2021-06 (Virtual)","","","`#104353 <https://github.com/llvm/llvm-project/issues/104353>`__","" +"`LWG3548 <https://wg21.link/LWG3548>`__","``shared_ptr`` construction from ``unique_ptr`` should move (not copy) the deleter","2021-06 (Virtual)","|Complete|","15","`#104354 <https://github.com/llvm/llvm-project/issues/104354>`__","" +"`LWG3549 <https://wg21.link/LWG3549>`__","``view_interface`` is overspecified to derive from ``view_base``","2021-06 (Virtual)","|Complete|","14","`#104355 <https://github.com/llvm/llvm-project/issues/104355>`__","" +"`LWG3551 <https://wg21.link/LWG3551>`__","``borrowed_{iterator,subrange}_t`` are overspecified","2021-06 (Virtual)","|Nothing To Do|","","`#104356 <https://github.com/llvm/llvm-project/issues/104356>`__","" +"`LWG3552 <https://wg21.link/LWG3552>`__","Parallel specialized memory algorithms should require forward iterators","2021-06 (Virtual)","","","`#104357 <https://github.com/llvm/llvm-project/issues/104357>`__","" +"`LWG3553 <https://wg21.link/LWG3553>`__","Useless constraint in ``split_view::outer-iterator::value_type::begin()``","2021-06 (Virtual)","","","`#104358 <https://github.com/llvm/llvm-project/issues/104358>`__","" +"`LWG3555 <https://wg21.link/LWG3555>`__","``{transform,elements}_view::iterator::iterator_concept`` should consider const-qualification of the underlying range","2021-06 (Virtual)","","","`#104359 <https://github.com/llvm/llvm-project/issues/104359>`__","" "","","","","","" -"`LWG2191 <https://wg21.link/LWG2191>`__","Incorrect specification of ``match_results(match_results&&)``","2021-10 (Virtual)","|Nothing To Do|","","" -"`LWG2381 <https://wg21.link/LWG2381>`__","Inconsistency in parsing floating point numbers","2021-10 (Virtual)","|Complete|","19","" -"`LWG2762 <https://wg21.link/LWG2762>`__","``unique_ptr operator*()`` should be ``noexcept``","2021-10 (Virtual)","|Complete|","19","" -"`LWG3121 <https://wg21.link/LWG3121>`__","``tuple`` constructor constraints for ``UTypes&&...`` overloads","2021-10 (Virtual)","","","" -"`LWG3123 <https://wg21.link/LWG3123>`__","``duration`` constructor from representation shouldn't be effectively non-throwing","2021-10 (Virtual)","","","" -"`LWG3146 <https://wg21.link/LWG3146>`__","Excessive unwrapping in ``std::ref/cref``","2021-10 (Virtual)","|Complete|","14","" -"`LWG3152 <https://wg21.link/LWG3152>`__","``common_type`` and ``common_reference`` have flaws in common","2021-10 (Virtual)","","","" -"`LWG3293 <https://wg21.link/LWG3293>`__","``move_iterator operator+()`` has incorrect constraints","2021-10 (Virtual)","|Complete|","15","" -"`LWG3361 <https://wg21.link/LWG3361>`__","``safe_range<SomeRange&>`` case","2021-10 (Virtual)","|Nothing To Do|","","" -"`LWG3392 <https://wg21.link/LWG3392>`__","``ranges::distance()`` cannot be used on a move-only iterator with a sized sentinel","2021-10 (Virtual)","|Complete|","14","" -"`LWG3407 <https://wg21.link/LWG3407>`__","Some problems with the wording changes of P1739R4","2021-10 (Virtual)","|Complete|","15","" -"`LWG3422 <https://wg21.link/LWG3422>`__","Issues of ``seed_seq``'s constructors","2021-10 (Virtual)","|Complete|","14","" -"`LWG3470 <https://wg21.link/LWG3470>`__","``convertible-to-non-slicing`` seems to reject valid case","2021-10 (Virtual)","|Complete|","14","" -"`LWG3480 <https://wg21.link/LWG3480>`__","``directory_iterator`` and ``recursive_directory_iterator`` are not C++20 ranges","2021-10 (Virtual)","|Complete|","14","" -"`LWG3498 <https://wg21.link/LWG3498>`__","Inconsistent ``noexcept``-specifiers for ``basic_syncbuf``","2021-10 (Virtual)","","","" -"`LWG3535 <https://wg21.link/LWG3535>`__","``join_view::iterator::iterator_category`` and ``::iterator_concept`` lie","2021-10 (Virtual)","|Complete|","15","" -"`LWG3554 <https://wg21.link/LWG3554>`__","``chrono::parse`` needs ``const charT*`` and ``basic_string_view<charT>`` overloads","2021-10 (Virtual)","","","" -"`LWG3557 <https://wg21.link/LWG3557>`__","The ``static_cast`` expression in ``convertible_to`` has the wrong operand","2021-10 (Virtual)","|Complete|","14","" -"`LWG3559 <https://wg21.link/LWG3559>`__","Semantic requirements of ``sized_range`` is circular","2021-10 (Virtual)","|Nothing To Do|","","" -"`LWG3560 <https://wg21.link/LWG3560>`__","``ranges::equal`` and ``ranges::is_permutation`` should short-circuit for ``sized_ranges``","2021-10 (Virtual)","","","" -"`LWG3561 <https://wg21.link/LWG3561>`__","Issue with internal counter in ``discard_block_engine``","2021-10 (Virtual)","","","" -"`LWG3563 <https://wg21.link/LWG3563>`__","``keys_view`` example is broken","2021-10 (Virtual)","","","" -"`LWG3566 <https://wg21.link/LWG3566>`__","Constraint recursion for ``operator<=>(optional<T>, U)``","2021-10 (Virtual)","|Complete|","17","" -"`LWG3567 <https://wg21.link/LWG3567>`__","Formatting move-only iterators take two","2021-10 (Virtual)","|Complete|","16","" -"`LWG3568 <https://wg21.link/LWG3568>`__","``basic_istream_view`` needs to initialize ``value_``","2021-10 (Virtual)","|Complete|","16","" -"`LWG3570 <https://wg21.link/LWG3570>`__","``basic_osyncstream::emit`` should be an unformatted output function","2021-10 (Virtual)","|Complete|","18","" -"`LWG3571 <https://wg21.link/LWG3571>`__","``flush_emit`` should set ``badbit`` if the ``emit`` call fails","2021-10 (Virtual)","","","" -"`LWG3572 <https://wg21.link/LWG3572>`__","``copyable-box`` should be fully ``constexpr``","2021-10 (Virtual)","|Complete|","14","" -"`LWG3573 <https://wg21.link/LWG3573>`__","Missing Throws element for ``basic_string_view(It begin, End end)``","2021-10 (Virtual)","|Complete|","14","" -"`LWG3574 <https://wg21.link/LWG3574>`__","``common_iterator`` should be completely ``constexpr``-able","2021-10 (Virtual)","|Complete|","14","" -"`LWG3580 <https://wg21.link/LWG3580>`__","``iota_view``'s ``iterator``'s binary ``operator+`` should be improved","2021-10 (Virtual)","|Complete|","14","" -"`LWG3581 <https://wg21.link/LWG3581>`__","The range constructor makes ``basic_string_view`` not trivially move constructible","2021-10 (Virtual)","|Complete|","14","" -"`LWG3585 <https://wg21.link/LWG3585>`__","``variant`` converting assignment with immovable alternative","2021-10 (Virtual)","","","" -"`LWG3589 <https://wg21.link/LWG3589>`__","The ``const`` lvalue reference overload of ``get`` for ``subrange`` does not constrain ``I`` to be ``copyable`` when ``N == 0``","2021-10 (Virtual)","|Complete|","14","" -"`LWG3590 <https://wg21.link/LWG3590>`__","``split_view::base() const &`` is overconstrained","2021-10 (Virtual)","|Complete|","16","" -"`LWG3591 <https://wg21.link/LWG3591>`__","``lazy_split_view<input_view>::inner-iterator::base() &&`` invalidates outer iterators","2021-10 (Virtual)","","","" -"`LWG3592 <https://wg21.link/LWG3592>`__","``lazy_split_view`` needs to check the simpleness of Pattern","2021-10 (Virtual)","","","" -"`LWG3593 <https://wg21.link/LWG3593>`__","Several iterators' ``base() const &`` and ``lazy_split_view::outer-iterator::value_type::end()`` missing ``noexcept``","2021-10 (Virtual)","","","" -"`LWG3595 <https://wg21.link/LWG3595>`__","Exposition-only classes proxy and postfix-proxy for ``common_iterator`` should be fully ``constexpr``","2021-10 (Virtual)","|Complete|","14","" +"`LWG2191 <https://wg21.link/LWG2191>`__","Incorrect specification of ``match_results(match_results&&)``","2021-10 (Virtual)","|Nothing To Do|","","`#104360 <https://github.com/llvm/llvm-project/issues/104360>`__","" +"`LWG2381 <https://wg21.link/LWG2381>`__","Inconsistency in parsing floating point numbers","2021-10 (Virtual)","|Complete|","19","`#104361 <https://github.com/llvm/llvm-project/issues/104361>`__","" +"`LWG2762 <https://wg21.link/LWG2762>`__","``unique_ptr operator*()`` should be ``noexcept``","2021-10 (Virtual)","|Complete|","19","`#104362 <https://github.com/llvm/llvm-project/issues/104362>`__","" +"`LWG3121 <https://wg21.link/LWG3121>`__","``tuple`` constructor constraints for ``UTypes&&...`` overloads","2021-10 (Virtual)","","","`#104364 <https://github.com/llvm/llvm-project/issues/104364>`__","" +"`LWG3123 <https://wg21.link/LWG3123>`__","``duration`` constructor from representation shouldn't be effectively non-throwing","2021-10 (Virtual)","","","`#104365 <https://github.com/llvm/llvm-project/issues/104365>`__","" +"`LWG3146 <https://wg21.link/LWG3146>`__","Excessive unwrapping in ``std::ref/cref``","2021-10 (Virtual)","|Complete|","14","`#104366 <https://github.com/llvm/llvm-project/issues/104366>`__","" +"`LWG3152 <https://wg21.link/LWG3152>`__","``common_type`` and ``common_reference`` have flaws in common","2021-10 (Virtual)","","","`#104367 <https://github.com/llvm/llvm-project/issues/104367>`__","" +"`LWG3293 <https://wg21.link/LWG3293>`__","``move_iterator operator+()`` has incorrect constraints","2021-10 (Virtual)","|Complete|","15","`#104368 <https://github.com/llvm/llvm-project/issues/104368>`__","" +"`LWG3361 <https://wg21.link/LWG3361>`__","``safe_range<SomeRange&>`` case","2021-10 (Virtual)","|Nothing To Do|","","`#104369 <https://github.com/llvm/llvm-project/issues/104369>`__","" +"`LWG3392 <https://wg21.link/LWG3392>`__","``ranges::distance()`` cannot be used on a move-only iterator with a sized sentinel","2021-10 (Virtual)","|Complete|","14","`#104370 <https://github.com/llvm/llvm-project/issues/104370>`__","" +"`LWG3407 <https://wg21.link/LWG3407>`__","Some problems with the wording changes of P1739R4","2021-10 (Virtual)","|Complete|","15","`#104371 <https://github.com/llvm/llvm-project/issues/104371>`__","" +"`LWG3422 <https://wg21.link/LWG3422>`__","Issues of ``seed_seq``'s constructors","2021-10 (Virtual)","|Complete|","14","`#104372 <https://github.com/llvm/llvm-project/issues/104372>`__","" +"`LWG3470 <https://wg21.link/LWG3470>`__","``convertible-to-non-slicing`` seems to reject valid case","2021-10 (Virtual)","|Complete|","14","`#104373 <https://github.com/llvm/llvm-project/issues/104373>`__","" +"`LWG3480 <https://wg21.link/LWG3480>`__","``directory_iterator`` and ``recursive_directory_iterator`` are not C++20 ranges","2021-10 (Virtual)","|Complete|","14","`#104374 <https://github.com/llvm/llvm-project/issues/104374>`__","" +"`LWG3498 <https://wg21.link/LWG3498>`__","Inconsistent ``noexcept``-specifiers for ``basic_syncbuf``","2021-10 (Virtual)","","","`#104375 <https://github.com/llvm/llvm-project/issues/104375>`__","" +"`LWG3535 <https://wg21.link/LWG3535>`__","``join_view::iterator::iterator_category`` and ``::iterator_concept`` lie","2021-10 (Virtual)","|Complete|","15","`#104376 <https://github.com/llvm/llvm-project/issues/104376>`__","" +"`LWG3554 <https://wg21.link/LWG3554>`__","``chrono::parse`` needs ``const charT*`` and ``basic_string_view<charT>`` overloads","2021-10 (Virtual)","","","`#104377 <https://github.com/llvm/llvm-project/issues/104377>`__","" +"`LWG3557 <https://wg21.link/LWG3557>`__","The ``static_cast`` expression in ``convertible_to`` has the wrong operand","2021-10 (Virtual)","|Complete|","14","`#104378 <https://github.com/llvm/llvm-project/issues/104378>`__","" +"`LWG3559 <https://wg21.link/LWG3559>`__","Semantic requirements of ``sized_range`` is circular","2021-10 (Virtual)","|Nothing To Do|","","`#104379 <https://github.com/llvm/llvm-project/issues/104379>`__","" +"`LWG3560 <https://wg21.link/LWG3560>`__","``ranges::equal`` and ``ranges::is_permutation`` should short-circuit for ``sized_ranges``","2021-10 (Virtual)","","","`#104380 <https://github.com/llvm/llvm-project/issues/104380>`__","" +"`LWG3561 <https://wg21.link/LWG3561>`__","Issue with internal counter in ``discard_block_engine``","2021-10 (Virtual)","","","`#104381 <https://github.com/llvm/llvm-project/issues/104381>`__","" +"`LWG3563 <https://wg21.link/LWG3563>`__","``keys_view`` example is broken","2021-10 (Virtual)","","","`#104382 <https://github.com/llvm/llvm-project/issues/104382>`__","" +"`LWG3566 <https://wg21.link/LWG3566>`__","Constraint recursion for ``operator<=>(optional<T>, U)``","2021-10 (Virtual)","|Complete|","17","`#104383 <https://github.com/llvm/llvm-project/issues/104383>`__","" +"`LWG3567 <https://wg21.link/LWG3567>`__","Formatting move-only iterators take two","2021-10 (Virtual)","|Complete|","16","`#104384 <https://github.com/llvm/llvm-project/issues/104384>`__","" +"`LWG3568 <https://wg21.link/LWG3568>`__","``basic_istream_view`` needs to initialize ``value_``","2021-10 (Virtual)","|Complete|","16","`#104385 <https://github.com/llvm/llvm-project/issues/104385>`__","" +"`LWG3570 <https://wg21.link/LWG3570>`__","``basic_osyncstream::emit`` should be an unformatted output function","2021-10 (Virtual)","|Complete|","18","`#104386 <https://github.com/llvm/llvm-project/issues/104386>`__","" +"`LWG3571 <https://wg21.link/LWG3571>`__","``flush_emit`` should set ``badbit`` if the ``emit`` call fails","2021-10 (Virtual)","","","`#104387 <https://github.com/llvm/llvm-project/issues/104387>`__","" +"`LWG3572 <https://wg21.link/LWG3572>`__","``copyable-box`` should be fully ``constexpr``","2021-10 (Virtual)","|Complete|","14","`#104388 <https://github.com/llvm/llvm-project/issues/104388>`__","" +"`LWG3573 <https://wg21.link/LWG3573>`__","Missing Throws element for ``basic_string_view(It begin, End end)``","2021-10 (Virtual)","|Complete|","14","`#104389 <https://github.com/llvm/llvm-project/issues/104389>`__","" +"`LWG3574 <https://wg21.link/LWG3574>`__","``common_iterator`` should be completely ``constexpr``-able","2021-10 (Virtual)","|Complete|","14","`#104931 <https://github.com/llvm/llvm-project/issues/104931>`__","" +"`LWG3580 <https://wg21.link/LWG3580>`__","``iota_view``'s ``iterator``'s binary ``operator+`` should be improved","2021-10 (Virtual)","|Complete|","14","`#104932 <https://github.com/llvm/llvm-project/issues/104932>`__","" +"`LWG3581 <https://wg21.link/LWG3581>`__","The range constructor makes ``basic_string_view`` not trivially move constructible","2021-10 (Virtual)","|Complete|","14","`#104933 <https://github.com/llvm/llvm-project/issues/104933>`__","" +"`LWG3585 <https://wg21.link/LWG3585>`__","``variant`` converting assignment with immovable alternative","2021-10 (Virtual)","","","`#104934 <https://github.com/llvm/llvm-project/issues/104934>`__","" +"`LWG3589 <https://wg21.link/LWG3589>`__","The ``const`` lvalue reference overload of ``get`` for ``subrange`` does not constrain ``I`` to be ``copyable`` when ``N == 0``","2021-10 (Virtual)","|Complete|","14","`#104935 <https://github.com/llvm/llvm-project/issues/104935>`__","" +"`LWG3590 <https://wg21.link/LWG3590>`__","``split_view::base() const &`` is overconstrained","2021-10 (Virtual)","|Complete|","16","`#104936 <https://github.com/llvm/llvm-project/issues/104936>`__","" +"`LWG3591 <https://wg21.link/LWG3591>`__","``lazy_split_view<input_view>::inner-iterator::base() &&`` invalidates outer iterators","2021-10 (Virtual)","","","`#104937 <https://github.com/llvm/llvm-project/issues/104937>`__","" +"`LWG3592 <https://wg21.link/LWG3592>`__","``lazy_split_view`` needs to check the simpleness of Pattern","2021-10 (Virtual)","","","`#104938 <https://github.com/llvm/llvm-project/issues/104938>`__","" +"`LWG3593 <https://wg21.link/LWG3593>`__","Several iterators' ``base() const &`` and ``lazy_split_view::outer-iterator::value_type::end()`` missing ``noexcept``","2021-10 (Virtual)","","","`#104939 <https://github.com/llvm/llvm-project/issues/104939>`__","" +"`LWG3595 <https://wg21.link/LWG3595>`__","Exposition-only classes proxy and postfix-proxy for ``common_iterator`` should be fully ``constexpr``","2021-10 (Virtual)","|Complete|","14","`#104940 <https://github.com/llvm/llvm-project/issues/104940>`__","" "","","","","","" -"`LWG3088 <https://wg21.link/LWG3088>`__","``forward_list::merge`` behaviour unclear when passed ``*this``","2022-02 (Virtual)","|Complete|","Yes","" -"`LWG3471 <https://wg21.link/LWG3471>`__","``polymorphic_allocator::allocate`` does not satisfy ``Cpp17Allocator`` requirements","2022-02 (Virtual)","","","" -"`LWG3525 <https://wg21.link/LWG3525>`__","``uses_allocator_construction_args`` fails to handle types convertible to ``pair``","2022-02 (Virtual)","","","" -"`LWG3598 <https://wg21.link/LWG3598>`__","``system_category().default_error_condition(0)`` is underspecified","2022-02 (Virtual)","","","" -"`LWG3601 <https://wg21.link/LWG3601>`__","common_iterator's postfix-proxy needs ``indirectly_readable`` ","2022-02 (Virtual)","","","" -"`LWG3607 <https://wg21.link/LWG3607>`__","``contiguous_iterator`` should not be allowed to have custom ``iter_move`` and ``iter_swap`` behavior","2022-02 (Virtual)","|Nothing To Do|","","" -"`LWG3610 <https://wg21.link/LWG3610>`__","``iota_view::size`` sometimes rejects integer-class types","2022-02 (Virtual)","","","" -"`LWG3612 <https://wg21.link/LWG3612>`__","Inconsistent pointer alignment in ``std::format`` ","2022-02 (Virtual)","|Complete|","14","" -"`LWG3616 <https://wg21.link/LWG3616>`__","LWG 3498 seems to miss the non-member ``swap`` for ``basic_syncbuf`` ","2022-02 (Virtual)","|Complete|","18","" -"`LWG3618 <https://wg21.link/LWG3618>`__","Unnecessary ``iter_move`` for ``transform_view::iterator`` ","2022-02 (Virtual)","|Complete|","19","" -"`LWG3619 <https://wg21.link/LWG3619>`__","Specification of ``vformat_to`` contains ill-formed ``formatted_size`` calls","2022-02 (Virtual)","|Nothing To Do|","","" -"`LWG3621 <https://wg21.link/LWG3621>`__","Remove feature-test macro ``__cpp_lib_monadic_optional`` ","2022-02 (Virtual)","|Complete|","15","" -"`LWG3632 <https://wg21.link/LWG3632>`__","``unique_ptr`` ""Mandates: This constructor is not selected by class template argument deduction""","2022-02 (Virtual)","|Nothing To Do|","","" -"`LWG3643 <https://wg21.link/LWG3643>`__","Missing ``constexpr`` in ``std::counted_iterator`` ","2022-02 (Virtual)","|Complete|","19","" -"`LWG3648 <https://wg21.link/LWG3648>`__","``format`` should not print ``bool`` with ``'c'`` ","2022-02 (Virtual)","|Complete|","15","" -"`LWG3649 <https://wg21.link/LWG3649>`__","[fund.ts.v2] Reinstate and bump ``__cpp_lib_experimental_memory_resource`` feature test macro","2022-02 (Virtual)","","","" -"`LWG3650 <https://wg21.link/LWG3650>`__","Are ``std::basic_string`` 's ``iterator`` and ``const_iterator`` constexpr iterators?","2022-02 (Virtual)","|Nothing To Do|","","" -"`LWG3654 <https://wg21.link/LWG3654>`__","``basic_format_context::arg(size_t)`` should be ``noexcept`` ","2022-02 (Virtual)","|Complete|","15","" -"`LWG3657 <https://wg21.link/LWG3657>`__","``std::hash<std::filesystem::path>`` is not enabled","2022-02 (Virtual)","|Complete|","17","" -"`LWG3660 <https://wg21.link/LWG3660>`__","``iterator_traits<common_iterator>::pointer`` should conform to §[iterator.traits]","2022-02 (Virtual)","|Complete|","14","" -"`LWG3661 <https://wg21.link/LWG3661>`__","``constinit atomic<shared_ptr<T>> a(nullptr);`` should work","2022-02 (Virtual)","","","" +"`LWG3088 <https://wg21.link/LWG3088>`__","``forward_list::merge`` behaviour unclear when passed ``*this``","2022-02 (Virtual)","|Complete|","Yes","`#104942 <https://github.com/llvm/llvm-project/issues/104942>`__","" +"`LWG3471 <https://wg21.link/LWG3471>`__","``polymorphic_allocator::allocate`` does not satisfy ``Cpp17Allocator`` requirements","2022-02 (Virtual)","","","`#104943 <https://github.com/llvm/llvm-project/issues/104943>`__","" +"`LWG3525 <https://wg21.link/LWG3525>`__","``uses_allocator_construction_args`` fails to handle types convertible to ``pair``","2022-02 (Virtual)","","","`#104944 <https://github.com/llvm/llvm-project/issues/104944>`__","" +"`LWG3598 <https://wg21.link/LWG3598>`__","``system_category().default_error_condition(0)`` is underspecified","2022-02 (Virtual)","","","`#104945 <https://github.com/llvm/llvm-project/issues/104945>`__","" +"`LWG3601 <https://wg21.link/LWG3601>`__","common_iterator's postfix-proxy needs ``indirectly_readable`` ","2022-02 (Virtual)","","","`#104946 <https://github.com/llvm/llvm-project/issues/104946>`__","" +"`LWG3607 <https://wg21.link/LWG3607>`__","``contiguous_iterator`` should not be allowed to have custom ``iter_move`` and ``iter_swap`` behavior","2022-02 (Virtual)","|Nothing To Do|","","`#104947 <https://github.com/llvm/llvm-project/issues/104947>`__","" +"`LWG3610 <https://wg21.link/LWG3610>`__","``iota_view::size`` sometimes rejects integer-class types","2022-02 (Virtual)","","","`#104948 <https://github.com/llvm/llvm-project/issues/104948>`__","" +"`LWG3612 <https://wg21.link/LWG3612>`__","Inconsistent pointer alignment in ``std::format`` ","2022-02 (Virtual)","|Complete|","14","`#104949 <https://github.com/llvm/llvm-project/issues/104949>`__","" +"`LWG3616 <https://wg21.link/LWG3616>`__","LWG 3498 seems to miss the non-member ``swap`` for ``basic_syncbuf`` ","2022-02 (Virtual)","|Complete|","18","`#104950 <https://github.com/llvm/llvm-project/issues/104950>`__","" +"`LWG3618 <https://wg21.link/LWG3618>`__","Unnecessary ``iter_move`` for ``transform_view::iterator`` ","2022-02 (Virtual)","|Complete|","19","`#104951 <https://github.com/llvm/llvm-project/issues/104951>`__","" +"`LWG3619 <https://wg21.link/LWG3619>`__","Specification of ``vformat_to`` contains ill-formed ``formatted_size`` calls","2022-02 (Virtual)","|Nothing To Do|","","`#104952 <https://github.com/llvm/llvm-project/issues/104952>`__","" +"`LWG3621 <https://wg21.link/LWG3621>`__","Remove feature-test macro ``__cpp_lib_monadic_optional`` ","2022-02 (Virtual)","|Complete|","15","`#104953 <https://github.com/llvm/llvm-project/issues/104953>`__","" +"`LWG3632 <https://wg21.link/LWG3632>`__","``unique_ptr`` ""Mandates: This constructor is not selected by class template argument deduction""","2022-02 (Virtual)","|Nothing To Do|","","`#104954 <https://github.com/llvm/llvm-project/issues/104954>`__","" +"`LWG3643 <https://wg21.link/LWG3643>`__","Missing ``constexpr`` in ``std::counted_iterator`` ","2022-02 (Virtual)","|Complete|","19","`#104955 <https://github.com/llvm/llvm-project/issues/104955>`__","" +"`LWG3648 <https://wg21.link/LWG3648>`__","``format`` should not print ``bool`` with ``'c'`` ","2022-02 (Virtual)","|Complete|","15","`#104956 <https://github.com/llvm/llvm-project/issues/104956>`__","" +"`LWG3649 <https://wg21.link/LWG3649>`__","[fund.ts.v2] Reinstate and bump ``__cpp_lib_experimental_memory_resource`` feature test macro","2022-02 (Virtual)","","","`#104957 <https://github.com/llvm/llvm-project/issues/104957>`__","" +"`LWG3650 <https://wg21.link/LWG3650>`__","Are ``std::basic_string`` 's ``iterator`` and ``const_iterator`` constexpr iterators?","2022-02 (Virtual)","|Nothing To Do|","","`#104958 <https://github.com/llvm/llvm-project/issues/104958>`__","" +"`LWG3654 <https://wg21.link/LWG3654>`__","``basic_format_context::arg(size_t)`` should be ``noexcept`` ","2022-02 (Virtual)","|Complete|","15","`#104959 <https://github.com/llvm/llvm-project/issues/104959>`__","" +"`LWG3657 <https://wg21.link/LWG3657>`__","``std::hash<std::filesystem::path>`` is not enabled","2022-02 (Virtual)","|Complete|","17","`#104960 <https://github.com/llvm/llvm-project/issues/104960>`__","" +"`LWG3660 <https://wg21.link/LWG3660>`__","``iterator_traits<common_iterator>::pointer`` should conform to §[iterator.traits]","2022-02 (Virtual)","|Complete|","14","`#104961 <https://github.com/llvm/llvm-project/issues/104961>`__","" +"`LWG3661 <https://wg21.link/LWG3661>`__","``constinit atomic<shared_ptr<T>> a(nullptr);`` should work","2022-02 (Virtual)","","","`#104962 <https://github.com/llvm/llvm-project/issues/104962>`__","" "","","","","","" -"`LWG3564 <https://wg21.link/LWG3564>`__","``transform_view::iterator<true>::value_type`` and ``iterator_category`` should use ``const F&``","2022-07 (Virtual)","|Complete|","20","" -"`LWG3617 <https://wg21.link/LWG3617>`__","``function``/``packaged_task`` deduction guides and deducing ``this``","2022-07 (Virtual)","","","" -"`LWG3656 <https://wg21.link/LWG3656>`__","Inconsistent bit operations returning a count","2022-07 (Virtual)","|Complete|","15","" -"`LWG3659 <https://wg21.link/LWG3659>`__","Consider ``ATOMIC_FLAG_INIT`` undeprecation","2022-07 (Virtual)","|Complete|","15","" -"`LWG3670 <https://wg21.link/LWG3670>`__","``Cpp17InputIterators`` don't have integer-class difference types","2022-07 (Virtual)","","","" -"`LWG3671 <https://wg21.link/LWG3671>`__","``atomic_fetch_xor`` missing from ``stdatomic.h``","2022-07 (Virtual)","|Complete|","20","" -"`LWG3672 <https://wg21.link/LWG3672>`__","``common_iterator::operator->()`` should return by value","2022-07 (Virtual)","|Complete|","19","" -"`LWG3683 <https://wg21.link/LWG3683>`__","``operator==`` for ``polymorphic_allocator`` cannot deduce template argument in common cases","2022-07 (Virtual)","|Complete|","20","" -"`LWG3687 <https://wg21.link/LWG3687>`__","``expected<cv void, E>`` move constructor should move","2022-07 (Virtual)","|Complete|","16","" -"`LWG3692 <https://wg21.link/LWG3692>`__","``zip_view::iterator``'s ``operator<=>`` is overconstrained","2022-07 (Virtual)","|Complete|","20","" -"`LWG3701 <https://wg21.link/LWG3701>`__","Make ``formatter<remove_cvref_t<const charT[N]>, charT>`` requirement explicit","2022-07 (Virtual)","|Complete|","15","" -"`LWG3702 <https://wg21.link/LWG3702>`__","Should ``zip_transform_view::iterator`` remove ``operator<``","2022-07 (Virtual)","|Complete|","22","" -"`LWG3703 <https://wg21.link/LWG3703>`__","Missing requirements for ``expected<T, E>`` requires ``is_void<T>``","2022-07 (Virtual)","|Complete|","16","" -"`LWG3704 <https://wg21.link/LWG3704>`__","LWG 2059 added overloads that might be ill-formed for sets","2022-07 (Virtual)","","","" -"`LWG3705 <https://wg21.link/LWG3705>`__","Hashability shouldn't depend on basic_string's allocator","2022-07 (Virtual)","|Complete|","16","" -"`LWG3707 <https://wg21.link/LWG3707>`__","chunk_view::outer-iterator::value_type::size should return unsigned type","2022-07 (Virtual)","","","" -"`LWG3708 <https://wg21.link/LWG3708>`__","``take_while_view::sentinel``'s conversion constructor should move","2022-07 (Virtual)","|Complete|","16","" -"`LWG3709 <https://wg21.link/LWG3709>`__","LWG-3703 was underly ambitious","2022-07 (Virtual)","","","" -"`LWG3710 <https://wg21.link/LWG3710>`__","The ``end`` of ``chunk_view`` for input ranges can be ``const``","2022-07 (Virtual)","","","" -"`LWG3711 <https://wg21.link/LWG3711>`__","Missing preconditions for slide_view constructor","2022-07 (Virtual)","","","" -"`LWG3712 <https://wg21.link/LWG3712>`__","``chunk_view`` and ``slide_view`` should not be ``default_initializable``","2022-07 (Virtual)","","","" -"`LWG3713 <https://wg21.link/LWG3713>`__","Sorted with respect to comparator (only)","2022-07 (Virtual)","|Nothing To Do|","","" -"`LWG3715 <https://wg21.link/LWG3715>`__","``view_interface::empty`` is overconstrained","2022-07 (Virtual)","|Complete|","19","" -"`LWG3719 <https://wg21.link/LWG3719>`__","Directory iterators should be usable with default sentinel","2022-07 (Virtual)","|Complete|","17","" -"`LWG3721 <https://wg21.link/LWG3721>`__","Allow an ``arg-id`` with a value of zero for ``width`` in ``std-format-spec``","2022-07 (Virtual)","|Complete|","16","" -"`LWG3724 <https://wg21.link/LWG3724>`__","``decay-copy`` should be constrained","2022-07 (Virtual)","|Complete|","14","" +"`LWG3564 <https://wg21.link/LWG3564>`__","``transform_view::iterator<true>::value_type`` and ``iterator_category`` should use ``const F&``","2022-07 (Virtual)","|Complete|","20","`#104963 <https://github.com/llvm/llvm-project/issues/104963>`__","" +"`LWG3617 <https://wg21.link/LWG3617>`__","``function``/``packaged_task`` deduction guides and deducing ``this``","2022-07 (Virtual)","","","`#104965 <https://github.com/llvm/llvm-project/issues/104965>`__","" +"`LWG3656 <https://wg21.link/LWG3656>`__","Inconsistent bit operations returning a count","2022-07 (Virtual)","|Complete|","15","`#104966 <https://github.com/llvm/llvm-project/issues/104966>`__","" +"`LWG3659 <https://wg21.link/LWG3659>`__","Consider ``ATOMIC_FLAG_INIT`` undeprecation","2022-07 (Virtual)","|Complete|","15","`#104968 <https://github.com/llvm/llvm-project/issues/104968>`__","" +"`LWG3670 <https://wg21.link/LWG3670>`__","``Cpp17InputIterators`` don't have integer-class difference types","2022-07 (Virtual)","","","`#104969 <https://github.com/llvm/llvm-project/issues/104969>`__","" +"`LWG3671 <https://wg21.link/LWG3671>`__","``atomic_fetch_xor`` missing from ``stdatomic.h``","2022-07 (Virtual)","|Complete|","20","`#104970 <https://github.com/llvm/llvm-project/issues/104970>`__","" +"`LWG3672 <https://wg21.link/LWG3672>`__","``common_iterator::operator->()`` should return by value","2022-07 (Virtual)","|Complete|","19","`#104971 <https://github.com/llvm/llvm-project/issues/104971>`__","" +"`LWG3683 <https://wg21.link/LWG3683>`__","``operator==`` for ``polymorphic_allocator`` cannot deduce template argument in common cases","2022-07 (Virtual)","|Complete|","20","`#104972 <https://github.com/llvm/llvm-project/issues/104972>`__","" +"`LWG3687 <https://wg21.link/LWG3687>`__","``expected<cv void, E>`` move constructor should move","2022-07 (Virtual)","|Complete|","16","`#104973 <https://github.com/llvm/llvm-project/issues/104973>`__","" +"`LWG3692 <https://wg21.link/LWG3692>`__","``zip_view::iterator``'s ``operator<=>`` is overconstrained","2022-07 (Virtual)","|Complete|","20","`#104975 <https://github.com/llvm/llvm-project/issues/104975>`__","" +"`LWG3701 <https://wg21.link/LWG3701>`__","Make ``formatter<remove_cvref_t<const charT[N]>, charT>`` requirement explicit","2022-07 (Virtual)","|Complete|","15","`#104976 <https://github.com/llvm/llvm-project/issues/104976>`__","" +"`LWG3702 <https://wg21.link/LWG3702>`__","Should ``zip_transform_view::iterator`` remove ``operator<``","2022-07 (Virtual)","|Complete|","22","`#104977 <https://github.com/llvm/llvm-project/issues/104977>`__","" +"`LWG3703 <https://wg21.link/LWG3703>`__","Missing requirements for ``expected<T, E>`` requires ``is_void<T>``","2022-07 (Virtual)","|Complete|","16","`#104978 <https://github.com/llvm/llvm-project/issues/104978>`__","" +"`LWG3704 <https://wg21.link/LWG3704>`__","LWG 2059 added overloads that might be ill-formed for sets","2022-07 (Virtual)","","","`#104979 <https://github.com/llvm/llvm-project/issues/104979>`__","" +"`LWG3705 <https://wg21.link/LWG3705>`__","Hashability shouldn't depend on basic_string's allocator","2022-07 (Virtual)","|Complete|","16","`#104980 <https://github.com/llvm/llvm-project/issues/104980>`__","" +"`LWG3707 <https://wg21.link/LWG3707>`__","chunk_view::outer-iterator::value_type::size should return unsigned type","2022-07 (Virtual)","","","`#104981 <https://github.com/llvm/llvm-project/issues/104981>`__","" +"`LWG3708 <https://wg21.link/LWG3708>`__","``take_while_view::sentinel``'s conversion constructor should move","2022-07 (Virtual)","|Complete|","16","`#104982 <https://github.com/llvm/llvm-project/issues/104982>`__","" +"`LWG3709 <https://wg21.link/LWG3709>`__","LWG-3703 was underly ambitious","2022-07 (Virtual)","","","`#104983 <https://github.com/llvm/llvm-project/issues/104983>`__","" +"`LWG3710 <https://wg21.link/LWG3710>`__","The ``end`` of ``chunk_view`` for input ranges can be ``const``","2022-07 (Virtual)","","","`#104985 <https://github.com/llvm/llvm-project/issues/104985>`__","" +"`LWG3711 <https://wg21.link/LWG3711>`__","Missing preconditions for slide_view constructor","2022-07 (Virtual)","","","`#104987 <https://github.com/llvm/llvm-project/issues/104987>`__","" +"`LWG3712 <https://wg21.link/LWG3712>`__","``chunk_view`` and ``slide_view`` should not be ``default_initializable``","2022-07 (Virtual)","","","`#104988 <https://github.com/llvm/llvm-project/issues/104988>`__","" +"`LWG3713 <https://wg21.link/LWG3713>`__","Sorted with respect to comparator (only)","2022-07 (Virtual)","|Nothing To Do|","","`#104989 <https://github.com/llvm/llvm-project/issues/104989>`__","" +"`LWG3715 <https://wg21.link/LWG3715>`__","``view_interface::empty`` is overconstrained","2022-07 (Virtual)","|Complete|","19","`#104990 <https://github.com/llvm/llvm-project/issues/104990>`__","" +"`LWG3719 <https://wg21.link/LWG3719>`__","Directory iterators should be usable with default sentinel","2022-07 (Virtual)","|Complete|","17","`#104992 <https://github.com/llvm/llvm-project/issues/104992>`__","" +"`LWG3721 <https://wg21.link/LWG3721>`__","Allow an ``arg-id`` with a value of zero for ``width`` in ``std-format-spec``","2022-07 (Virtual)","|Complete|","16","`#104993 <https://github.com/llvm/llvm-project/issues/104993>`__","" +"`LWG3724 <https://wg21.link/LWG3724>`__","``decay-copy`` should be constrained","2022-07 (Virtual)","|Complete|","14","`#104994 <https://github.com/llvm/llvm-project/issues/104994>`__","" "","","","","","" -"`LWG3028 <https://wg21.link/LWG3028>`__","Container requirements tables should distinguish ``const`` and non-``const`` variables","2022-11 (Kona)","","","" -"`LWG3118 <https://wg21.link/LWG3118>`__","``fpos`` equality comparison unspecified","2022-11 (Kona)","","","" -"`LWG3177 <https://wg21.link/LWG3177>`__","Limit permission to specialize variable templates to program-defined types","2022-11 (Kona)","|Nothing To Do|","","" -"`LWG3515 <https://wg21.link/LWG3515>`__","§[stacktrace.basic.nonmem]: ``operator<<`` should be less templatized","2022-11 (Kona)","","","" -"`LWG3545 <https://wg21.link/LWG3545>`__","``std::pointer_traits`` should be SFINAE-friendly","2022-11 (Kona)","|Complete|","18","" -"`LWG3569 <https://wg21.link/LWG3569>`__","``join_view`` fails to support ranges of ranges with non-default_initializable iterators","2022-11 (Kona)","","","" -"`LWG3594 <https://wg21.link/LWG3594>`__","``inout_ptr`` — inconsistent ``release()`` in destructor","2022-11 (Kona)","|Complete|","19","" -"`LWG3597 <https://wg21.link/LWG3597>`__","Unsigned integer types don't model advanceable","2022-11 (Kona)","","","" -"`LWG3600 <https://wg21.link/LWG3600>`__","Making ``istream_iterator`` copy constructor trivial is an ABI break","2022-11 (Kona)","|Complete|","","" -"`LWG3629 <https://wg21.link/LWG3629>`__","``make_error_code`` and ``make_error_condition`` are customization points","2022-11 (Kona)","|Complete|","16","" -"`LWG3636 <https://wg21.link/LWG3636>`__","``formatter<T>::format`` should be ``const``-qualified","2022-11 (Kona)","|Complete|","16","" -"`LWG3646 <https://wg21.link/LWG3646>`__","``std::ranges::view_interface::size`` returns a signed type","2022-11 (Kona)","|Complete|","16","" -"`LWG3677 <https://wg21.link/LWG3677>`__","Is a cv-qualified ``pair`` specially handled in uses-allocator construction?","2022-11 (Kona)","|Complete|","18","" -"`LWG3717 <https://wg21.link/LWG3717>`__","``common_view::end`` should improve ``random_access_range`` case","2022-11 (Kona)","","","" -"`LWG3732 <https://wg21.link/LWG3732>`__","``prepend_range`` and ``append_range`` can't be amortized constant time","2022-11 (Kona)","|Nothing To Do|","","" -"`LWG3736 <https://wg21.link/LWG3736>`__","``move_iterator`` missing ``disable_sized_sentinel_for`` specialization","2022-11 (Kona)","|Complete|","19","" -"`LWG3737 <https://wg21.link/LWG3737>`__","``take_view::sentinel`` should provide ``operator-``","2022-11 (Kona)","","","" -"`LWG3738 <https://wg21.link/LWG3738>`__","Missing preconditions for ``take_view`` constructor","2022-11 (Kona)","|Complete|","16","" -"`LWG3743 <https://wg21.link/LWG3743>`__","``ranges::to``'s reserve may be ill-formed","2022-11 (Kona)","","","" -"`LWG3745 <https://wg21.link/LWG3745>`__","``std::atomic_wait`` and its friends lack ``noexcept``","2022-11 (Kona)","|Complete|","16","" -"`LWG3746 <https://wg21.link/LWG3746>`__","``optional``'s spaceship with ``U`` with a type derived from optional causes infinite constraint meta-recursion","2022-11 (Kona)","|Complete|","17","" -"`LWG3747 <https://wg21.link/LWG3747>`__","``ranges::uninitialized_copy_n``, ``ranges::uninitialized_move_n``, and ``ranges::destroy_n`` should use ``std::move``","2022-11 (Kona)","","","" -"`LWG3750 <https://wg21.link/LWG3750>`__","Too many papers bump ``__cpp_lib_format``","2022-11 (Kona)","|Partial|","","Only ``__cpp_lib_format_ranges`` is fully implemented" -"`LWG3751 <https://wg21.link/LWG3751>`__","Missing feature macro for ``flat_set``","2022-11 (Kona)","|Complete|","21","" -"`LWG3753 <https://wg21.link/LWG3753>`__","Clarify entity vs. freestanding entity","2022-11 (Kona)","","","" -"`LWG3754 <https://wg21.link/LWG3754>`__","Class template expected synopsis contains declarations that do not match the detailed description","2022-11 (Kona)","|Nothing To Do|","","" -"`LWG3755 <https://wg21.link/LWG3755>`__","``tuple-for-each`` can call ``user-defined`` ``operator,``","2022-11 (Kona)","|Complete|","17","" -"`LWG3757 <https://wg21.link/LWG3757>`__","What's the effect of ``std::forward_like<void>(x)``?","2022-11 (Kona)","|Complete|","","" -"`LWG3759 <https://wg21.link/LWG3759>`__","``ranges::rotate_copy`` should use ``std::move``","2022-11 (Kona)","|Complete|","15","" -"`LWG3760 <https://wg21.link/LWG3760>`__","``cartesian_product_view::iterator``'s ``parent_`` is never valid","2022-11 (Kona)","","","" -"`LWG3761 <https://wg21.link/LWG3761>`__","``cartesian_product_view::iterator::operator-`` should pass by reference","2022-11 (Kona)","","","" -"`LWG3762 <https://wg21.link/LWG3762>`__","``generator::iterator::operator==`` should pass by reference","2022-11 (Kona)","","","" -"`LWG3764 <https://wg21.link/LWG3764>`__","``reference_wrapper::operator()`` should propagate noexcept","2022-11 (Kona)","|Complete|","17","" -"`LWG3765 <https://wg21.link/LWG3765>`__","``const_sentinel`` should be constrained","2022-11 (Kona)","","","" -"`LWG3766 <https://wg21.link/LWG3766>`__","``view_interface::cbegin`` is underconstrained","2022-11 (Kona)","","","" -"`LWG3770 <https://wg21.link/LWG3770>`__","``const_sentinel_t`` is missing","2022-11 (Kona)","","","" -"`LWG3773 <https://wg21.link/LWG3773>`__","``views::zip_transform`` still requires ``F`` to be ``copy_constructible`` when empty pack","2022-11 (Kona)","|Complete|","22","" -"`LWG3774 <https://wg21.link/LWG3774>`__","``<flat_set>`` should include ``<compare>``","2022-11 (Kona)","|Complete|","21","" -"`LWG3775 <https://wg21.link/LWG3775>`__","Broken dependencies in the ``Cpp17Allocator`` requirements","2022-11 (Kona)","","","" -"`LWG3778 <https://wg21.link/LWG3778>`__","``vector<bool>`` missing exception specifications","2022-11 (Kona)","|Complete|","3.7","" -"`LWG3781 <https://wg21.link/LWG3781>`__","The exposition-only alias templates ``cont-key-type`` and ``cont-mapped-type`` should be removed","2022-11 (Kona)","|Nothing To Do|","","" -"`LWG3782 <https://wg21.link/LWG3782>`__","Should ``<math.h>`` declare ``::lerp``?","2022-11 (Kona)","|Complete|","17","" -"`LWG3784 <https://wg21.link/LWG3784>`__","std.compat should not provide ``::byte`` and its friends","2022-11 (Kona)","|Complete|","19","" -"`LWG3785 <https://wg21.link/LWG3785>`__","``ranges::to`` is over-constrained on the destination type being a range","2022-11 (Kona)","","","" -"`LWG3788 <https://wg21.link/LWG3788>`__","``jthread::operator=(jthread&&)`` postconditions are unimplementable under self-assignment","2022-11 (Kona)","|Complete|","18","" -"`LWG3792 <https://wg21.link/LWG3792>`__","``__cpp_lib_constexpr_algorithms`` should also be defined in ``<utility>``","2022-11 (Kona)","|Complete|","16","" -"`LWG3795 <https://wg21.link/LWG3795>`__","Self-move-assignment of ``std::future`` and ``std::shared_future`` have unimplementable postconditions","2022-11 (Kona)","","","" -"`LWG3796 <https://wg21.link/LWG3796>`__","``movable-box`` as member should use ``default-initialization`` instead of ``copy-initialization``","2022-11 (Kona)","","","" -"`LWG3798 <https://wg21.link/LWG3798>`__","Rvalue reference and ``iterator_category``","2022-11 (Kona)","|Partial|","","``adjacent_transform_view`` hasn't been done yet since this type isn't implemented yet" -"`LWG3801 <https://wg21.link/LWG3801>`__","``cartesian_product_view::iterator::distance-from`` ignores the size of last underlying range","2022-11 (Kona)","","","" -"`LWG3814 <https://wg21.link/LWG3814>`__","Add freestanding items requested by NB comments","2022-11 (Kona)","","","" -"`LWG3816 <https://wg21.link/LWG3816>`__","``flat_map`` and ``flat_multimap`` should impose sequence container requirements","2022-11 (Kona)","","","" -"`LWG3817 <https://wg21.link/LWG3817>`__","Missing preconditions on ``forward_list`` modifiers","2022-11 (Kona)","","","" -"`LWG3818 <https://wg21.link/LWG3818>`__","Exposition-only concepts are not described in library intro","2022-11 (Kona)","|Nothing To Do|","","" -"`LWG3822 <https://wg21.link/LWG3822>`__","Avoiding normalization in ``filesystem::weakly_canonical``","2022-11 (Kona)","","","" -"`LWG3823 <https://wg21.link/LWG3823>`__","Unnecessary precondition for ``is_aggregate``","2022-11 (Kona)","|Nothing To Do|","","" -"`LWG3824 <https://wg21.link/LWG3824>`__","Number of ``bind`` placeholders is underspecified","2022-11 (Kona)","|Nothing To Do|","","" -"`LWG3826 <https://wg21.link/LWG3826>`__","Redundant specification [for overload of yield_value]","2022-11 (Kona)","|Nothing To Do|","","" +"`LWG3028 <https://wg21.link/LWG3028>`__","Container requirements tables should distinguish ``const`` and non-``const`` variables","2022-11 (Kona)","","","`#104995 <https://github.com/llvm/llvm-project/issues/104995>`__","" +"`LWG3118 <https://wg21.link/LWG3118>`__","``fpos`` equality comparison unspecified","2022-11 (Kona)","","","`#104996 <https://github.com/llvm/llvm-project/issues/104996>`__","" +"`LWG3177 <https://wg21.link/LWG3177>`__","Limit permission to specialize variable templates to program-defined types","2022-11 (Kona)","|Nothing To Do|","","`#104997 <https://github.com/llvm/llvm-project/issues/104997>`__","" +"`LWG3515 <https://wg21.link/LWG3515>`__","§[stacktrace.basic.nonmem]: ``operator<<`` should be less templatized","2022-11 (Kona)","","","`#104998 <https://github.com/llvm/llvm-project/issues/104998>`__","" +"`LWG3545 <https://wg21.link/LWG3545>`__","``std::pointer_traits`` should be SFINAE-friendly","2022-11 (Kona)","|Complete|","18","`#104999 <https://github.com/llvm/llvm-project/issues/104999>`__","" +"`LWG3569 <https://wg21.link/LWG3569>`__","``join_view`` fails to support ranges of ranges with non-default_initializable iterators","2022-11 (Kona)","","","`#105000 <https://github.com/llvm/llvm-project/issues/105000>`__","" +"`LWG3594 <https://wg21.link/LWG3594>`__","``inout_ptr`` — inconsistent ``release()`` in destructor","2022-11 (Kona)","|Complete|","19","`#105001 <https://github.com/llvm/llvm-project/issues/105001>`__","" +"`LWG3597 <https://wg21.link/LWG3597>`__","Unsigned integer types don't model advanceable","2022-11 (Kona)","","","`#105002 <https://github.com/llvm/llvm-project/issues/105002>`__","" +"`LWG3600 <https://wg21.link/LWG3600>`__","Making ``istream_iterator`` copy constructor trivial is an ABI break","2022-11 (Kona)","|Complete|","","`#105003 <https://github.com/llvm/llvm-project/issues/105003>`__","" +"`LWG3629 <https://wg21.link/LWG3629>`__","``make_error_code`` and ``make_error_condition`` are customization points","2022-11 (Kona)","|Complete|","16","`#105004 <https://github.com/llvm/llvm-project/issues/105004>`__","" +"`LWG3636 <https://wg21.link/LWG3636>`__","``formatter<T>::format`` should be ``const``-qualified","2022-11 (Kona)","|Complete|","16","`#105005 <https://github.com/llvm/llvm-project/issues/105005>`__","" +"`LWG3646 <https://wg21.link/LWG3646>`__","``std::ranges::view_interface::size`` returns a signed type","2022-11 (Kona)","|Complete|","16","`#105006 <https://github.com/llvm/llvm-project/issues/105006>`__","" +"`LWG3677 <https://wg21.link/LWG3677>`__","Is a cv-qualified ``pair`` specially handled in uses-allocator construction?","2022-11 (Kona)","|Complete|","18","`#105007 <https://github.com/llvm/llvm-project/issues/105007>`__","" +"`LWG3717 <https://wg21.link/LWG3717>`__","``common_view::end`` should improve ``random_access_range`` case","2022-11 (Kona)","","","`#105008 <https://github.com/llvm/llvm-project/issues/105008>`__","" +"`LWG3732 <https://wg21.link/LWG3732>`__","``prepend_range`` and ``append_range`` can't be amortized constant time","2022-11 (Kona)","|Nothing To Do|","","`#105011 <https://github.com/llvm/llvm-project/issues/105011>`__","" +"`LWG3736 <https://wg21.link/LWG3736>`__","``move_iterator`` missing ``disable_sized_sentinel_for`` specialization","2022-11 (Kona)","|Complete|","19","`#105012 <https://github.com/llvm/llvm-project/issues/105012>`__","" +"`LWG3737 <https://wg21.link/LWG3737>`__","``take_view::sentinel`` should provide ``operator-``","2022-11 (Kona)","","","`#105013 <https://github.com/llvm/llvm-project/issues/105013>`__","" +"`LWG3738 <https://wg21.link/LWG3738>`__","Missing preconditions for ``take_view`` constructor","2022-11 (Kona)","|Complete|","16","`#105014 <https://github.com/llvm/llvm-project/issues/105014>`__","" +"`LWG3743 <https://wg21.link/LWG3743>`__","``ranges::to``'s reserve may be ill-formed","2022-11 (Kona)","","","`#105015 <https://github.com/llvm/llvm-project/issues/105015>`__","" +"`LWG3745 <https://wg21.link/LWG3745>`__","``std::atomic_wait`` and its friends lack ``noexcept``","2022-11 (Kona)","|Complete|","16","`#105016 <https://github.com/llvm/llvm-project/issues/105016>`__","" +"`LWG3746 <https://wg21.link/LWG3746>`__","``optional``'s spaceship with ``U`` with a type derived from optional causes infinite constraint meta-recursion","2022-11 (Kona)","|Complete|","17","`#105017 <https://github.com/llvm/llvm-project/issues/105017>`__","" +"`LWG3747 <https://wg21.link/LWG3747>`__","``ranges::uninitialized_copy_n``, ``ranges::uninitialized_move_n``, and ``ranges::destroy_n`` should use ``std::move``","2022-11 (Kona)","","","`#105018 <https://github.com/llvm/llvm-project/issues/105018>`__","" +"`LWG3750 <https://wg21.link/LWG3750>`__","Too many papers bump ``__cpp_lib_format``","2022-11 (Kona)","|Partial|","","`#105020 <https://github.com/llvm/llvm-project/issues/105020>`__","Only ``__cpp_lib_format_ranges`` is fully implemented" +"`LWG3751 <https://wg21.link/LWG3751>`__","Missing feature macro for ``flat_set``","2022-11 (Kona)","|Complete|","21","`#105021 <https://github.com/llvm/llvm-project/issues/105021>`__","" +"`LWG3753 <https://wg21.link/LWG3753>`__","Clarify entity vs. freestanding entity","2022-11 (Kona)","","","`#105022 <https://github.com/llvm/llvm-project/issues/105022>`__","" +"`LWG3754 <https://wg21.link/LWG3754>`__","Class template expected synopsis contains declarations that do not match the detailed description","2022-11 (Kona)","|Nothing To Do|","","`#105023 <https://github.com/llvm/llvm-project/issues/105023>`__","" +"`LWG3755 <https://wg21.link/LWG3755>`__","``tuple-for-each`` can call ``user-defined`` ``operator,``","2022-11 (Kona)","|Complete|","17","`#105024 <https://github.com/llvm/llvm-project/issues/105024>`__","" +"`LWG3757 <https://wg21.link/LWG3757>`__","What's the effect of ``std::forward_like<void>(x)``?","2022-11 (Kona)","|Complete|","","`#105026 <https://github.com/llvm/llvm-project/issues/105026>`__","" +"`LWG3759 <https://wg21.link/LWG3759>`__","``ranges::rotate_copy`` should use ``std::move``","2022-11 (Kona)","|Complete|","15","`#105027 <https://github.com/llvm/llvm-project/issues/105027>`__","" +"`LWG3760 <https://wg21.link/LWG3760>`__","``cartesian_product_view::iterator``'s ``parent_`` is never valid","2022-11 (Kona)","","","`#105028 <https://github.com/llvm/llvm-project/issues/105028>`__","" +"`LWG3761 <https://wg21.link/LWG3761>`__","``cartesian_product_view::iterator::operator-`` should pass by reference","2022-11 (Kona)","","","`#105029 <https://github.com/llvm/llvm-project/issues/105029>`__","" +"`LWG3762 <https://wg21.link/LWG3762>`__","``generator::iterator::operator==`` should pass by reference","2022-11 (Kona)","","","`#105030 <https://github.com/llvm/llvm-project/issues/105030>`__","" +"`LWG3764 <https://wg21.link/LWG3764>`__","``reference_wrapper::operator()`` should propagate noexcept","2022-11 (Kona)","|Complete|","17","`#105031 <https://github.com/llvm/llvm-project/issues/105031>`__","" +"`LWG3765 <https://wg21.link/LWG3765>`__","``const_sentinel`` should be constrained","2022-11 (Kona)","","","`#105032 <https://github.com/llvm/llvm-project/issues/105032>`__","" +"`LWG3766 <https://wg21.link/LWG3766>`__","``view_interface::cbegin`` is underconstrained","2022-11 (Kona)","","","`#105033 <https://github.com/llvm/llvm-project/issues/105033>`__","" +"`LWG3770 <https://wg21.link/LWG3770>`__","``const_sentinel_t`` is missing","2022-11 (Kona)","","","`#105034 <https://github.com/llvm/llvm-project/issues/105034>`__","" +"`LWG3773 <https://wg21.link/LWG3773>`__","``views::zip_transform`` still requires ``F`` to be ``copy_constructible`` when empty pack","2022-11 (Kona)","|Complete|","22","`#105035 <https://github.com/llvm/llvm-project/issues/105035>`__","" +"`LWG3774 <https://wg21.link/LWG3774>`__","``<flat_set>`` should include ``<compare>``","2022-11 (Kona)","|Complete|","21","`#105036 <https://github.com/llvm/llvm-project/issues/105036>`__","" +"`LWG3775 <https://wg21.link/LWG3775>`__","Broken dependencies in the ``Cpp17Allocator`` requirements","2022-11 (Kona)","","","`#105038 <https://github.com/llvm/llvm-project/issues/105038>`__","" +"`LWG3778 <https://wg21.link/LWG3778>`__","``vector<bool>`` missing exception specifications","2022-11 (Kona)","|Complete|","3.7","`#105039 <https://github.com/llvm/llvm-project/issues/105039>`__","" +"`LWG3781 <https://wg21.link/LWG3781>`__","The exposition-only alias templates ``cont-key-type`` and ``cont-mapped-type`` should be removed","2022-11 (Kona)","|Nothing To Do|","","`#105040 <https://github.com/llvm/llvm-project/issues/105040>`__","" +"`LWG3782 <https://wg21.link/LWG3782>`__","Should ``<math.h>`` declare ``::lerp``?","2022-11 (Kona)","|Complete|","17","`#105041 <https://github.com/llvm/llvm-project/issues/105041>`__","" +"`LWG3784 <https://wg21.link/LWG3784>`__","std.compat should not provide ``::byte`` and its friends","2022-11 (Kona)","|Complete|","19","`#105042 <https://github.com/llvm/llvm-project/issues/105042>`__","" +"`LWG3785 <https://wg21.link/LWG3785>`__","``ranges::to`` is over-constrained on the destination type being a range","2022-11 (Kona)","","","`#105044 <https://github.com/llvm/llvm-project/issues/105044>`__","" +"`LWG3788 <https://wg21.link/LWG3788>`__","``jthread::operator=(jthread&&)`` postconditions are unimplementable under self-assignment","2022-11 (Kona)","|Complete|","18","`#105045 <https://github.com/llvm/llvm-project/issues/105045>`__","" +"`LWG3792 <https://wg21.link/LWG3792>`__","``__cpp_lib_constexpr_algorithms`` should also be defined in ``<utility>``","2022-11 (Kona)","|Complete|","16","`#105046 <https://github.com/llvm/llvm-project/issues/105046>`__","" +"`LWG3795 <https://wg21.link/LWG3795>`__","Self-move-assignment of ``std::future`` and ``std::shared_future`` have unimplementable postconditions","2022-11 (Kona)","","","`#105047 <https://github.com/llvm/llvm-project/issues/105047>`__","" +"`LWG3796 <https://wg21.link/LWG3796>`__","``movable-box`` as member should use ``default-initialization`` instead of ``copy-initialization``","2022-11 (Kona)","","","`#105048 <https://github.com/llvm/llvm-project/issues/105048>`__","" +"`LWG3798 <https://wg21.link/LWG3798>`__","Rvalue reference and ``iterator_category``","2022-11 (Kona)","|Partial|","","`#105049 <https://github.com/llvm/llvm-project/issues/105049>`__","``adjacent_transform_view`` hasn't been done yet since this type isn't implemented yet" +"`LWG3801 <https://wg21.link/LWG3801>`__","``cartesian_product_view::iterator::distance-from`` ignores the size of last underlying range","2022-11 (Kona)","","","`#105051 <https://github.com/llvm/llvm-project/issues/105051>`__","" +"`LWG3814 <https://wg21.link/LWG3814>`__","Add freestanding items requested by NB comments","2022-11 (Kona)","","","`#105052 <https://github.com/llvm/llvm-project/issues/105052>`__","" +"`LWG3816 <https://wg21.link/LWG3816>`__","``flat_map`` and ``flat_multimap`` should impose sequence container requirements","2022-11 (Kona)","","","`#105053 <https://github.com/llvm/llvm-project/issues/105053>`__","" +"`LWG3817 <https://wg21.link/LWG3817>`__","Missing preconditions on ``forward_list`` modifiers","2022-11 (Kona)","","","`#105055 <https://github.com/llvm/llvm-project/issues/105055>`__","" +"`LWG3818 <https://wg21.link/LWG3818>`__","Exposition-only concepts are not described in library intro","2022-11 (Kona)","|Nothing To Do|","","`#105056 <https://github.com/llvm/llvm-project/issues/105056>`__","" +"`LWG3822 <https://wg21.link/LWG3822>`__","Avoiding normalization in ``filesystem::weakly_canonical``","2022-11 (Kona)","","","`#105057 <https://github.com/llvm/llvm-project/issues/105057>`__","" +"`LWG3823 <https://wg21.link/LWG3823>`__","Unnecessary precondition for ``is_aggregate``","2022-11 (Kona)","|Nothing To Do|","","`#105058 <https://github.com/llvm/llvm-project/issues/105058>`__","" +"`LWG3824 <https://wg21.link/LWG3824>`__","Number of ``bind`` placeholders is underspecified","2022-11 (Kona)","|Nothing To Do|","","`#105060 <https://github.com/llvm/llvm-project/issues/105060>`__","" +"`LWG3826 <https://wg21.link/LWG3826>`__","Redundant specification [for overload of yield_value]","2022-11 (Kona)","|Nothing To Do|","","`#105061 <https://github.com/llvm/llvm-project/issues/105061>`__","" "","","","","","" -"`LWG2195 <https://wg21.link/LWG2195>`__","Missing constructors for ``match_results``","2023-02 (Issaquah)","","","" -"`LWG2295 <https://wg21.link/LWG2295>`__","Locale name when the provided ``Facet`` is a ``nullptr``","2023-02 (Issaquah)","","","" -"`LWG3032 <https://wg21.link/LWG3032>`__","``ValueSwappable`` requirement missing for ``push_heap`` and ``make_heap``","2023-02 (Issaquah)","","","" -"`LWG3085 <https://wg21.link/LWG3085>`__","``char_traits::copy`` precondition too weak","2023-02 (Issaquah)","","","" -"`LWG3664 <https://wg21.link/LWG3664>`__","`LWG 3392 <https://wg21.link/LWG3392>`__ ``broke std::ranges::distance(a, a+3)``","2023-02 (Issaquah)","","","" -"`LWG3720 <https://wg21.link/LWG3720>`__","Restrict the valid types of ``arg-id`` for width and precision in ``std-format-spec``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3756 <https://wg21.link/LWG3756>`__","Is the ``std::atomic_flag`` class signal-safe?","2023-02 (Issaquah)","","","" -"`LWG3769 <https://wg21.link/LWG3769>`__","``basic_const_iterator::operator==`` causes infinite constraint recursion","2023-02 (Issaquah)","","","" -"`LWG3807 <https://wg21.link/LWG3807>`__","The feature test macro for ``ranges::find_last`` should be renamed","2023-02 (Issaquah)","","","" -"`LWG3811 <https://wg21.link/LWG3811>`__","``views::as_const`` on ``ref_view<T>`` should return ``ref_view<const T>``","2023-02 (Issaquah)","","","" -"`LWG3820 <https://wg21.link/LWG3820>`__","``cartesian_product_view::iterator::prev`` is not quite right","2023-02 (Issaquah)","","","" -"`LWG3825 <https://wg21.link/LWG3825>`__","Missing compile-time argument ``id`` check in ``basic_format_parse_context::next_arg_id``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3204 <https://wg21.link/LWG3204>`__","``sub_match::swap`` only swaps the base class","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3733 <https://wg21.link/LWG3733>`__","``ranges::to`` misuses ``cpp17-input-iterator``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3742 <https://wg21.link/LWG3742>`__","``deque::prepend_range`` needs to permute","2023-02 (Issaquah)","","","" -"`LWG3790 <https://wg21.link/LWG3790>`__","`P1467 <https://wg21.link/P1467>`__ accidentally changed ``nexttoward``'s signature","2023-02 (Issaquah)","","","" -"`LWG3819 <https://wg21.link/LWG3819>`__","``reference_meows_from_temporary`` should not use ``is_meowible``","2023-02 (Issaquah)","","","" -"`LWG3821 <https://wg21.link/LWG3821>`__","``uses_allocator_construction_args`` should have overload for ``pair-like``","2023-02 (Issaquah)","|Complete|","18","" -"`LWG3834 <https://wg21.link/LWG3834>`__","Missing ``constexpr`` for ``std::intmax_t`` math functions in ``<cinttypes>``","2023-02 (Issaquah)","","","" -"`LWG3839 <https://wg21.link/LWG3839>`__","``range_formatter``'s ``set_separator``, ``set_brackets``, and ``underlying`` functions should be ``noexcept``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3841 <https://wg21.link/LWG3841>`__","``<version>`` should not be ""all freestanding""","2023-02 (Issaquah)","","","" -"`LWG3842 <https://wg21.link/LWG3842>`__","Unclear wording for ``precision`` in ``chrono-format-spec``","2023-02 (Issaquah)","|Complete|","16","" -"`LWG3848 <https://wg21.link/LWG3848>`__","``adjacent_view``, ``adjacent_transform_view`` and ``slide_view`` missing ``base`` accessor","2023-02 (Issaquah)","","","" -"`LWG3849 <https://wg21.link/LWG3849>`__","``cartesian_product_view::iterator``'s default constructor is overconstrained","2023-02 (Issaquah)","","","" -"`LWG3850 <https://wg21.link/LWG3850>`__","``views::as_const`` on ``empty_view<T>`` should return ``empty_view<const T>``","2023-02 (Issaquah)","","","" -"`LWG3851 <https://wg21.link/LWG3851>`__","``chunk_view::inner-iterator`` missing custom ``iter_move`` and ``iter_swap``","2023-02 (Issaquah)","","","" -"`LWG3853 <https://wg21.link/LWG3853>`__","``basic_const_iterator<volatile int*>::operator->`` is ill-formed","2023-02 (Issaquah)","","","" -"`LWG3857 <https://wg21.link/LWG3857>`__","``basic_string_view`` should allow explicit conversion when only traits vary","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3860 <https://wg21.link/LWG3860>`__","``range_common_reference_t`` is missing","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3866 <https://wg21.link/LWG3866>`__","Bad Mandates for ``expected::transform_error`` overloads","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3867 <https://wg21.link/LWG3867>`__","Should ``std::basic_osyncstream``'s move assignment operator be ``noexcept``?","2023-02 (Issaquah)","|Complete|","18","" -"`LWG3441 <https://wg21.link/LWG3441>`__","Misleading note about calls to customization points","2023-02 (Issaquah)","","","" -"`LWG3622 <https://wg21.link/LWG3622>`__","Misspecified transitivity of equivalence in §[unord.req.general]","2023-02 (Issaquah)","","","" -"`LWG3631 <https://wg21.link/LWG3631>`__","``basic_format_arg(T&&)`` should use ``remove_cvref_t<T>`` throughout","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3645 <https://wg21.link/LWG3645>`__","``resize_and_overwrite`` is overspecified to call its callback with lvalues","2023-02 (Issaquah)","|Complete|","14","" -"`LWG3655 <https://wg21.link/LWG3655>`__","The ``INVOKE`` operation and union types","2023-02 (Issaquah)","|Complete|","18","" -"`LWG3723 <https://wg21.link/LWG3723>`__","``priority_queue::push_range`` needs to ``append_range``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3734 <https://wg21.link/LWG3734>`__","Inconsistency in ``inout_ptr`` and ``out_ptr`` for empty case","2023-02 (Issaquah)","|Complete|","19","" -"`LWG3772 <https://wg21.link/LWG3772>`__","``repeat_view``'s ``piecewise`` constructor is missing Postconditions","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3786 <https://wg21.link/LWG3786>`__","Flat maps' deduction guide needs to default ``Allocator`` to be useful","2023-02 (Issaquah)","","","" -"`LWG3803 <https://wg21.link/LWG3803>`__","``flat_foo`` constructors taking ``KeyContainer`` lack ``KeyCompare`` parameter","2023-02 (Issaquah)","","","" -"`LWG3810 <https://wg21.link/LWG3810>`__","CTAD for ``std::basic_format_args``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3827 <https://wg21.link/LWG3827>`__","Deprecate ``<stdalign.h>`` and ``<stdbool.h>`` macros","2023-02 (Issaquah)","","","" -"`LWG3828 <https://wg21.link/LWG3828>`__","Sync ``intmax_t`` and ``uintmax_t`` with C2x","2023-02 (Issaquah)","|Nothing To Do|","","" -"`LWG3833 <https://wg21.link/LWG3833>`__","Remove specialization ``template<size_t N> struct formatter<const charT[N], charT>``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3836 <https://wg21.link/LWG3836>`__","``std::expected<bool, E1>`` conversion constructor ``expected(const expected<U, G>&)`` should take precedence over ``expected(U&&)`` with operator ``bool``","2023-02 (Issaquah)","|Complete|","18","" -"`LWG3843 <https://wg21.link/LWG3843>`__","``std::expected<T,E>::value() &`` assumes ``E`` is copy constructible","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3847 <https://wg21.link/LWG3847>`__","``ranges::to`` can still return views","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3862 <https://wg21.link/LWG3862>`__","``basic_const_iterator``'s ``common_type`` specialization is underconstrained","2023-02 (Issaquah)","","","" -"`LWG3865 <https://wg21.link/LWG3865>`__","Sorting a range of ``pairs``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3869 <https://wg21.link/LWG3869>`__","Deprecate ``std::errc`` constants related to UNIX STREAMS","2023-02 (Issaquah)","|Complete|","19","" -"`LWG3870 <https://wg21.link/LWG3870>`__","Remove ``voidify``","2023-02 (Issaquah)","|Complete|","20","" -"`LWG3871 <https://wg21.link/LWG3871>`__","Adjust note about ``terminate``","2023-02 (Issaquah)","","","" -"`LWG3872 <https://wg21.link/LWG3872>`__","``basic_const_iterator`` should have custom ``iter_move``","2023-02 (Issaquah)","","","" -"`LWG3875 <https://wg21.link/LWG3875>`__","``std::ranges::repeat_view<T, IntegerClass>::iterator`` may be ill-formed","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3876 <https://wg21.link/LWG3876>`__","Default constructor of ``std::layout_XX::mapping`` misses precondition","2023-02 (Issaquah)","","","" -"`LWG3877 <https://wg21.link/LWG3877>`__","Incorrect constraints on ``const``-qualified monadic overloads for ``std::expected``","2023-02 (Issaquah)","|Complete|","17","" -"`LWG3878 <https://wg21.link/LWG3878>`__","import ``std;`` should guarantee initialization of standard iostreams objects","2023-02 (Issaquah)","","","" -"`LWG3879 <https://wg21.link/LWG3879>`__","``erase_if`` for ``flat_{,multi}set`` is incorrectly specified","2023-02 (Issaquah)","","","" -"`LWG3880 <https://wg21.link/LWG3880>`__","Clarify ``operator+=`` complexity for ``{chunk,stride}_view::iterator``","2023-02 (Issaquah)","","","" -"`LWG3881 <https://wg21.link/LWG3881>`__","Incorrect formatting of container adapters backed by ``std::string``","2023-02 (Issaquah)","|Complete|","17","" +"`LWG2195 <https://wg21.link/LWG2195>`__","Missing constructors for ``match_results``","2023-02 (Issaquah)","","","`#105062 <https://github.com/llvm/llvm-project/issues/105062>`__","" +"`LWG2295 <https://wg21.link/LWG2295>`__","Locale name when the provided ``Facet`` is a ``nullptr``","2023-02 (Issaquah)","","","`#105063 <https://github.com/llvm/llvm-project/issues/105063>`__","" +"`LWG3032 <https://wg21.link/LWG3032>`__","``ValueSwappable`` requirement missing for ``push_heap`` and ``make_heap``","2023-02 (Issaquah)","","","`#105064 <https://github.com/llvm/llvm-project/issues/105064>`__","" +"`LWG3085 <https://wg21.link/LWG3085>`__","``char_traits::copy`` precondition too weak","2023-02 (Issaquah)","","","`#105065 <https://github.com/llvm/llvm-project/issues/105065>`__","" +"`LWG3664 <https://wg21.link/LWG3664>`__","`LWG 3392 <https://wg21.link/LWG3392>`__ ``broke std::ranges::distance(a, a+3)``","2023-02 (Issaquah)","","","`#105066 <https://github.com/llvm/llvm-project/issues/105066>`__","" +"`LWG3720 <https://wg21.link/LWG3720>`__","Restrict the valid types of ``arg-id`` for width and precision in ``std-format-spec``","2023-02 (Issaquah)","|Complete|","17","`#105067 <https://github.com/llvm/llvm-project/issues/105067>`__","" +"`LWG3756 <https://wg21.link/LWG3756>`__","Is the ``std::atomic_flag`` class signal-safe?","2023-02 (Issaquah)","","","`#105068 <https://github.com/llvm/llvm-project/issues/105068>`__","" +"`LWG3769 <https://wg21.link/LWG3769>`__","``basic_const_iterator::operator==`` causes infinite constraint recursion","2023-02 (Issaquah)","","","`#105069 <https://github.com/llvm/llvm-project/issues/105069>`__","" +"`LWG3807 <https://wg21.link/LWG3807>`__","The feature test macro for ``ranges::find_last`` should be renamed","2023-02 (Issaquah)","","","`#105070 <https://github.com/llvm/llvm-project/issues/105070>`__","" +"`LWG3811 <https://wg21.link/LWG3811>`__","``views::as_const`` on ``ref_view<T>`` should return ``ref_view<const T>``","2023-02 (Issaquah)","","","`#105071 <https://github.com/llvm/llvm-project/issues/105071>`__","" +"`LWG3820 <https://wg21.link/LWG3820>`__","``cartesian_product_view::iterator::prev`` is not quite right","2023-02 (Issaquah)","","","`#105072 <https://github.com/llvm/llvm-project/issues/105072>`__","" +"`LWG3825 <https://wg21.link/LWG3825>`__","Missing compile-time argument ``id`` check in ``basic_format_parse_context::next_arg_id``","2023-02 (Issaquah)","|Complete|","17","`#105073 <https://github.com/llvm/llvm-project/issues/105073>`__","" +"`LWG3204 <https://wg21.link/LWG3204>`__","``sub_match::swap`` only swaps the base class","2023-02 (Issaquah)","|Complete|","17","`#105074 <https://github.com/llvm/llvm-project/issues/105074>`__","" +"`LWG3733 <https://wg21.link/LWG3733>`__","``ranges::to`` misuses ``cpp17-input-iterator``","2023-02 (Issaquah)","|Complete|","17","`#105075 <https://github.com/llvm/llvm-project/issues/105075>`__","" +"`LWG3742 <https://wg21.link/LWG3742>`__","``deque::prepend_range`` needs to permute","2023-02 (Issaquah)","","","`#105077 <https://github.com/llvm/llvm-project/issues/105077>`__","" +"`LWG3790 <https://wg21.link/LWG3790>`__","`P1467 <https://wg21.link/P1467>`__ accidentally changed ``nexttoward``'s signature","2023-02 (Issaquah)","","","`#105078 <https://github.com/llvm/llvm-project/issues/105078>`__","" +"`LWG3819 <https://wg21.link/LWG3819>`__","``reference_meows_from_temporary`` should not use ``is_meowible``","2023-02 (Issaquah)","","","`#105079 <https://github.com/llvm/llvm-project/issues/105079>`__","" +"`LWG3821 <https://wg21.link/LWG3821>`__","``uses_allocator_construction_args`` should have overload for ``pair-like``","2023-02 (Issaquah)","|Complete|","18","`#105080 <https://github.com/llvm/llvm-project/issues/105080>`__","" +"`LWG3834 <https://wg21.link/LWG3834>`__","Missing ``constexpr`` for ``std::intmax_t`` math functions in ``<cinttypes>``","2023-02 (Issaquah)","","","`#105081 <https://github.com/llvm/llvm-project/issues/105081>`__","" +"`LWG3839 <https://wg21.link/LWG3839>`__","``range_formatter``'s ``set_separator``, ``set_brackets``, and ``underlying`` functions should be ``noexcept``","2023-02 (Issaquah)","|Complete|","17","`#105082 <https://github.com/llvm/llvm-project/issues/105082>`__","" +"`LWG3841 <https://wg21.link/LWG3841>`__","``<version>`` should not be ""all freestanding""","2023-02 (Issaquah)","","","`#105083 <https://github.com/llvm/llvm-project/issues/105083>`__","" +"`LWG3842 <https://wg21.link/LWG3842>`__","Unclear wording for ``precision`` in ``chrono-format-spec``","2023-02 (Issaquah)","|Complete|","16","`#105085 <https://github.com/llvm/llvm-project/issues/105085>`__","" +"`LWG3848 <https://wg21.link/LWG3848>`__","``adjacent_view``, ``adjacent_transform_view`` and ``slide_view`` missing ``base`` accessor","2023-02 (Issaquah)","","","`#105086 <https://github.com/llvm/llvm-project/issues/105086>`__","" +"`LWG3849 <https://wg21.link/LWG3849>`__","``cartesian_product_view::iterator``'s default constructor is overconstrained","2023-02 (Issaquah)","","","`#105087 <https://github.com/llvm/llvm-project/issues/105087>`__","" +"`LWG3850 <https://wg21.link/LWG3850>`__","``views::as_const`` on ``empty_view<T>`` should return ``empty_view<const T>``","2023-02 (Issaquah)","","","`#105088 <https://github.com/llvm/llvm-project/issues/105088>`__","" +"`LWG3851 <https://wg21.link/LWG3851>`__","``chunk_view::inner-iterator`` missing custom ``iter_move`` and ``iter_swap``","2023-02 (Issaquah)","","","`#105089 <https://github.com/llvm/llvm-project/issues/105089>`__","" +"`LWG3853 <https://wg21.link/LWG3853>`__","``basic_const_iterator<volatile int*>::operator->`` is ill-formed","2023-02 (Issaquah)","","","`#105090 <https://github.com/llvm/llvm-project/issues/105090>`__","" +"`LWG3857 <https://wg21.link/LWG3857>`__","``basic_string_view`` should allow explicit conversion when only traits vary","2023-02 (Issaquah)","|Complete|","17","`#105092 <https://github.com/llvm/llvm-project/issues/105092>`__","" +"`LWG3860 <https://wg21.link/LWG3860>`__","``range_common_reference_t`` is missing","2023-02 (Issaquah)","|Complete|","17","`#105094 <https://github.com/llvm/llvm-project/issues/105094>`__","" +"`LWG3866 <https://wg21.link/LWG3866>`__","Bad Mandates for ``expected::transform_error`` overloads","2023-02 (Issaquah)","|Complete|","17","`#105095 <https://github.com/llvm/llvm-project/issues/105095>`__","" +"`LWG3867 <https://wg21.link/LWG3867>`__","Should ``std::basic_osyncstream``'s move assignment operator be ``noexcept``?","2023-02 (Issaquah)","|Complete|","18","`#105097 <https://github.com/llvm/llvm-project/issues/105097>`__","" +"`LWG3441 <https://wg21.link/LWG3441>`__","Misleading note about calls to customization points","2023-02 (Issaquah)","","","`#105098 <https://github.com/llvm/llvm-project/issues/105098>`__","" +"`LWG3622 <https://wg21.link/LWG3622>`__","Misspecified transitivity of equivalence in §[unord.req.general]","2023-02 (Issaquah)","","","`#105100 <https://github.com/llvm/llvm-project/issues/105100>`__","" +"`LWG3631 <https://wg21.link/LWG3631>`__","``basic_format_arg(T&&)`` should use ``remove_cvref_t<T>`` throughout","2023-02 (Issaquah)","|Complete|","17","`#105101 <https://github.com/llvm/llvm-project/issues/105101>`__","" +"`LWG3645 <https://wg21.link/LWG3645>`__","``resize_and_overwrite`` is overspecified to call its callback with lvalues","2023-02 (Issaquah)","|Complete|","14","`#105102 <https://github.com/llvm/llvm-project/issues/105102>`__","" +"`LWG3655 <https://wg21.link/LWG3655>`__","The ``INVOKE`` operation and union types","2023-02 (Issaquah)","|Complete|","18","`#105103 <https://github.com/llvm/llvm-project/issues/105103>`__","" +"`LWG3723 <https://wg21.link/LWG3723>`__","``priority_queue::push_range`` needs to ``append_range``","2023-02 (Issaquah)","|Complete|","17","`#105104 <https://github.com/llvm/llvm-project/issues/105104>`__","" +"`LWG3734 <https://wg21.link/LWG3734>`__","Inconsistency in ``inout_ptr`` and ``out_ptr`` for empty case","2023-02 (Issaquah)","|Complete|","19","`#105105 <https://github.com/llvm/llvm-project/issues/105105>`__","" +"`LWG3772 <https://wg21.link/LWG3772>`__","``repeat_view``'s ``piecewise`` constructor is missing Postconditions","2023-02 (Issaquah)","|Complete|","17","`#105106 <https://github.com/llvm/llvm-project/issues/105106>`__","" +"`LWG3786 <https://wg21.link/LWG3786>`__","Flat maps' deduction guide needs to default ``Allocator`` to be useful","2023-02 (Issaquah)","","","`#105107 <https://github.com/llvm/llvm-project/issues/105107>`__","" +"`LWG3803 <https://wg21.link/LWG3803>`__","``flat_foo`` constructors taking ``KeyContainer`` lack ``KeyCompare`` parameter","2023-02 (Issaquah)","","","`#105108 <https://github.com/llvm/llvm-project/issues/105108>`__","" +"`LWG3810 <https://wg21.link/LWG3810>`__","CTAD for ``std::basic_format_args``","2023-02 (Issaquah)","|Complete|","17","`#105109 <https://github.com/llvm/llvm-project/issues/105109>`__","" +"`LWG3827 <https://wg21.link/LWG3827>`__","Deprecate ``<stdalign.h>`` and ``<stdbool.h>`` macros","2023-02 (Issaquah)","","","`#105110 <https://github.com/llvm/llvm-project/issues/105110>`__","" +"`LWG3828 <https://wg21.link/LWG3828>`__","Sync ``intmax_t`` and ``uintmax_t`` with C2x","2023-02 (Issaquah)","|Nothing To Do|","","`#105111 <https://github.com/llvm/llvm-project/issues/105111>`__","" +"`LWG3833 <https://wg21.link/LWG3833>`__","Remove specialization ``template<size_t N> struct formatter<const charT[N], charT>``","2023-02 (Issaquah)","|Complete|","17","`#105112 <https://github.com/llvm/llvm-project/issues/105112>`__","" +"`LWG3836 <https://wg21.link/LWG3836>`__","``std::expected<bool, E1>`` conversion constructor ``expected(const expected<U, G>&)`` should take precedence over ``expected(U&&)`` with operator ``bool``","2023-02 (Issaquah)","|Complete|","18","`#105113 <https://github.com/llvm/llvm-project/issues/105113>`__","" +"`LWG3843 <https://wg21.link/LWG3843>`__","``std::expected<T,E>::value() &`` assumes ``E`` is copy constructible","2023-02 (Issaquah)","|Complete|","17","`#105114 <https://github.com/llvm/llvm-project/issues/105114>`__","" +"`LWG3847 <https://wg21.link/LWG3847>`__","``ranges::to`` can still return views","2023-02 (Issaquah)","|Complete|","17","`#105115 <https://github.com/llvm/llvm-project/issues/105115>`__","" +"`LWG3862 <https://wg21.link/LWG3862>`__","``basic_const_iterator``'s ``common_type`` specialization is underconstrained","2023-02 (Issaquah)","","","`#105116 <https://github.com/llvm/llvm-project/issues/105116>`__","" +"`LWG3865 <https://wg21.link/LWG3865>`__","Sorting a range of ``pairs``","2023-02 (Issaquah)","|Complete|","17","`#105117 <https://github.com/llvm/llvm-project/issues/105117>`__","" +"`LWG3869 <https://wg21.link/LWG3869>`__","Deprecate ``std::errc`` constants related to UNIX STREAMS","2023-02 (Issaquah)","|Complete|","19","`#105118 <https://github.com/llvm/llvm-project/issues/105118>`__","" +"`LWG3870 <https://wg21.link/LWG3870>`__","Remove ``voidify``","2023-02 (Issaquah)","|Complete|","20","`#105119 <https://github.com/llvm/llvm-project/issues/105119>`__","" +"`LWG3871 <https://wg21.link/LWG3871>`__","Adjust note about ``terminate``","2023-02 (Issaquah)","","","`#105122 <https://github.com/llvm/llvm-project/issues/105122>`__","" +"`LWG3872 <https://wg21.link/LWG3872>`__","``basic_const_iterator`` should have custom ``iter_move``","2023-02 (Issaquah)","","","`#105123 <https://github.com/llvm/llvm-project/issues/105123>`__","" +"`LWG3875 <https://wg21.link/LWG3875>`__","``std::ranges::repeat_view<T, IntegerClass>::iterator`` may be ill-formed","2023-02 (Issaquah)","|Complete|","17","`#105124 <https://github.com/llvm/llvm-project/issues/105124>`__","" +"`LWG3876 <https://wg21.link/LWG3876>`__","Default constructor of ``std::layout_XX::mapping`` misses precondition","2023-02 (Issaquah)","","","`#105125 <https://github.com/llvm/llvm-project/issues/105125>`__","" +"`LWG3877 <https://wg21.link/LWG3877>`__","Incorrect constraints on ``const``-qualified monadic overloads for ``std::expected``","2023-02 (Issaquah)","|Complete|","17","`#105126 <https://github.com/llvm/llvm-project/issues/105126>`__","" +"`LWG3878 <https://wg21.link/LWG3878>`__","import ``std;`` should guarantee initialization of standard iostreams objects","2023-02 (Issaquah)","","","`#105127 <https://github.com/llvm/llvm-project/issues/105127>`__","" +"`LWG3879 <https://wg21.link/LWG3879>`__","``erase_if`` for ``flat_{,multi}set`` is incorrectly specified","2023-02 (Issaquah)","","","`#105128 <https://github.com/llvm/llvm-project/issues/105128>`__","" +"`LWG3880 <https://wg21.link/LWG3880>`__","Clarify ``operator+=`` complexity for ``{chunk,stride}_view::iterator``","2023-02 (Issaquah)","","","`#105129 <https://github.com/llvm/llvm-project/issues/105129>`__","" +"`LWG3881 <https://wg21.link/LWG3881>`__","Incorrect formatting of container adapters backed by ``std::string``","2023-02 (Issaquah)","|Complete|","17","`#105130 <https://github.com/llvm/llvm-project/issues/105130>`__","" diff --git a/libcxx/docs/Status/Cxx23Papers.csv b/libcxx/docs/Status/Cxx23Papers.csv index f1d8e9a2bd09..3a87e64339e1 100644 --- a/libcxx/docs/Status/Cxx23Papers.csv +++ b/libcxx/docs/Status/Cxx23Papers.csv @@ -1,122 +1,122 @@ "Paper #","Paper Name","Meeting","Status","First released version","Notes" -"`P0881R7 <https://wg21.link/P0881R7>`__","A Proposal to add stacktrace library","2020-11 (Virtual)","","","" -"`P0943R6 <https://wg21.link/P0943R6>`__","Support C atomics in C++","2020-11 (Virtual)","|Complete|","15","" -"`P1048R1 <https://wg21.link/P1048R1>`__","A proposal for a type trait to detect scoped enumerations","2020-11 (Virtual)","|Complete|","12","" -"`P1679R3 <https://wg21.link/P1679R3>`__","string contains function","2020-11 (Virtual)","|Complete|","12","" +"`P0881R7 <https://wg21.link/P0881R7>`__","A Proposal to add stacktrace library","2020-11 (Virtual)","","","`#105131 <https://github.com/llvm/llvm-project/issues/105131>`__","" +"`P0943R6 <https://wg21.link/P0943R6>`__","Support C atomics in C++","2020-11 (Virtual)","|Complete|","15","`#105132 <https://github.com/llvm/llvm-project/issues/105132>`__","" +"`P1048R1 <https://wg21.link/P1048R1>`__","A proposal for a type trait to detect scoped enumerations","2020-11 (Virtual)","|Complete|","12","`#105134 <https://github.com/llvm/llvm-project/issues/105134>`__","" +"`P1679R3 <https://wg21.link/P1679R3>`__","string contains function","2020-11 (Virtual)","|Complete|","12","`#105135 <https://github.com/llvm/llvm-project/issues/105135>`__","" "","","","","","" -"`P1682R3 <https://wg21.link/P1682R3>`__","std::to_underlying for enumerations","2021-02 (Virtual)","|Complete|","13","" -"`P2017R1 <https://wg21.link/P2017R1>`__","Conditionally borrowed ranges","2021-02 (Virtual)","|Complete|","16","" -"`P2160R1 <https://wg21.link/P2160R1>`__","Locks lock lockables","2021-02 (Virtual)","|Nothing To Do|","","" -"`P2162R2 <https://wg21.link/P2162R2>`__","Inheriting from std::variant","2021-02 (Virtual)","|Complete|","13","" -"`P2212R2 <https://wg21.link/P2212R2>`__","Relax Requirements for time_point::clock","2021-02 (Virtual)","|Nothing To Do|","","" -"`P2259R1 <https://wg21.link/P2259R1>`__","Repairing input range adaptors and counted_iterator","2021-02 (Virtual)","","","" +"`P1682R3 <https://wg21.link/P1682R3>`__","std::to_underlying for enumerations","2021-02 (Virtual)","|Complete|","13","`#105136 <https://github.com/llvm/llvm-project/issues/105136>`__","" +"`P2017R1 <https://wg21.link/P2017R1>`__","Conditionally borrowed ranges","2021-02 (Virtual)","|Complete|","16","`#105138 <https://github.com/llvm/llvm-project/issues/105138>`__","" +"`P2160R1 <https://wg21.link/P2160R1>`__","Locks lock lockables","2021-02 (Virtual)","|Nothing To Do|","","`#105139 <https://github.com/llvm/llvm-project/issues/105139>`__","" +"`P2162R2 <https://wg21.link/P2162R2>`__","Inheriting from std::variant","2021-02 (Virtual)","|Complete|","13","`#105140 <https://github.com/llvm/llvm-project/issues/105140>`__","" +"`P2212R2 <https://wg21.link/P2212R2>`__","Relax Requirements for time_point::clock","2021-02 (Virtual)","|Nothing To Do|","","`#105141 <https://github.com/llvm/llvm-project/issues/105141>`__","" +"`P2259R1 <https://wg21.link/P2259R1>`__","Repairing input range adaptors and counted_iterator","2021-02 (Virtual)","","","`#105142 <https://github.com/llvm/llvm-project/issues/105142>`__","" "","","","","","" -"`P0401R6 <https://wg21.link/P0401R6>`__","Providing size feedback in the Allocator interface","2021-06 (Virtual)","|Complete|","15","" -"`P0448R4 <https://wg21.link/P0448R4>`__","A strstream replacement using span<charT> as buffer","2021-06 (Virtual)","","","" -"`P1132R8 <https://wg21.link/P1132R8>`__","out_ptr - a scalable output pointer abstraction","2021-06 (Virtual)","|Complete|","19","" -"`P1328R1 <https://wg21.link/P1328R1>`__","Making std::type_info::operator== constexpr","2021-06 (Virtual)","|Complete|","17","" -"`P1425R4 <https://wg21.link/P1425R4>`__","Iterators pair constructors for stack and queue","2021-06 (Virtual)","|Complete|","14","" -"`P1518R2 <https://wg21.link/P1518R2>`__","Stop overconstraining allocators in container deduction guides","2021-06 (Virtual)","|Complete|","13","" -"`P1659R3 <https://wg21.link/P1659R3>`__","starts_with and ends_with","2021-06 (Virtual)","|Complete|","19","" -"`P1951R1 <https://wg21.link/P1951R1>`__","Default Arguments for pair Forwarding Constructor","2021-06 (Virtual)","|Complete|","14","" -"`P1989R2 <https://wg21.link/P1989R2>`__","Range constructor for std::string_view","2021-06 (Virtual)","|Complete|","14","" -"`P2136R3 <https://wg21.link/P2136R3>`__","invoke_r","2021-06 (Virtual)","|Complete|","17","" -"`P2166R1 <https://wg21.link/P2166R1>`__","A Proposal to Prohibit std::basic_string and std::basic_string_view construction from nullptr","2021-06 (Virtual)","|Complete|","13","" +"`P0401R6 <https://wg21.link/P0401R6>`__","Providing size feedback in the Allocator interface","2021-06 (Virtual)","|Complete|","15","`#105144 <https://github.com/llvm/llvm-project/issues/105144>`__","" +"`P0448R4 <https://wg21.link/P0448R4>`__","A strstream replacement using span<charT> as buffer","2021-06 (Virtual)","","","`#105145 <https://github.com/llvm/llvm-project/issues/105145>`__","" +"`P1132R8 <https://wg21.link/P1132R8>`__","out_ptr - a scalable output pointer abstraction","2021-06 (Virtual)","|Complete|","19","`#105146 <https://github.com/llvm/llvm-project/issues/105146>`__","" +"`P1328R1 <https://wg21.link/P1328R1>`__","Making std::type_info::operator== constexpr","2021-06 (Virtual)","|Complete|","17","`#105147 <https://github.com/llvm/llvm-project/issues/105147>`__","" +"`P1425R4 <https://wg21.link/P1425R4>`__","Iterators pair constructors for stack and queue","2021-06 (Virtual)","|Complete|","14","`#105149 <https://github.com/llvm/llvm-project/issues/105149>`__","" +"`P1518R2 <https://wg21.link/P1518R2>`__","Stop overconstraining allocators in container deduction guides","2021-06 (Virtual)","|Complete|","13","`#105150 <https://github.com/llvm/llvm-project/issues/105150>`__","" +"`P1659R3 <https://wg21.link/P1659R3>`__","starts_with and ends_with","2021-06 (Virtual)","|Complete|","19","`#105151 <https://github.com/llvm/llvm-project/issues/105151>`__","" +"`P1951R1 <https://wg21.link/P1951R1>`__","Default Arguments for pair Forwarding Constructor","2021-06 (Virtual)","|Complete|","14","`#105153 <https://github.com/llvm/llvm-project/issues/105153>`__","" +"`P1989R2 <https://wg21.link/P1989R2>`__","Range constructor for std::string_view","2021-06 (Virtual)","|Complete|","14","`#105154 <https://github.com/llvm/llvm-project/issues/105154>`__","" +"`P2136R3 <https://wg21.link/P2136R3>`__","invoke_r","2021-06 (Virtual)","|Complete|","17","`#105155 <https://github.com/llvm/llvm-project/issues/105155>`__","" +"`P2166R1 <https://wg21.link/P2166R1>`__","A Proposal to Prohibit std::basic_string and std::basic_string_view construction from nullptr","2021-06 (Virtual)","|Complete|","13","`#105156 <https://github.com/llvm/llvm-project/issues/105156>`__","" "","","","","","" -"`P0288R9 <https://wg21.link/P0288R9>`__","``any_invocable``","2021-10 (Virtual)","","","" -"`P0798R8 <https://wg21.link/P0798R8>`__","Monadic operations for ``std::optional``","2021-10 (Virtual)","|Complete|","14","" -"`P0849R8 <https://wg21.link/P0849R8>`__","``auto(x)``: ``DECAY_COPY`` in the language","2021-10 (Virtual)","|Complete|","14","" -"`P1072R10 <https://wg21.link/P1072R10>`__","``basic_string::resize_and_overwrite``","2021-10 (Virtual)","|Complete|","14","" -"`P1147R1 <https://wg21.link/P1147R1>`__","Printing ``volatile`` Pointers","2021-10 (Virtual)","|Complete|","14","" -"`P1272R4 <https://wg21.link/P1272R4>`__","Byteswapping for fun&&nuf","2021-10 (Virtual)","|Complete|","14","" -"`P1675R2 <https://wg21.link/P1675R2>`__","``rethrow_exception`` must be allowed to copy","2021-10 (Virtual)","|Nothing To Do|","","" -"`P2077R3 <https://wg21.link/P2077R3>`__","Heterogeneous erasure overloads for associative containers","2021-10 (Virtual)","","","" -"`P2251R1 <https://wg21.link/P2251R1>`__","Require ``span`` & ``basic_string_view`` to be Trivially Copyable","2021-10 (Virtual)","|Complete|","14","" -"`P2301R1 <https://wg21.link/P2301R1>`__","Add a ``pmr`` alias for ``std::stacktrace``","2021-10 (Virtual)","","","" -"`P2321R2 <https://wg21.link/P2321R2>`__","``zip``","2021-10 (Virtual)","|In Progress|","","" -"`P2340R1 <https://wg21.link/P2340R1>`__","Clarifying the status of the 'C headers'","2021-10 (Virtual)","|Nothing To Do|","","" -"`P2393R1 <https://wg21.link/P2393R1>`__","Cleaning up ``integer``-class types","2021-10 (Virtual)","","","" -"`P2401R0 <https://wg21.link/P2401R0>`__","Add a conditional ``noexcept`` specification to ``std::exchange``","2021-10 (Virtual)","|Complete|","14","" +"`P0288R9 <https://wg21.link/P0288R9>`__","``any_invocable``","2021-10 (Virtual)","","","`#105157 <https://github.com/llvm/llvm-project/issues/105157>`__","" +"`P0798R8 <https://wg21.link/P0798R8>`__","Monadic operations for ``std::optional``","2021-10 (Virtual)","|Complete|","14","`#105158 <https://github.com/llvm/llvm-project/issues/105158>`__","" +"`P0849R8 <https://wg21.link/P0849R8>`__","``auto(x)``: ``DECAY_COPY`` in the language","2021-10 (Virtual)","|Complete|","14","`#105159 <https://github.com/llvm/llvm-project/issues/105159>`__","" +"`P1072R10 <https://wg21.link/P1072R10>`__","``basic_string::resize_and_overwrite``","2021-10 (Virtual)","|Complete|","14","`#105160 <https://github.com/llvm/llvm-project/issues/105160>`__","" +"`P1147R1 <https://wg21.link/P1147R1>`__","Printing ``volatile`` Pointers","2021-10 (Virtual)","|Complete|","14","`#105161 <https://github.com/llvm/llvm-project/issues/105161>`__","" +"`P1272R4 <https://wg21.link/P1272R4>`__","Byteswapping for fun&&nuf","2021-10 (Virtual)","|Complete|","14","`#105163 <https://github.com/llvm/llvm-project/issues/105163>`__","" +"`P1675R2 <https://wg21.link/P1675R2>`__","``rethrow_exception`` must be allowed to copy","2021-10 (Virtual)","|Nothing To Do|","","`#105164 <https://github.com/llvm/llvm-project/issues/105164>`__","" +"`P2077R3 <https://wg21.link/P2077R3>`__","Heterogeneous erasure overloads for associative containers","2021-10 (Virtual)","","","`#105165 <https://github.com/llvm/llvm-project/issues/105165>`__","" +"`P2251R1 <https://wg21.link/P2251R1>`__","Require ``span`` & ``basic_string_view`` to be Trivially Copyable","2021-10 (Virtual)","|Complete|","14","`#105166 <https://github.com/llvm/llvm-project/issues/105166>`__","" +"`P2301R1 <https://wg21.link/P2301R1>`__","Add a ``pmr`` alias for ``std::stacktrace``","2021-10 (Virtual)","","","`#105167 <https://github.com/llvm/llvm-project/issues/105167>`__","" +"`P2321R2 <https://wg21.link/P2321R2>`__","``zip``","2021-10 (Virtual)","|In Progress|","","`#105169 <https://github.com/llvm/llvm-project/issues/105169>`__","" +"`P2340R1 <https://wg21.link/P2340R1>`__","Clarifying the status of the 'C headers'","2021-10 (Virtual)","|Nothing To Do|","","`#105170 <https://github.com/llvm/llvm-project/issues/105170>`__","" +"`P2393R1 <https://wg21.link/P2393R1>`__","Cleaning up ``integer``-class types","2021-10 (Virtual)","","","`#105171 <https://github.com/llvm/llvm-project/issues/105171>`__","" +"`P2401R0 <https://wg21.link/P2401R0>`__","Add a conditional ``noexcept`` specification to ``std::exchange``","2021-10 (Virtual)","|Complete|","14","`#105172 <https://github.com/llvm/llvm-project/issues/105172>`__","" "","","","","","" -"`P0323R12 <https://wg21.link/P0323R12>`__","``std::expected``","2022-02 (Virtual)","|Complete|","16","" -"`P0533R9 <https://wg21.link/P0533R9>`__","``constexpr`` for ``<cmath>`` and ``<cstdlib>``","2022-02 (Virtual)","|In Progress|","","``isfinite``, ``isinf``, ``isnan`` and ``isnormal`` are implemented" -"`P0627R6 <https://wg21.link/P0627R6>`__","Function to mark unreachable code","2022-02 (Virtual)","|Complete|","15","" -"`P1206R7 <https://wg21.link/P1206R7>`__","``ranges::to``: A function to convert any range to a container","2022-02 (Virtual)","|Complete|","17","" -"`P1413R3 <https://wg21.link/P1413R3>`__","Deprecate ``std::aligned_storage`` and ``std::aligned_union``","2022-02 (Virtual)","|Complete|","","``std::aligned_storage_t`` and ``std::aligned_union_t`` are marked deprecated, but clang doesn't issue a diagnostic for deprecated using template declarations." -"`P2255R2 <https://wg21.link/P2255R2>`__","A type trait to detect reference binding to temporary","2022-02 (Virtual)","|Partial|","","Implemented the type traits only." -"`P2273R3 <https://wg21.link/P2273R3>`__","Making ``std::unique_ptr`` constexpr","2022-02 (Virtual)","|Complete|","16","" -"`P2387R3 <https://wg21.link/P2387R3>`__","Pipe support for user-defined range adaptors","2022-02 (Virtual)","|Complete|","19","" -"`P2440R1 <https://wg21.link/P2440R1>`__","``ranges::iota``, ``ranges::shift_left`` and ``ranges::shift_right``","2022-02 (Virtual)","|Partial|","","Only ``ranges::iota`` is implemented." -"`P2441R2 <https://wg21.link/P2441R2>`__","``views::join_with``","2022-02 (Virtual)","|Complete|","21","" -"`P2442R1 <https://wg21.link/P2442R1>`__","Windowing range adaptors: ``views::chunk`` and ``views::slide``","2022-02 (Virtual)","","","" -"`P2443R1 <https://wg21.link/P2443R1>`__","``views::chunk_by``","2022-02 (Virtual)","|Complete|","18","" +"`P0323R12 <https://wg21.link/P0323R12>`__","``std::expected``","2022-02 (Virtual)","|Complete|","16","`#105173 <https://github.com/llvm/llvm-project/issues/105173>`__","" +"`P0533R9 <https://wg21.link/P0533R9>`__","``constexpr`` for ``<cmath>`` and ``<cstdlib>``","2022-02 (Virtual)","|In Progress|","","`#105174 <https://github.com/llvm/llvm-project/issues/105174>`__","``isfinite``, ``isinf``, ``isnan`` and ``isnormal`` are implemented" +"`P0627R6 <https://wg21.link/P0627R6>`__","Function to mark unreachable code","2022-02 (Virtual)","|Complete|","15","`#105175 <https://github.com/llvm/llvm-project/issues/105175>`__","" +"`P1206R7 <https://wg21.link/P1206R7>`__","``ranges::to``: A function to convert any range to a container","2022-02 (Virtual)","|Complete|","17","`#105176 <https://github.com/llvm/llvm-project/issues/105176>`__","" +"`P1413R3 <https://wg21.link/P1413R3>`__","Deprecate ``std::aligned_storage`` and ``std::aligned_union``","2022-02 (Virtual)","|Complete|","","`#105177 <https://github.com/llvm/llvm-project/issues/105177>`__","``std::aligned_storage_t`` and ``std::aligned_union_t`` are marked deprecated, but clang doesn't issue a diagnostic for deprecated using template declarations." +"`P2255R2 <https://wg21.link/P2255R2>`__","A type trait to detect reference binding to temporary","2022-02 (Virtual)","|Partial|","","`#105180 <https://github.com/llvm/llvm-project/issues/105180>`__","Implemented the type traits only." +"`P2273R3 <https://wg21.link/P2273R3>`__","Making ``std::unique_ptr`` constexpr","2022-02 (Virtual)","|Complete|","16","`#105182 <https://github.com/llvm/llvm-project/issues/105182>`__","" +"`P2387R3 <https://wg21.link/P2387R3>`__","Pipe support for user-defined range adaptors","2022-02 (Virtual)","|Complete|","19","`#105183 <https://github.com/llvm/llvm-project/issues/105183>`__","" +"`P2440R1 <https://wg21.link/P2440R1>`__","``ranges::iota``, ``ranges::shift_left`` and ``ranges::shift_right``","2022-02 (Virtual)","|Partial|","","`#105184 <https://github.com/llvm/llvm-project/issues/105184>`__","Only ``ranges::iota`` is implemented." +"`P2441R2 <https://wg21.link/P2441R2>`__","``views::join_with``","2022-02 (Virtual)","|Complete|","21","`#105185 <https://github.com/llvm/llvm-project/issues/105185>`__","" +"`P2442R1 <https://wg21.link/P2442R1>`__","Windowing range adaptors: ``views::chunk`` and ``views::slide``","2022-02 (Virtual)","","","`#105187 <https://github.com/llvm/llvm-project/issues/105187>`__","" +"`P2443R1 <https://wg21.link/P2443R1>`__","``views::chunk_by``","2022-02 (Virtual)","|Complete|","18","`#105188 <https://github.com/llvm/llvm-project/issues/105188>`__","" "","","","","","" -"`P0009R18 <https://wg21.link/P0009R18>`__","mdspan: A Non-Owning Multidimensional Array Reference","2022-07 (Virtual)","|Complete|","18","" -"`P0429R9 <https://wg21.link/P0429R9>`__","A Standard ``flat_map``","2022-07 (Virtual)","|Complete|","20","" -"`P1169R4 <https://wg21.link/P1169R4>`__","``static operator()``","2022-07 (Virtual)","|Complete|","16","" -"`P1222R4 <https://wg21.link/P1222R4>`__","A Standard ``flat_set``","2022-07 (Virtual)","|Complete|","21","" -"`P1223R5 <https://wg21.link/P1223R5>`__","``ranges::find_last()``, ``ranges::find_last_if()``, and ``ranges::find_last_if_not()``","2022-07 (Virtual)","|Complete|","19","" -"`P1467R9 <https://wg21.link/P1467R9>`__","Extended ``floating-point`` types and standard names","2022-07 (Virtual)","","","" -"`P1642R11 <https://wg21.link/P1642R11>`__","Freestanding ``[utilities]``, ``[ranges]``, and ``[iterators]``","2022-07 (Virtual)","","","" -"`P1899R3 <https://wg21.link/P1899R3>`__","``stride_view``","2022-07 (Virtual)","","","" -"`P2093R14 <https://wg21.link/P2093R14>`__","Formatted output","2022-07 (Virtual)","|Complete|","18","" -"`P2165R4 <https://wg21.link/P2165R4>`__","Compatibility between ``tuple``, ``pair`` and ``tuple-like`` objects","2022-07 (Virtual)","|Partial|","","Changes of ``tuple``, ``adjacent_view``, and ``cartesian_product_view`` are not yet implemented." -"`P2278R4 <https://wg21.link/P2278R4>`__","``cbegin`` should always return a constant iterator","2022-07 (Virtual)","","","" -"`P2286R8 <https://wg21.link/P2286R8>`__","Formatting Ranges","2022-07 (Virtual)","|Complete|","16","" -"`P2291R3 <https://wg21.link/P2291R3>`__","Add Constexpr Modifiers to Functions ``to_chars`` and ``from_chars`` for Integral Types in ``<charconv>`` Header","2022-07 (Virtual)","|Complete|","16","" -"`P2302R4 <https://wg21.link/P2302R4>`__","``std::ranges::contains``","2022-07 (Virtual)","|Complete|","19","" -"`P2322R6 <https://wg21.link/P2322R6>`__","``ranges::fold``","2022-07 (Virtual)","","","" -"`P2374R4 <https://wg21.link/P2374R4>`__","``views::cartesian_product``","2022-07 (Virtual)","","","" -"`P2404R3 <https://wg21.link/P2404R3>`__","Move-only types for ``equality_comparable_with``, ``totally_ordered_with``, and ``three_way_comparable_with``","2022-07 (Virtual)","","","" -"`P2408R5 <https://wg21.link/P2408R5>`__","Ranges iterators as inputs to non-Ranges algorithms","2022-07 (Virtual)","","","" -"`P2417R2 <https://wg21.link/P2417R2>`__","A more ``constexpr`` ``bitset``","2022-07 (Virtual)","|Complete|","16","" -"`P2419R2 <https://wg21.link/P2419R2>`__","Clarify handling of encodings in localized formatting of chrono types","2022-07 (Virtual)","","","" -"`P2438R2 <https://wg21.link/P2438R2>`__","``std::string::substr() &&``","2022-07 (Virtual)","|Complete|","16","" -"`P2445R1 <https://wg21.link/P2445R1>`__","``forward_like``","2022-07 (Virtual)","|Complete|","16","" -"`P2446R2 <https://wg21.link/P2446R2>`__","``views::as_rvalue``","2022-07 (Virtual)","|Complete|","16","" -"`P2460R2 <https://wg21.link/P2460R2>`__","Relax requirements on ``wchar_t`` to match existing practices","2022-07 (Virtual)","|Nothing To Do|","","" -"`P2465R3 <https://wg21.link/P2465R3>`__","Standard Library Modules ``std`` and ``std.compat``","2022-07 (Virtual)","|Complete|","19","" -"`P2467R1 <https://wg21.link/P2467R1>`__","Support exclusive mode for ``fstreams``","2022-07 (Virtual)","|Complete|","18","" -"`P2474R2 <https://wg21.link/P2474R2>`__","``views::repeat``","2022-07 (Virtual)","|Complete|","17","" -"`P2494R2 <https://wg21.link/P2494R2>`__","Relaxing range adaptors to allow for move only types","2022-07 (Virtual)","|Complete|","17","" -"`P2499R0 <https://wg21.link/P2499R0>`__","``string_view`` range constructor should be ``explicit``","2022-07 (Virtual)","|Complete|","16","" -"`P2502R2 <https://wg21.link/P2502R2>`__","``std::generator``: Synchronous Coroutine Generator for Ranges","2022-07 (Virtual)","","","" -"`P2508R1 <https://wg21.link/P2508R1>`__","Exposing ``std::basic-format-string``","2022-07 (Virtual)","|Complete|","15","" -"`P2517R1 <https://wg21.link/P2517R1>`__","Add a conditional ``noexcept`` specification to ``std::apply``","2022-07 (Virtual)","|Complete|","3.9","" -"`P2520R0 <https://wg21.link/P2520R0>`__","``move_iterator`` should be a random access iterator","2022-07 (Virtual)","|Complete|","17","Implemented as a DR in C++20" -"`P2540R1 <https://wg21.link/P2540R1>`__","Empty Product for certain Views","2022-07 (Virtual)","","","" -"`P2549R1 <https://wg21.link/P2549R1>`__","``std::unexpected`` should have ``error()`` as member accessor","2022-07 (Virtual)","|Complete|","16","" -"`P2585R0 <https://wg21.link/P2585R0>`__","Improving default container formatting","2022-07 (Virtual)","|Complete|","17","" -"`P2590R2 <https://wg21.link/P2590R2>`__","Explicit lifetime management","2022-07 (Virtual)","","","" -"`P2599R2 <https://wg21.link/P2599R2>`__","``mdspan::size_type`` should be ``index_type``","2022-07 (Virtual)","|Complete|","18","" -"`P2604R0 <https://wg21.link/P2604R0>`__","mdspan: rename pointer and contiguous","2022-07 (Virtual)","|Complete|","18","" -"`P2613R1 <https://wg21.link/P2613R1>`__","Add the missing ``empty`` to ``mdspan``","2022-07 (Virtual)","|Complete|","18","" +"`P0009R18 <https://wg21.link/P0009R18>`__","mdspan: A Non-Owning Multidimensional Array Reference","2022-07 (Virtual)","|Complete|","18","`#105189 <https://github.com/llvm/llvm-project/issues/105189>`__","" +"`P0429R9 <https://wg21.link/P0429R9>`__","A Standard ``flat_map``","2022-07 (Virtual)","|Complete|","20","`#105190 <https://github.com/llvm/llvm-project/issues/105190>`__","" +"`P1169R4 <https://wg21.link/P1169R4>`__","``static operator()``","2022-07 (Virtual)","|Complete|","16","`#105192 <https://github.com/llvm/llvm-project/issues/105192>`__","" +"`P1222R4 <https://wg21.link/P1222R4>`__","A Standard ``flat_set``","2022-07 (Virtual)","|Complete|","21","`#105193 <https://github.com/llvm/llvm-project/issues/105193>`__","" +"`P1223R5 <https://wg21.link/P1223R5>`__","``ranges::find_last()``, ``ranges::find_last_if()``, and ``ranges::find_last_if_not()``","2022-07 (Virtual)","|Complete|","19","`#105194 <https://github.com/llvm/llvm-project/issues/105194>`__","" +"`P1467R9 <https://wg21.link/P1467R9>`__","Extended ``floating-point`` types and standard names","2022-07 (Virtual)","","","`#105196 <https://github.com/llvm/llvm-project/issues/105196>`__","" +"`P1642R11 <https://wg21.link/P1642R11>`__","Freestanding ``[utilities]``, ``[ranges]``, and ``[iterators]``","2022-07 (Virtual)","","","`#105197 <https://github.com/llvm/llvm-project/issues/105197>`__","" +"`P1899R3 <https://wg21.link/P1899R3>`__","``stride_view``","2022-07 (Virtual)","","","`#105198 <https://github.com/llvm/llvm-project/issues/105198>`__","" +"`P2093R14 <https://wg21.link/P2093R14>`__","Formatted output","2022-07 (Virtual)","|Complete|","18","`#105199 <https://github.com/llvm/llvm-project/issues/105199>`__","" +"`P2165R4 <https://wg21.link/P2165R4>`__","Compatibility between ``tuple``, ``pair`` and ``tuple-like`` objects","2022-07 (Virtual)","|Partial|","","`#105200 <https://github.com/llvm/llvm-project/issues/105200>`__","Only the part for ``zip_view`` is implemented." +"`P2278R4 <https://wg21.link/P2278R4>`__","``cbegin`` should always return a constant iterator","2022-07 (Virtual)","","","`#105201 <https://github.com/llvm/llvm-project/issues/105201>`__","" +"`P2286R8 <https://wg21.link/P2286R8>`__","Formatting Ranges","2022-07 (Virtual)","|Complete|","16","`#105202 <https://github.com/llvm/llvm-project/issues/105202>`__","" +"`P2291R3 <https://wg21.link/P2291R3>`__","Add Constexpr Modifiers to Functions ``to_chars`` and ``from_chars`` for Integral Types in ``<charconv>`` Header","2022-07 (Virtual)","|Complete|","16","`#105204 <https://github.com/llvm/llvm-project/issues/105204>`__","" +"`P2302R4 <https://wg21.link/P2302R4>`__","``std::ranges::contains``","2022-07 (Virtual)","|Complete|","19","`#105206 <https://github.com/llvm/llvm-project/issues/105206>`__","" +"`P2322R6 <https://wg21.link/P2322R6>`__","``ranges::fold``","2022-07 (Virtual)","","","`#105208 <https://github.com/llvm/llvm-project/issues/105208>`__","" +"`P2374R4 <https://wg21.link/P2374R4>`__","``views::cartesian_product``","2022-07 (Virtual)","","","`#105209 <https://github.com/llvm/llvm-project/issues/105209>`__","" +"`P2404R3 <https://wg21.link/P2404R3>`__","Move-only types for ``equality_comparable_with``, ``totally_ordered_with``, and ``three_way_comparable_with``","2022-07 (Virtual)","","","`#105210 <https://github.com/llvm/llvm-project/issues/105210>`__","" +"`P2408R5 <https://wg21.link/P2408R5>`__","Ranges iterators as inputs to non-Ranges algorithms","2022-07 (Virtual)","","","`#105211 <https://github.com/llvm/llvm-project/issues/105211>`__","" +"`P2417R2 <https://wg21.link/P2417R2>`__","A more ``constexpr`` ``bitset``","2022-07 (Virtual)","|Complete|","16","`#105212 <https://github.com/llvm/llvm-project/issues/105212>`__","" +"`P2419R2 <https://wg21.link/P2419R2>`__","Clarify handling of encodings in localized formatting of chrono types","2022-07 (Virtual)","","","`#105213 <https://github.com/llvm/llvm-project/issues/105213>`__","" +"`P2438R2 <https://wg21.link/P2438R2>`__","``std::string::substr() &&``","2022-07 (Virtual)","|Complete|","16","`#105215 <https://github.com/llvm/llvm-project/issues/105215>`__","" +"`P2445R1 <https://wg21.link/P2445R1>`__","``forward_like``","2022-07 (Virtual)","|Complete|","16","`#105216 <https://github.com/llvm/llvm-project/issues/105216>`__","" +"`P2446R2 <https://wg21.link/P2446R2>`__","``views::as_rvalue``","2022-07 (Virtual)","|Complete|","16","`#105217 <https://github.com/llvm/llvm-project/issues/105217>`__","" +"`P2460R2 <https://wg21.link/P2460R2>`__","Relax requirements on ``wchar_t`` to match existing practices","2022-07 (Virtual)","|Nothing To Do|","","`#105218 <https://github.com/llvm/llvm-project/issues/105218>`__","" +"`P2465R3 <https://wg21.link/P2465R3>`__","Standard Library Modules ``std`` and ``std.compat``","2022-07 (Virtual)","|Complete|","19","`#105219 <https://github.com/llvm/llvm-project/issues/105219>`__","" +"`P2467R1 <https://wg21.link/P2467R1>`__","Support exclusive mode for ``fstreams``","2022-07 (Virtual)","|Complete|","18","`#105221 <https://github.com/llvm/llvm-project/issues/105221>`__","" +"`P2474R2 <https://wg21.link/P2474R2>`__","``views::repeat``","2022-07 (Virtual)","|Complete|","17","`#105222 <https://github.com/llvm/llvm-project/issues/105222>`__","" +"`P2494R2 <https://wg21.link/P2494R2>`__","Relaxing range adaptors to allow for move only types","2022-07 (Virtual)","|Complete|","17","`#105224 <https://github.com/llvm/llvm-project/issues/105224>`__","" +"`P2499R0 <https://wg21.link/P2499R0>`__","``string_view`` range constructor should be ``explicit``","2022-07 (Virtual)","|Complete|","16","`#105225 <https://github.com/llvm/llvm-project/issues/105225>`__","" +"`P2502R2 <https://wg21.link/P2502R2>`__","``std::generator``: Synchronous Coroutine Generator for Ranges","2022-07 (Virtual)","","","`#105226 <https://github.com/llvm/llvm-project/issues/105226>`__","" +"`P2508R1 <https://wg21.link/P2508R1>`__","Exposing ``std::basic-format-string``","2022-07 (Virtual)","|Complete|","15","`#105227 <https://github.com/llvm/llvm-project/issues/105227>`__","" +"`P2517R1 <https://wg21.link/P2517R1>`__","Add a conditional ``noexcept`` specification to ``std::apply``","2022-07 (Virtual)","|Complete|","3.9","`#105229 <https://github.com/llvm/llvm-project/issues/105229>`__","" +"`P2520R0 <https://wg21.link/P2520R0>`__","``move_iterator`` should be a random access iterator","2022-07 (Virtual)","|Complete|","17","`#105230 <https://github.com/llvm/llvm-project/issues/105230>`__","Implemented as a DR in C++20" +"`P2540R1 <https://wg21.link/P2540R1>`__","Empty Product for certain Views","2022-07 (Virtual)","","","`#105231 <https://github.com/llvm/llvm-project/issues/105231>`__","" +"`P2549R1 <https://wg21.link/P2549R1>`__","``std::unexpected`` should have ``error()`` as member accessor","2022-07 (Virtual)","|Complete|","16","`#105232 <https://github.com/llvm/llvm-project/issues/105232>`__","" +"`P2585R0 <https://wg21.link/P2585R0>`__","Improving default container formatting","2022-07 (Virtual)","|Complete|","17","`#105233 <https://github.com/llvm/llvm-project/issues/105233>`__","" +"`P2590R2 <https://wg21.link/P2590R2>`__","Explicit lifetime management","2022-07 (Virtual)","","","`#105234 <https://github.com/llvm/llvm-project/issues/105234>`__","" +"`P2599R2 <https://wg21.link/P2599R2>`__","``mdspan::size_type`` should be ``index_type``","2022-07 (Virtual)","|Complete|","18","`#105235 <https://github.com/llvm/llvm-project/issues/105235>`__","" +"`P2604R0 <https://wg21.link/P2604R0>`__","mdspan: rename pointer and contiguous","2022-07 (Virtual)","|Complete|","18","`#105236 <https://github.com/llvm/llvm-project/issues/105236>`__","" +"`P2613R1 <https://wg21.link/P2613R1>`__","Add the missing ``empty`` to ``mdspan``","2022-07 (Virtual)","|Complete|","18","`#105237 <https://github.com/llvm/llvm-project/issues/105237>`__","" "","","","","","" -"`P1202R5 <https://wg21.link/P1202R5>`__","Asymmetric Fences","2022-11 (Kona)","","","" -"`P1264R2 <https://wg21.link/P1264R2>`__","Revising the wording of ``stream`` input operations","2022-11 (Kona)","|Complete|","9","" -"`P1478R8 <https://wg21.link/P1478R8>`__","``Byte-wise`` ``atomic`` ``memcpy``","2022-11 (Kona)","","","" -"`P2167R3 <https://wg21.link/P2167R3>`__","Improved Proposed Wording for LWG 2114","2022-11 (Kona)","|Complete|","20","The `[cmp.alg] <https://eel.is/c++draft/cmp.alg>`__ part is implemented as a DR against C++20. MSVC STL does the same. Other parts are Nothing To Do." -"`P2396R1 <https://wg21.link/P2396R1>`__","Concurrency TS 2 fixes ","2022-11 (Kona)","","","" -"`P2505R5 <https://wg21.link/P2505R5>`__","Monadic Functions for ``std::expected``","2022-11 (Kona)","|Complete|","17","" -"`P2539R4 <https://wg21.link/P2539R4>`__","Should the output of ``std::print`` to a terminal be synchronized with the underlying stream?","2022-11 (Kona)","|Complete|","18","" -"`P2602R2 <https://wg21.link/P2602R2>`__","Poison Pills are Too Toxic","2022-11 (Kona)","|Complete|","19","Implemented as a DR in C++20." -"`P2708R1 <https://wg21.link/P2708R1>`__","No Further Fundamentals TSes","2022-11 (Kona)","|Nothing To Do|","","" +"`P1202R5 <https://wg21.link/P1202R5>`__","Asymmetric Fences","2022-11 (Kona)","","","`#105238 <https://github.com/llvm/llvm-project/issues/105238>`__","" +"`P1264R2 <https://wg21.link/P1264R2>`__","Revising the wording of ``stream`` input operations","2022-11 (Kona)","|Complete|","9","`#105239 <https://github.com/llvm/llvm-project/issues/105239>`__","" +"`P1478R8 <https://wg21.link/P1478R8>`__","``Byte-wise`` ``atomic`` ``memcpy``","2022-11 (Kona)","","","`#105240 <https://github.com/llvm/llvm-project/issues/105240>`__","" +"`P2167R3 <https://wg21.link/P2167R3>`__","Improved Proposed Wording for LWG 2114","2022-11 (Kona)","|Complete|","20","`#105241 <https://github.com/llvm/llvm-project/issues/105241>`__","The `[cmp.alg] <https://eel.is/c++draft/cmp.alg>`__ part is implemented as a DR against C++20. MSVC STL does the same. Other parts are Nothing To Do." +"`P2396R1 <https://wg21.link/P2396R1>`__","Concurrency TS 2 fixes ","2022-11 (Kona)","","","`#105242 <https://github.com/llvm/llvm-project/issues/105242>`__","" +"`P2505R5 <https://wg21.link/P2505R5>`__","Monadic Functions for ``std::expected``","2022-11 (Kona)","|Complete|","17","`#105243 <https://github.com/llvm/llvm-project/issues/105243>`__","" +"`P2539R4 <https://wg21.link/P2539R4>`__","Should the output of ``std::print`` to a terminal be synchronized with the underlying stream?","2022-11 (Kona)","|Complete|","18","`#105245 <https://github.com/llvm/llvm-project/issues/105245>`__","" +"`P2602R2 <https://wg21.link/P2602R2>`__","Poison Pills are Too Toxic","2022-11 (Kona)","|Complete|","19","`#105246 <https://github.com/llvm/llvm-project/issues/105246>`__","Implemented as a DR in C++20." +"`P2708R1 <https://wg21.link/P2708R1>`__","No Further Fundamentals TSes","2022-11 (Kona)","|Nothing To Do|","","`#105247 <https://github.com/llvm/llvm-project/issues/105247>`__","" "","","","","","" -"`P0290R4 <https://wg21.link/P0290R4>`__","``apply()`` for ``synchronized_value<T>``","2023-02 (Issaquah)","","","" -"`P2770R0 <https://wg21.link/P2770R0>`__","Stashing stashing ``iterators`` for proper flattening","2023-02 (Issaquah)","|Complete|","21","" -"`P2164R9 <https://wg21.link/P2164R9>`__","``views::enumerate``","2023-02 (Issaquah)","","","" -"`P2711R1 <https://wg21.link/P2711R1>`__","Making multi-param constructors of ``views`` ``explicit``","2023-02 (Issaquah)","|Complete|","21","" -"`P2609R3 <https://wg21.link/P2609R3>`__","Relaxing Ranges Just A Smidge","2023-02 (Issaquah)","|Complete|","20","Implemented as a DR in C++20. Other implementations will do the same." -"`P2713R1 <https://wg21.link/P2713R1>`__","Escaping improvements in ``std::format``","2023-02 (Issaquah)","|Complete|","19","" -"`P2675R1 <https://wg21.link/P2675R1>`__","``format``'s width estimation is too approximate and not forward compatible","2023-02 (Issaquah)","|Complete|","17","" -"`P2572R1 <https://wg21.link/P2572R1>`__","``std::format`` fill character allowances","2023-02 (Issaquah)","|Complete|","17","" -"`P2693R1 <https://wg21.link/P2693R1>`__","Formatting ``thread::id`` and ``stacktrace``","2023-02 (Issaquah)","|Partial|","","The formatter for ``stacktrace`` is not implemented, since ``stacktrace`` is not implemented yet" -"`P2679R2 <https://wg21.link/P2679R2>`__","Fixing ``std::start_lifetime_as`` for arrays","2023-02 (Issaquah)","","","" -"`P2674R1 <https://wg21.link/P2674R1>`__","A trait for implicit lifetime types","2023-02 (Issaquah)","|Complete|","20","" -"`P2655R3 <https://wg21.link/P2655R3>`__","``common_reference_t`` of ``reference_wrapper`` Should Be a Reference Type","2023-02 (Issaquah)","|Complete|","21","The paper is implemented as a DR to C++20" -"`P2652R2 <https://wg21.link/P2652R2>`__","Disallow User Specialization of ``allocator_traits``","2023-02 (Issaquah)","|Complete|","19","" -"`P2787R1 <https://wg21.link/P2787R1>`__","``pmr::generator`` - Promise Types are not Values","2023-02 (Issaquah)","","","" -"`P2614R2 <https://wg21.link/P2614R2>`__","Deprecate ``numeric_limits::has_denorm``","2023-02 (Issaquah)","|Complete|","18","" -"`P2588R3 <https://wg21.link/P2588R3>`__","``barrier``’s phase completion guarantees","2023-02 (Issaquah)","","","" -"`P2763R1 <https://wg21.link/P2763R1>`__","``layout_stride`` static extents default constructor fix","2023-02 (Issaquah)","","","" -"`P2736R2 <https://wg21.link/P2736R2>`__","Referencing The Unicode Standard","2023-02 (Issaquah)","|Complete|","19","" +"`P0290R4 <https://wg21.link/P0290R4>`__","``apply()`` for ``synchronized_value<T>``","2023-02 (Issaquah)","","","`#105249 <https://github.com/llvm/llvm-project/issues/105249>`__","" +"`P2770R0 <https://wg21.link/P2770R0>`__","Stashing stashing ``iterators`` for proper flattening","2023-02 (Issaquah)","|Complete|","21","`#105250 <https://github.com/llvm/llvm-project/issues/105250>`__","" +"`P2164R9 <https://wg21.link/P2164R9>`__","``views::enumerate``","2023-02 (Issaquah)","","","`#105251 <https://github.com/llvm/llvm-project/issues/105251>`__","" +"`P2711R1 <https://wg21.link/P2711R1>`__","Making multi-param constructors of ``views`` ``explicit``","2023-02 (Issaquah)","|Complete|","21","`#105252 <https://github.com/llvm/llvm-project/issues/105252>`__","" +"`P2609R3 <https://wg21.link/P2609R3>`__","Relaxing Ranges Just A Smidge","2023-02 (Issaquah)","|Complete|","20","`#105253 <https://github.com/llvm/llvm-project/issues/105253>`__","Implemented as a DR in C++20. Other implementations will do the same." +"`P2713R1 <https://wg21.link/P2713R1>`__","Escaping improvements in ``std::format``","2023-02 (Issaquah)","|Complete|","19","`#105254 <https://github.com/llvm/llvm-project/issues/105254>`__","" +"`P2675R1 <https://wg21.link/P2675R1>`__","``format``'s width estimation is too approximate and not forward compatible","2023-02 (Issaquah)","|Complete|","17","`#105255 <https://github.com/llvm/llvm-project/issues/105255>`__","" +"`P2572R1 <https://wg21.link/P2572R1>`__","``std::format`` fill character allowances","2023-02 (Issaquah)","|Complete|","17","`#105256 <https://github.com/llvm/llvm-project/issues/105256>`__","" +"`P2693R1 <https://wg21.link/P2693R1>`__","Formatting ``thread::id`` and ``stacktrace``","2023-02 (Issaquah)","|Partial|","","`#105257 <https://github.com/llvm/llvm-project/issues/105257>`__","The formatter for ``stacktrace`` is not implemented, since ``stacktrace`` is not implemented yet" +"`P2679R2 <https://wg21.link/P2679R2>`__","Fixing ``std::start_lifetime_as`` for arrays","2023-02 (Issaquah)","","","`#105258 <https://github.com/llvm/llvm-project/issues/105258>`__","" +"`P2674R1 <https://wg21.link/P2674R1>`__","A trait for implicit lifetime types","2023-02 (Issaquah)","|Complete|","20","`#105259 <https://github.com/llvm/llvm-project/issues/105259>`__","" +"`P2655R3 <https://wg21.link/P2655R3>`__","``common_reference_t`` of ``reference_wrapper`` Should Be a Reference Type","2023-02 (Issaquah)","|Complete|","21","`#105260 <https://github.com/llvm/llvm-project/issues/105260>`__","The paper is implemented as a DR to C++20" +"`P2652R2 <https://wg21.link/P2652R2>`__","Disallow User Specialization of ``allocator_traits``","2023-02 (Issaquah)","|Complete|","19","`#105262 <https://github.com/llvm/llvm-project/issues/105262>`__","" +"`P2787R1 <https://wg21.link/P2787R1>`__","``pmr::generator`` - Promise Types are not Values","2023-02 (Issaquah)","","","`#105263 <https://github.com/llvm/llvm-project/issues/105263>`__","" +"`P2614R2 <https://wg21.link/P2614R2>`__","Deprecate ``numeric_limits::has_denorm``","2023-02 (Issaquah)","|Complete|","18","`#105264 <https://github.com/llvm/llvm-project/issues/105264>`__","" +"`P2588R3 <https://wg21.link/P2588R3>`__","``barrier``’s phase completion guarantees","2023-02 (Issaquah)","","","`#105265 <https://github.com/llvm/llvm-project/issues/105265>`__","" +"`P2763R1 <https://wg21.link/P2763R1>`__","``layout_stride`` static extents default constructor fix","2023-02 (Issaquah)","","","`#105266 <https://github.com/llvm/llvm-project/issues/105266>`__","" +"`P2736R2 <https://wg21.link/P2736R2>`__","Referencing The Unicode Standard","2023-02 (Issaquah)","|Complete|","19","`#105267 <https://github.com/llvm/llvm-project/issues/105267>`__","" diff --git a/libcxx/docs/Status/Cxx2cIssues.csv b/libcxx/docs/Status/Cxx2cIssues.csv index 082a86a65c85..aaf561982e12 100644 --- a/libcxx/docs/Status/Cxx2cIssues.csv +++ b/libcxx/docs/Status/Cxx2cIssues.csv @@ -1,153 +1,153 @@ "Issue #","Issue Name","Meeting","Status","First released version","Notes" -"`LWG2994 <https://wg21.link/LWG2994>`__","Needless UB for ``basic_string`` and ``basic_string_view``","2023-06 (Varna)","|Complete|","5","" -"`LWG3884 <https://wg21.link/LWG3884>`__","``flat_foo`` is missing allocator-extended copy/move constructors","2023-06 (Varna)","","","" -"`LWG3885 <https://wg21.link/LWG3885>`__","``op`` should be in [zombie.names]","2023-06 (Varna)","|Nothing To Do|","","" -"`LWG3887 <https://wg21.link/LWG3887>`__","Version macro for ``allocate_at_least``","2023-06 (Varna)","|Complete|","19","" -"`LWG3893 <https://wg21.link/LWG3893>`__","LWG 3661 broke ``atomic<shared_ptr<T>> a; a = nullptr;``","2023-06 (Varna)","","","" -"`LWG3894 <https://wg21.link/LWG3894>`__","``generator::promise_type::yield_value(ranges::elements_of<Rng, Alloc>)`` should not be ``noexcept``","2023-06 (Varna)","","","" -"`LWG3903 <https://wg21.link/LWG3903>`__","span destructor is redundantly noexcept","2023-06 (Varna)","|Complete|","7","" -"`LWG3904 <https://wg21.link/LWG3904>`__","``lazy_split_view::outer-iterator``'s const-converting constructor isn't setting ``trailing_empty_``","2023-06 (Varna)","","","" -"`LWG3905 <https://wg21.link/LWG3905>`__","Type of ``std::fexcept_t``","2023-06 (Varna)","|Complete|","3.4","" -"`LWG3912 <https://wg21.link/LWG3912>`__","``enumerate_view::iterator::operator-`` should be ``noexcept``","2023-06 (Varna)","","","" -"`LWG3914 <https://wg21.link/LWG3914>`__","Inconsistent template-head of ``ranges::enumerate_view``","2023-06 (Varna)","","","" -"`LWG3915 <https://wg21.link/LWG3915>`__","Redundant paragraph about expression variations","2023-06 (Varna)","","","" -"`LWG3925 <https://wg21.link/LWG3925>`__","Concept ``formattable``'s definition is incorrect","2023-06 (Varna)","|Complete|","17","" -"`LWG3927 <https://wg21.link/LWG3927>`__","Unclear preconditions for ``operator[]`` for sequence containers","2023-06 (Varna)","|Nothing To Do|","","" -"`LWG3935 <https://wg21.link/LWG3935>`__","``template<class X> constexpr complex& operator=(const complex<X>&)`` has no specification","2023-06 (Varna)","|Complete|","3.4","" -"`LWG3938 <https://wg21.link/LWG3938>`__","Cannot use ``std::expected`` monadic ops with move-only ``error_type``","2023-06 (Varna)","|Complete|","18","" -"`LWG3940 <https://wg21.link/LWG3940>`__","``std::expected<void, E>::value()`` also needs ``E`` to be copy constructible","2023-06 (Varna)","|Complete|","18","" +"`LWG2994 <https://wg21.link/LWG2994>`__","Needless UB for ``basic_string`` and ``basic_string_view``","2023-06 (Varna)","|Complete|","5","`#105268 <https://github.com/llvm/llvm-project/issues/105268>`__","" +"`LWG3884 <https://wg21.link/LWG3884>`__","``flat_foo`` is missing allocator-extended copy/move constructors","2023-06 (Varna)","","","`#105269 <https://github.com/llvm/llvm-project/issues/105269>`__","" +"`LWG3885 <https://wg21.link/LWG3885>`__","``op`` should be in [zombie.names]","2023-06 (Varna)","|Nothing To Do|","","`#105270 <https://github.com/llvm/llvm-project/issues/105270>`__","" +"`LWG3887 <https://wg21.link/LWG3887>`__","Version macro for ``allocate_at_least``","2023-06 (Varna)","|Complete|","19","`#105271 <https://github.com/llvm/llvm-project/issues/105271>`__","" +"`LWG3893 <https://wg21.link/LWG3893>`__","LWG 3661 broke ``atomic<shared_ptr<T>> a; a = nullptr;``","2023-06 (Varna)","","","`#105273 <https://github.com/llvm/llvm-project/issues/105273>`__","" +"`LWG3894 <https://wg21.link/LWG3894>`__","``generator::promise_type::yield_value(ranges::elements_of<Rng, Alloc>)`` should not be ``noexcept``","2023-06 (Varna)","","","`#105274 <https://github.com/llvm/llvm-project/issues/105274>`__","" +"`LWG3903 <https://wg21.link/LWG3903>`__","span destructor is redundantly noexcept","2023-06 (Varna)","|Complete|","7","`#105275 <https://github.com/llvm/llvm-project/issues/105275>`__","" +"`LWG3904 <https://wg21.link/LWG3904>`__","``lazy_split_view::outer-iterator``'s const-converting constructor isn't setting ``trailing_empty_``","2023-06 (Varna)","","","`#105276 <https://github.com/llvm/llvm-project/issues/105276>`__","" +"`LWG3905 <https://wg21.link/LWG3905>`__","Type of ``std::fexcept_t``","2023-06 (Varna)","|Complete|","3.4","`#105277 <https://github.com/llvm/llvm-project/issues/105277>`__","" +"`LWG3912 <https://wg21.link/LWG3912>`__","``enumerate_view::iterator::operator-`` should be ``noexcept``","2023-06 (Varna)","","","`#105279 <https://github.com/llvm/llvm-project/issues/105279>`__","" +"`LWG3914 <https://wg21.link/LWG3914>`__","Inconsistent template-head of ``ranges::enumerate_view``","2023-06 (Varna)","","","`#105280 <https://github.com/llvm/llvm-project/issues/105280>`__","" +"`LWG3915 <https://wg21.link/LWG3915>`__","Redundant paragraph about expression variations","2023-06 (Varna)","","","`#105281 <https://github.com/llvm/llvm-project/issues/105281>`__","" +"`LWG3925 <https://wg21.link/LWG3925>`__","Concept ``formattable``'s definition is incorrect","2023-06 (Varna)","|Complete|","17","`#105282 <https://github.com/llvm/llvm-project/issues/105282>`__","" +"`LWG3927 <https://wg21.link/LWG3927>`__","Unclear preconditions for ``operator[]`` for sequence containers","2023-06 (Varna)","|Nothing To Do|","","`#105283 <https://github.com/llvm/llvm-project/issues/105283>`__","" +"`LWG3935 <https://wg21.link/LWG3935>`__","``template<class X> constexpr complex& operator=(const complex<X>&)`` has no specification","2023-06 (Varna)","|Complete|","3.4","`#105284 <https://github.com/llvm/llvm-project/issues/105284>`__","" +"`LWG3938 <https://wg21.link/LWG3938>`__","Cannot use ``std::expected`` monadic ops with move-only ``error_type``","2023-06 (Varna)","|Complete|","18","`#105285 <https://github.com/llvm/llvm-project/issues/105285>`__","" +"`LWG3940 <https://wg21.link/LWG3940>`__","``std::expected<void, E>::value()`` also needs ``E`` to be copy constructible","2023-06 (Varna)","|Complete|","18","`#105286 <https://github.com/llvm/llvm-project/issues/105286>`__","" "","","","","","" -"`LWG2392 <https://wg21.link/LWG2392>`__","""character type"" is used but not defined","2023-11 (Kona)","","","" -"`LWG3203 <https://wg21.link/LWG3203>`__","``span`` element access invalidation","2023-11 (Kona)","|Nothing To Do|","","" -"`LWG3305 <https://wg21.link/LWG3305>`__","``any_cast<void>``","2023-11 (Kona)","|Complete|","18","" -"`LWG3431 <https://wg21.link/LWG3431>`__","``<=>`` for containers should require ``three_way_comparable<T>`` instead of ``<=>``","2023-11 (Kona)","","","" -"`LWG3749 <https://wg21.link/LWG3749>`__","``common_iterator`` should handle integer-class difference types","2023-11 (Kona)","","","" -"`LWG3809 <https://wg21.link/LWG3809>`__","Is ``std::subtract_with_carry_engine<uint16_t>`` supposed to work","2023-11 (Kona)","","","" -"`LWG3892 <https://wg21.link/LWG3892>`__","Incorrect formatting of nested ranges and tuples","2023-11 (Kona)","|Complete|","17","" -"`LWG3897 <https://wg21.link/LWG3897>`__","``inout_ptr`` will not update raw pointer to 0","2023-11 (Kona)","|Complete|","19","" -"`LWG3946 <https://wg21.link/LWG3946>`__","The definition of ``const_iterator_t`` should be reworked","2023-11 (Kona)","","","" -"`LWG3947 <https://wg21.link/LWG3947>`__","Unexpected constraints on ``adjacent_transform_view::base()``","2023-11 (Kona)","","","" -"`LWG3948 <https://wg21.link/LWG3948>`__","``possibly-const-range and as-const-pointer`` should be ``noexcept``","2023-11 (Kona)","","","" -"`LWG3949 <https://wg21.link/LWG3949>`__","``std::atomic<bool>``'s trivial destructor dropped in C++17 spec wording","2023-11 (Kona)","","","" -"`LWG3951 <https://wg21.link/LWG3951>`__","[expected.object.swap]: Using ``value()`` instead of ``has_value()``","2023-11 (Kona)","|Complete|","16","" -"`LWG3953 <https://wg21.link/LWG3953>`__","``iter_move`` for ``common_iterator`` and ``counted_iterator`` should return ``decltype(auto)``","2023-11 (Kona)","|Complete|","20","" -"`LWG3957 <https://wg21.link/LWG3957>`__","[container.alloc.reqmts] The value category of v should be claimed","2023-11 (Kona)","","","" -"`LWG3965 <https://wg21.link/LWG3965>`__","Incorrect example in [format.string.escaped] p3 for formatting of combining characters","2023-11 (Kona)","|Complete|","19","" -"`LWG3970 <https://wg21.link/LWG3970>`__","[mdspan.syn] Missing definition of ``full_extent_t`` and ``full_extent``","2023-11 (Kona)","","","" -"`LWG3973 <https://wg21.link/LWG3973>`__","Monadic operations should be ADL-proof","2023-11 (Kona)","","","" -"`LWG3974 <https://wg21.link/LWG3974>`__","``mdspan::operator[]`` should not copy ``OtherIndexTypes``","2023-11 (Kona)","","","" -"`LWG3987 <https://wg21.link/LWG3987>`__","Including `<flat_foo>` doesn't provide `std::begin`/`end`","2023-11 (Kona)","|Complete|","","" -"`LWG3990 <https://wg21.link/LWG3990>`__","Program-defined specializations of ``std::tuple`` and ``std::variant`` can't be properly supported","2023-11 (Kona)","|Complete|","21","" -"`LWG4001 <https://wg21.link/LWG4001>`__","``iota_view`` should provide ``empty``","2023-11 (Kona)","|Complete|","19","" +"`LWG2392 <https://wg21.link/LWG2392>`__","""character type"" is used but not defined","2023-11 (Kona)","","","`#105287 <https://github.com/llvm/llvm-project/issues/105287>`__","" +"`LWG3203 <https://wg21.link/LWG3203>`__","``span`` element access invalidation","2023-11 (Kona)","|Nothing To Do|","","`#105288 <https://github.com/llvm/llvm-project/issues/105288>`__","" +"`LWG3305 <https://wg21.link/LWG3305>`__","``any_cast<void>``","2023-11 (Kona)","|Complete|","18","`#105289 <https://github.com/llvm/llvm-project/issues/105289>`__","" +"`LWG3431 <https://wg21.link/LWG3431>`__","``<=>`` for containers should require ``three_way_comparable<T>`` instead of ``<=>``","2023-11 (Kona)","","","`#105290 <https://github.com/llvm/llvm-project/issues/105290>`__","" +"`LWG3749 <https://wg21.link/LWG3749>`__","``common_iterator`` should handle integer-class difference types","2023-11 (Kona)","","","`#105291 <https://github.com/llvm/llvm-project/issues/105291>`__","" +"`LWG3809 <https://wg21.link/LWG3809>`__","Is ``std::subtract_with_carry_engine<uint16_t>`` supposed to work","2023-11 (Kona)","","","`#105295 <https://github.com/llvm/llvm-project/issues/105295>`__","" +"`LWG3892 <https://wg21.link/LWG3892>`__","Incorrect formatting of nested ranges and tuples","2023-11 (Kona)","|Complete|","17","`#105296 <https://github.com/llvm/llvm-project/issues/105296>`__","" +"`LWG3897 <https://wg21.link/LWG3897>`__","``inout_ptr`` will not update raw pointer to 0","2023-11 (Kona)","|Complete|","19","`#105297 <https://github.com/llvm/llvm-project/issues/105297>`__","" +"`LWG3946 <https://wg21.link/LWG3946>`__","The definition of ``const_iterator_t`` should be reworked","2023-11 (Kona)","","","`#105298 <https://github.com/llvm/llvm-project/issues/105298>`__","" +"`LWG3947 <https://wg21.link/LWG3947>`__","Unexpected constraints on ``adjacent_transform_view::base()``","2023-11 (Kona)","","","`#105299 <https://github.com/llvm/llvm-project/issues/105299>`__","" +"`LWG3948 <https://wg21.link/LWG3948>`__","``possibly-const-range and as-const-pointer`` should be ``noexcept``","2023-11 (Kona)","","","`#105300 <https://github.com/llvm/llvm-project/issues/105300>`__","" +"`LWG3949 <https://wg21.link/LWG3949>`__","``std::atomic<bool>``'s trivial destructor dropped in C++17 spec wording","2023-11 (Kona)","","","`#105301 <https://github.com/llvm/llvm-project/issues/105301>`__","" +"`LWG3951 <https://wg21.link/LWG3951>`__","[expected.object.swap]: Using ``value()`` instead of ``has_value()``","2023-11 (Kona)","|Complete|","16","`#105302 <https://github.com/llvm/llvm-project/issues/105302>`__","" +"`LWG3953 <https://wg21.link/LWG3953>`__","``iter_move`` for ``common_iterator`` and ``counted_iterator`` should return ``decltype(auto)``","2023-11 (Kona)","|Complete|","20","`#105303 <https://github.com/llvm/llvm-project/issues/105303>`__","" +"`LWG3957 <https://wg21.link/LWG3957>`__","[container.alloc.reqmts] The value category of v should be claimed","2023-11 (Kona)","","","`#105304 <https://github.com/llvm/llvm-project/issues/105304>`__","" +"`LWG3965 <https://wg21.link/LWG3965>`__","Incorrect example in [format.string.escaped] p3 for formatting of combining characters","2023-11 (Kona)","|Complete|","19","`#105305 <https://github.com/llvm/llvm-project/issues/105305>`__","" +"`LWG3970 <https://wg21.link/LWG3970>`__","[mdspan.syn] Missing definition of ``full_extent_t`` and ``full_extent``","2023-11 (Kona)","","","`#105306 <https://github.com/llvm/llvm-project/issues/105306>`__","" +"`LWG3973 <https://wg21.link/LWG3973>`__","Monadic operations should be ADL-proof","2023-11 (Kona)","","","`#105307 <https://github.com/llvm/llvm-project/issues/105307>`__","" +"`LWG3974 <https://wg21.link/LWG3974>`__","``mdspan::operator[]`` should not copy ``OtherIndexTypes``","2023-11 (Kona)","","","`#105308 <https://github.com/llvm/llvm-project/issues/105308>`__","" +"`LWG3987 <https://wg21.link/LWG3987>`__","Including `<flat_foo>` doesn't provide `std::begin`/`end`","2023-11 (Kona)","|Complete|","","`#105309 <https://github.com/llvm/llvm-project/issues/105309>`__","" +"`LWG3990 <https://wg21.link/LWG3990>`__","Program-defined specializations of ``std::tuple`` and ``std::variant`` can't be properly supported","2023-11 (Kona)","|Complete|","21","`#105310 <https://github.com/llvm/llvm-project/issues/105310>`__","" +"`LWG4001 <https://wg21.link/LWG4001>`__","``iota_view`` should provide ``empty``","2023-11 (Kona)","|Complete|","19","`#105311 <https://github.com/llvm/llvm-project/issues/105311>`__","" "","","","","","" -"`LWG3767 <https://wg21.link/LWG3767>`__","``codecvt<charN_t, char8_t, mbstate_t>`` incorrectly added to locale","2024-03 (Tokyo)","","","" -"`LWG3919 <https://wg21.link/LWG3919>`__","``enumerate_view`` may invoke UB for sized common non-forward underlying ranges","2024-03 (Tokyo)","","","" -"`LWG3950 <https://wg21.link/LWG3950>`__","``std::basic_string_view`` comparison operators are overspecified","2024-03 (Tokyo)","|Complete|","18","" -"`LWG3975 <https://wg21.link/LWG3975>`__","Specializations of ``basic_format_context`` should not be permitted","2024-03 (Tokyo)","|Nothing To Do|","","" -"`LWG3984 <https://wg21.link/LWG3984>`__","``ranges::to``'s recursion branch may be ill-formed","2024-03 (Tokyo)","|Complete|","19","" -"`LWG4011 <https://wg21.link/LWG4011>`__","""`Effects`: Equivalent to return"" in ``[span.elem]``","2024-03 (Tokyo)","|Nothing To Do|","","" -"`LWG4012 <https://wg21.link/LWG4012>`__","``common_view::begin/end`` are missing the ``simple-view`` check","2024-03 (Tokyo)","","","" -"`LWG4013 <https://wg21.link/LWG4013>`__","``lazy_split_view::outer-iterator::value_type`` should not provide default constructor","2024-03 (Tokyo)","","","" -"`LWG4016 <https://wg21.link/LWG4016>`__","container-insertable checks do not match what container-inserter does","2024-03 (Tokyo)","|Complete|","20","" -"`LWG4023 <https://wg21.link/LWG4023>`__","Preconditions of ``std::basic_streambuf::setg/setp``","2024-03 (Tokyo)","|Complete|","19","" -"`LWG4025 <https://wg21.link/LWG4025>`__","Move assignment operator of ``std::expected<cv void, E>`` should not be conditionally deleted","2024-03 (Tokyo)","|Complete|","20","" -"`LWG4030 <https://wg21.link/LWG4030>`__","Clarify whether arithmetic expressions in ``[numeric.sat.func]`` are mathematical or C++","2024-03 (Tokyo)","|Nothing To Do|","","" -"`LWG4031 <https://wg21.link/LWG4031>`__","``bad_expected_access<void>`` member functions should be ``noexcept``","2024-03 (Tokyo)","|Complete|","16","" -"`LWG4035 <https://wg21.link/LWG4035>`__","``single_view`` should provide ``empty``","2024-03 (Tokyo)","|Complete|","19","" -"`LWG4036 <https://wg21.link/LWG4036>`__","``__alignof_is_defined`` is only implicitly specified in C++ and not yet deprecated","2024-03 (Tokyo)","","","" -"`LWG4037 <https://wg21.link/LWG4037>`__","Static data members of ``ctype_base`` are not yet required to be usable in constant expressions","2024-03 (Tokyo)","","","" -"`LWG4038 <https://wg21.link/LWG4038>`__","``std::text_encoding::aliases_view`` should have constexpr iterators","2024-03 (Tokyo)","","","" -"`LWG4043 <https://wg21.link/LWG4043>`__","""ASCII"" is not a registered character encoding","2024-03 (Tokyo)","|Nothing To Do|","","" -"`LWG4045 <https://wg21.link/LWG4045>`__","``tuple`` can create dangling references from ``tuple-like``","2024-03 (Tokyo)","","","" -"`LWG4053 <https://wg21.link/LWG4053>`__","Unary call to ``std::views::repeat`` does not decay the argument","2024-03 (Tokyo)","|Complete|","19","" -"`LWG4054 <https://wg21.link/LWG4054>`__","Repeating a ``repeat_view`` should repeat the view","2024-03 (Tokyo)","|Complete|","19","" +"`LWG3767 <https://wg21.link/LWG3767>`__","``codecvt<charN_t, char8_t, mbstate_t>`` incorrectly added to locale","2024-03 (Tokyo)","","","`#105313 <https://github.com/llvm/llvm-project/issues/105313>`__","" +"`LWG3919 <https://wg21.link/LWG3919>`__","``enumerate_view`` may invoke UB for sized common non-forward underlying ranges","2024-03 (Tokyo)","","","`#105315 <https://github.com/llvm/llvm-project/issues/105315>`__","" +"`LWG3950 <https://wg21.link/LWG3950>`__","``std::basic_string_view`` comparison operators are overspecified","2024-03 (Tokyo)","|Complete|","18","`#105316 <https://github.com/llvm/llvm-project/issues/105316>`__","" +"`LWG3975 <https://wg21.link/LWG3975>`__","Specializations of ``basic_format_context`` should not be permitted","2024-03 (Tokyo)","|Nothing To Do|","","`#105317 <https://github.com/llvm/llvm-project/issues/105317>`__","" +"`LWG3984 <https://wg21.link/LWG3984>`__","``ranges::to``'s recursion branch may be ill-formed","2024-03 (Tokyo)","|Complete|","19","`#105318 <https://github.com/llvm/llvm-project/issues/105318>`__","" +"`LWG4011 <https://wg21.link/LWG4011>`__","""`Effects`: Equivalent to return"" in ``[span.elem]``","2024-03 (Tokyo)","|Nothing To Do|","","`#105319 <https://github.com/llvm/llvm-project/issues/105319>`__","" +"`LWG4012 <https://wg21.link/LWG4012>`__","``common_view::begin/end`` are missing the ``simple-view`` check","2024-03 (Tokyo)","","","`#105320 <https://github.com/llvm/llvm-project/issues/105320>`__","" +"`LWG4013 <https://wg21.link/LWG4013>`__","``lazy_split_view::outer-iterator::value_type`` should not provide default constructor","2024-03 (Tokyo)","","","`#105321 <https://github.com/llvm/llvm-project/issues/105321>`__","" +"`LWG4016 <https://wg21.link/LWG4016>`__","container-insertable checks do not match what container-inserter does","2024-03 (Tokyo)","|Complete|","20","`#105322 <https://github.com/llvm/llvm-project/issues/105322>`__","" +"`LWG4023 <https://wg21.link/LWG4023>`__","Preconditions of ``std::basic_streambuf::setg/setp``","2024-03 (Tokyo)","|Complete|","19","`#105323 <https://github.com/llvm/llvm-project/issues/105323>`__","" +"`LWG4025 <https://wg21.link/LWG4025>`__","Move assignment operator of ``std::expected<cv void, E>`` should not be conditionally deleted","2024-03 (Tokyo)","|Complete|","20","`#105324 <https://github.com/llvm/llvm-project/issues/105324>`__","" +"`LWG4030 <https://wg21.link/LWG4030>`__","Clarify whether arithmetic expressions in ``[numeric.sat.func]`` are mathematical or C++","2024-03 (Tokyo)","|Nothing To Do|","","`#105325 <https://github.com/llvm/llvm-project/issues/105325>`__","" +"`LWG4031 <https://wg21.link/LWG4031>`__","``bad_expected_access<void>`` member functions should be ``noexcept``","2024-03 (Tokyo)","|Complete|","16","`#105326 <https://github.com/llvm/llvm-project/issues/105326>`__","" +"`LWG4035 <https://wg21.link/LWG4035>`__","``single_view`` should provide ``empty``","2024-03 (Tokyo)","|Complete|","19","`#105328 <https://github.com/llvm/llvm-project/issues/105328>`__","" +"`LWG4036 <https://wg21.link/LWG4036>`__","``__alignof_is_defined`` is only implicitly specified in C++ and not yet deprecated","2024-03 (Tokyo)","","","`#105329 <https://github.com/llvm/llvm-project/issues/105329>`__","" +"`LWG4037 <https://wg21.link/LWG4037>`__","Static data members of ``ctype_base`` are not yet required to be usable in constant expressions","2024-03 (Tokyo)","","","`#105330 <https://github.com/llvm/llvm-project/issues/105330>`__","" +"`LWG4038 <https://wg21.link/LWG4038>`__","``std::text_encoding::aliases_view`` should have constexpr iterators","2024-03 (Tokyo)","","","`#105332 <https://github.com/llvm/llvm-project/issues/105332>`__","" +"`LWG4043 <https://wg21.link/LWG4043>`__","""ASCII"" is not a registered character encoding","2024-03 (Tokyo)","|Nothing To Do|","","`#105335 <https://github.com/llvm/llvm-project/issues/105335>`__","" +"`LWG4045 <https://wg21.link/LWG4045>`__","``tuple`` can create dangling references from ``tuple-like``","2024-03 (Tokyo)","","","`#105337 <https://github.com/llvm/llvm-project/issues/105337>`__","" +"`LWG4053 <https://wg21.link/LWG4053>`__","Unary call to ``std::views::repeat`` does not decay the argument","2024-03 (Tokyo)","|Complete|","19","`#105338 <https://github.com/llvm/llvm-project/issues/105338>`__","" +"`LWG4054 <https://wg21.link/LWG4054>`__","Repeating a ``repeat_view`` should repeat the view","2024-03 (Tokyo)","|Complete|","19","`#105340 <https://github.com/llvm/llvm-project/issues/105340>`__","" "","","","","","" -"`LWG3944 <https://wg21.link/LWG3944>`__","Formatters converting sequences of ``char`` to sequences of ``wchar_t``","2024-06 (St. Louis)","|Complete|","21","" -"`LWG4060 <https://wg21.link/LWG4060>`__","``submdspan`` preconditions do not forbid creating invalid pointer","2024-06 (St. Louis)","","","" -"`LWG4061 <https://wg21.link/LWG4061>`__","Should ``std::basic_format_context`` be default-constructible/copyable/movable?","2024-06 (St. Louis)","|Complete|","19","" -"`LWG4071 <https://wg21.link/LWG4071>`__","``reference_wrapper`` comparisons are not SFINAE-friendly","2024-06 (St. Louis)","|Complete|","19","" -"`LWG4074 <https://wg21.link/LWG4074>`__","``compatible-joinable-ranges`` is underconstrained","2024-06 (St. Louis)","|Complete|","21","" -"`LWG4076 <https://wg21.link/LWG4076>`__","``concat_view`` should be freestanding","2024-06 (St. Louis)","","","" -"`LWG4079 <https://wg21.link/LWG4079>`__","Missing Preconditions in ``concat_view::iterator``\`s conversion constructor","2024-06 (St. Louis)","","","" -"`LWG4082 <https://wg21.link/LWG4082>`__","``views::concat(r)`` is well-formed when ``r`` is an ``output_range``","2024-06 (St. Louis)","","","" -"`LWG4083 <https://wg21.link/LWG4083>`__","``views::as_rvalue`` should reject non-input ranges","2024-06 (St. Louis)","","","" -"`LWG4096 <https://wg21.link/LWG4096>`__","``views::iota(views::iota(0))`` should be rejected","2024-06 (St. Louis)","|Complete|","22","" -"`LWG4098 <https://wg21.link/LWG4098>`__","``views::adjacent<0>`` should reject non-forward ranges","2024-06 (St. Louis)","","","" -"`LWG4105 <https://wg21.link/LWG4105>`__","``ranges::ends_with``\`s Returns misses difference casting","2024-06 (St. Louis)","","","" -"`LWG4106 <https://wg21.link/LWG4106>`__","``basic_format_args`` should not be default-constructible","2024-06 (St. Louis)","|Complete|","19","" +"`LWG3944 <https://wg21.link/LWG3944>`__","Formatters converting sequences of ``char`` to sequences of ``wchar_t``","2024-06 (St. Louis)","|Complete|","21","`#105342 <https://github.com/llvm/llvm-project/issues/105342>`__","" +"`LWG4060 <https://wg21.link/LWG4060>`__","``submdspan`` preconditions do not forbid creating invalid pointer","2024-06 (St. Louis)","","","`#105343 <https://github.com/llvm/llvm-project/issues/105343>`__","" +"`LWG4061 <https://wg21.link/LWG4061>`__","Should ``std::basic_format_context`` be default-constructible/copyable/movable?","2024-06 (St. Louis)","|Complete|","19","`#105344 <https://github.com/llvm/llvm-project/issues/105344>`__","" +"`LWG4071 <https://wg21.link/LWG4071>`__","``reference_wrapper`` comparisons are not SFINAE-friendly","2024-06 (St. Louis)","|Complete|","19","`#105345 <https://github.com/llvm/llvm-project/issues/105345>`__","" +"`LWG4074 <https://wg21.link/LWG4074>`__","``compatible-joinable-ranges`` is underconstrained","2024-06 (St. Louis)","|Complete|","21","`#105346 <https://github.com/llvm/llvm-project/issues/105346>`__","" +"`LWG4076 <https://wg21.link/LWG4076>`__","``concat_view`` should be freestanding","2024-06 (St. Louis)","","","`#105347 <https://github.com/llvm/llvm-project/issues/105347>`__","" +"`LWG4079 <https://wg21.link/LWG4079>`__","Missing Preconditions in ``concat_view::iterator``\`s conversion constructor","2024-06 (St. Louis)","","","`#105348 <https://github.com/llvm/llvm-project/issues/105348>`__","" +"`LWG4082 <https://wg21.link/LWG4082>`__","``views::concat(r)`` is well-formed when ``r`` is an ``output_range``","2024-06 (St. Louis)","","","`#105349 <https://github.com/llvm/llvm-project/issues/105349>`__","" +"`LWG4083 <https://wg21.link/LWG4083>`__","``views::as_rvalue`` should reject non-input ranges","2024-06 (St. Louis)","|Complete|","22","`#105351 <https://github.com/llvm/llvm-project/issues/105351>`__","" +"`LWG4096 <https://wg21.link/LWG4096>`__","``views::iota(views::iota(0))`` should be rejected","2024-06 (St. Louis)","|Complete|","22","`#105352 <https://github.com/llvm/llvm-project/issues/105352>`__","" +"`LWG4098 <https://wg21.link/LWG4098>`__","``views::adjacent<0>`` should reject non-forward ranges","2024-06 (St. Louis)","","","`#105353 <https://github.com/llvm/llvm-project/issues/105353>`__","" +"`LWG4105 <https://wg21.link/LWG4105>`__","``ranges::ends_with``\`s Returns misses difference casting","2024-06 (St. Louis)","","","`#105354 <https://github.com/llvm/llvm-project/issues/105354>`__","" +"`LWG4106 <https://wg21.link/LWG4106>`__","``basic_format_args`` should not be default-constructible","2024-06 (St. Louis)","|Complete|","19","`#105355 <https://github.com/llvm/llvm-project/issues/105355>`__","" "","","","","","" -"`LWG3216 <https://wg21.link/LWG3216>`__","Rebinding the allocator before calling ``construct``/``destroy`` in ``allocate_shared``","2024-11 (Wrocław)","","","" -"`LWG3436 <https://wg21.link/LWG3436>`__","``std::construct_at`` should support arrays","2024-11 (Wrocław)","","","" -"`LWG3886 <https://wg21.link/LWG3886>`__","Monad mo' problems","2024-11 (Wrocław)","","","" -"`LWG3899 <https://wg21.link/LWG3899>`__","``co_yield``\ing elements of an lvalue generator is unnecessarily inefficient","2024-11 (Wrocław)","","","" -"`LWG3900 <https://wg21.link/LWG3900>`__","The ``allocator_arg_t`` overloads of ``generator::promise_type::operator new`` should not be constrained","2024-11 (Wrocław)","","","" -"`LWG3918 <https://wg21.link/LWG3918>`__","``std::uninitialized_move/_n`` and guaranteed copy elision","2024-11 (Wrocław)","","","" -"`LWG4014 <https://wg21.link/LWG4014>`__","LWG 3809 changes behavior of some existing ``std::subtract_with_carry_engine code``","2024-11 (Wrocław)","","","" -"`LWG4024 <https://wg21.link/LWG4024>`__","Underspecified destruction of objects created in ``std::make_shared_for_overwrite``/``std::allocate_shared_for_overwrite``","2024-11 (Wrocław)","|Complete|","16","" -"`LWG4027 <https://wg21.link/LWG4027>`__","``possibly-const-range`` should prefer returning ``const R&``","2024-11 (Wrocław)","","","" -"`LWG4044 <https://wg21.link/LWG4044>`__","Confusing requirements for ``std::print`` on POSIX platforms","2024-11 (Wrocław)","","","" -"`LWG4064 <https://wg21.link/LWG4064>`__","Clarify that ``std::launder`` is not needed when using the result of ``std::memcpy``","2024-11 (Wrocław)","","","" -"`LWG4072 <https://wg21.link/LWG4072>`__","``std::optional`` comparisons: constrain harder","2024-11 (Wrocław)","","","" -"`LWG4084 <https://wg21.link/LWG4084>`__","``std::fixed`` ignores ``std::uppercase``","2024-11 (Wrocław)","","","" -"`LWG4085 <https://wg21.link/LWG4085>`__","``ranges::generate_random``'s helper lambda should specify the return type","2024-11 (Wrocław)","","","" -"`LWG4088 <https://wg21.link/LWG4088>`__","``println`` ignores the locale imbued in ``std::ostream``","2024-11 (Wrocław)","|Complete|","18","" -"`LWG4112 <https://wg21.link/LWG4112>`__","``has-arrow`` should required ``operator->()`` to be ``const``-qualified","2024-11 (Wrocław)","","","" -"`LWG4113 <https://wg21.link/LWG4113>`__","Disallow ``has_unique_object_representations<Incomplete[]>``","2024-11 (Wrocław)","|Complete|","","" -"`LWG4119 <https://wg21.link/LWG4119>`__","``generator::promise_type::yield_value(ranges::elements_of<R, Alloc>)``'s nested ``generator`` may be ill-formed","2024-11 (Wrocław)","","","" -"`LWG4124 <https://wg21.link/LWG4124>`__","Cannot format ``zoned_time`` with resolution coarser than ``seconds``","2024-11 (Wrocław)","","","" -"`LWG4126 <https://wg21.link/LWG4126>`__","Some feature-test macros for fully freestanding features are not yet marked freestanding","2024-11 (Wrocław)","","","" -"`LWG4134 <https://wg21.link/LWG4134>`__","Issue with Philox algorithm specification","2024-11 (Wrocław)","","","" -"`LWG4135 <https://wg21.link/LWG4135>`__","The helper lambda of ``std::erase`` for list should specify return type as ``bool``","2024-11 (Wrocław)","|Complete|","21","" -"`LWG4140 <https://wg21.link/LWG4140>`__","Useless default constructors for bit reference types","2024-11 (Wrocław)","|Complete|","","" -"`LWG4141 <https://wg21.link/LWG4141>`__","Improve prohibitions on ""additional storage""","2024-11 (Wrocław)","","","" -"`LWG4142 <https://wg21.link/LWG4142>`__","``format_parse_context::check_dynamic_spec`` should require at least one type","2024-11 (Wrocław)","","","" -"`LWG4144 <https://wg21.link/LWG4144>`__","Disallow ``unique_ptr<T&, D>``","2024-11 (Wrocław)","","","" -"`LWG4147 <https://wg21.link/LWG4147>`__","Precondition on ``inplace_vector::emplace``","2024-11 (Wrocław)","","","" -"`LWG4148 <https://wg21.link/LWG4148>`__","``unique_ptr::operator*`` should not allow dangling references","2024-11 (Wrocław)","","","" -"`LWG4153 <https://wg21.link/LWG4153>`__","Fix extra ""-1"" for ``philox_engine::max()``","2024-11 (Wrocław)","","","" -"`LWG4154 <https://wg21.link/LWG4154>`__","The Mandates for ``std::packaged_task``'s constructor from a callable entity should consider decaying","2024-11 (Wrocław)","","","" -"`LWG4157 <https://wg21.link/LWG4157>`__","The resolution of LWG3465 was damaged by P2167R3","2024-11 (Wrocław)","|Complete|","20","" -"`LWG4164 <https://wg21.link/LWG4164>`__","Missing guarantees for ``forward_list`` modifiers","2024-11 (Wrocław)","|Complete|","21","" -"`LWG4169 <https://wg21.link/LWG4169>`__","``std::atomic<T>``'s default constructor should be constrained","2024-11 (Wrocław)","","","" -"`LWG4170 <https://wg21.link/LWG4170>`__","``contiguous_iterator`` should require ``to_address(I{})``","2024-11 (Wrocław)","","","" +"`LWG3216 <https://wg21.link/LWG3216>`__","Rebinding the allocator before calling ``construct``/``destroy`` in ``allocate_shared``","2024-11 (Wrocław)","","","`#118332 <https://github.com/llvm/llvm-project/issues/118332>`__","" +"`LWG3436 <https://wg21.link/LWG3436>`__","``std::construct_at`` should support arrays","2024-11 (Wrocław)","","","`#118335 <https://github.com/llvm/llvm-project/issues/118335>`__","" +"`LWG3886 <https://wg21.link/LWG3886>`__","Monad mo' problems","2024-11 (Wrocław)","","","`#118336 <https://github.com/llvm/llvm-project/issues/118336>`__","" +"`LWG3899 <https://wg21.link/LWG3899>`__","``co_yield``\ing elements of an lvalue generator is unnecessarily inefficient","2024-11 (Wrocław)","","","`#118337 <https://github.com/llvm/llvm-project/issues/118337>`__","" +"`LWG3900 <https://wg21.link/LWG3900>`__","The ``allocator_arg_t`` overloads of ``generator::promise_type::operator new`` should not be constrained","2024-11 (Wrocław)","","","`#118338 <https://github.com/llvm/llvm-project/issues/118338>`__","" +"`LWG3918 <https://wg21.link/LWG3918>`__","``std::uninitialized_move/_n`` and guaranteed copy elision","2024-11 (Wrocław)","","","`#118339 <https://github.com/llvm/llvm-project/issues/118339>`__","" +"`LWG4014 <https://wg21.link/LWG4014>`__","LWG 3809 changes behavior of some existing ``std::subtract_with_carry_engine code``","2024-11 (Wrocław)","","","`#118340 <https://github.com/llvm/llvm-project/issues/118340>`__","" +"`LWG4024 <https://wg21.link/LWG4024>`__","Underspecified destruction of objects created in ``std::make_shared_for_overwrite``/``std::allocate_shared_for_overwrite``","2024-11 (Wrocław)","|Complete|","16","`#118341 <https://github.com/llvm/llvm-project/issues/118341>`__","" +"`LWG4027 <https://wg21.link/LWG4027>`__","``possibly-const-range`` should prefer returning ``const R&``","2024-11 (Wrocław)","","","`#118342 <https://github.com/llvm/llvm-project/issues/118342>`__","" +"`LWG4044 <https://wg21.link/LWG4044>`__","Confusing requirements for ``std::print`` on POSIX platforms","2024-11 (Wrocław)","","","`#118343 <https://github.com/llvm/llvm-project/issues/118343>`__","" +"`LWG4064 <https://wg21.link/LWG4064>`__","Clarify that ``std::launder`` is not needed when using the result of ``std::memcpy``","2024-11 (Wrocław)","","","`#118344 <https://github.com/llvm/llvm-project/issues/118344>`__","" +"`LWG4072 <https://wg21.link/LWG4072>`__","``std::optional`` comparisons: constrain harder","2024-11 (Wrocław)","","","`#118345 <https://github.com/llvm/llvm-project/issues/118345>`__","" +"`LWG4084 <https://wg21.link/LWG4084>`__","``std::fixed`` ignores ``std::uppercase``","2024-11 (Wrocław)","","","`#118346 <https://github.com/llvm/llvm-project/issues/118346>`__","" +"`LWG4085 <https://wg21.link/LWG4085>`__","``ranges::generate_random``'s helper lambda should specify the return type","2024-11 (Wrocław)","","","`#118347 <https://github.com/llvm/llvm-project/issues/118347>`__","" +"`LWG4088 <https://wg21.link/LWG4088>`__","``println`` ignores the locale imbued in ``std::ostream``","2024-11 (Wrocław)","|Complete|","18","`#118348 <https://github.com/llvm/llvm-project/issues/118348>`__","" +"`LWG4112 <https://wg21.link/LWG4112>`__","``has-arrow`` should required ``operator->()`` to be ``const``-qualified","2024-11 (Wrocław)","","","`#118349 <https://github.com/llvm/llvm-project/issues/118349>`__","" +"`LWG4113 <https://wg21.link/LWG4113>`__","Disallow ``has_unique_object_representations<Incomplete[]>``","2024-11 (Wrocław)","|Complete|","","`#118350 <https://github.com/llvm/llvm-project/issues/118350>`__","" +"`LWG4119 <https://wg21.link/LWG4119>`__","``generator::promise_type::yield_value(ranges::elements_of<R, Alloc>)``'s nested ``generator`` may be ill-formed","2024-11 (Wrocław)","","","`#118351 <https://github.com/llvm/llvm-project/issues/118351>`__","" +"`LWG4124 <https://wg21.link/LWG4124>`__","Cannot format ``zoned_time`` with resolution coarser than ``seconds``","2024-11 (Wrocław)","","","`#118352 <https://github.com/llvm/llvm-project/issues/118352>`__","" +"`LWG4126 <https://wg21.link/LWG4126>`__","Some feature-test macros for fully freestanding features are not yet marked freestanding","2024-11 (Wrocław)","","","`#118353 <https://github.com/llvm/llvm-project/issues/118353>`__","" +"`LWG4134 <https://wg21.link/LWG4134>`__","Issue with Philox algorithm specification","2024-11 (Wrocław)","","","`#118354 <https://github.com/llvm/llvm-project/issues/118354>`__","" +"`LWG4135 <https://wg21.link/LWG4135>`__","The helper lambda of ``std::erase`` for list should specify return type as ``bool``","2024-11 (Wrocław)","|Complete|","21","`#118355 <https://github.com/llvm/llvm-project/issues/118355>`__","" +"`LWG4140 <https://wg21.link/LWG4140>`__","Useless default constructors for bit reference types","2024-11 (Wrocław)","|Complete|","","`#118356 <https://github.com/llvm/llvm-project/issues/118356>`__","" +"`LWG4141 <https://wg21.link/LWG4141>`__","Improve prohibitions on ""additional storage""","2024-11 (Wrocław)","","","`#118357 <https://github.com/llvm/llvm-project/issues/118357>`__","" +"`LWG4142 <https://wg21.link/LWG4142>`__","``format_parse_context::check_dynamic_spec`` should require at least one type","2024-11 (Wrocław)","","","`#118358 <https://github.com/llvm/llvm-project/issues/118358>`__","" +"`LWG4144 <https://wg21.link/LWG4144>`__","Disallow ``unique_ptr<T&, D>``","2024-11 (Wrocław)","","","`#118359 <https://github.com/llvm/llvm-project/issues/118359>`__","" +"`LWG4147 <https://wg21.link/LWG4147>`__","Precondition on ``inplace_vector::emplace``","2024-11 (Wrocław)","","","`#118361 <https://github.com/llvm/llvm-project/issues/118361>`__","" +"`LWG4148 <https://wg21.link/LWG4148>`__","``unique_ptr::operator*`` should not allow dangling references","2024-11 (Wrocław)","","","`#118362 <https://github.com/llvm/llvm-project/issues/118362>`__","" +"`LWG4153 <https://wg21.link/LWG4153>`__","Fix extra ""-1"" for ``philox_engine::max()``","2024-11 (Wrocław)","","","`#118363 <https://github.com/llvm/llvm-project/issues/118363>`__","" +"`LWG4154 <https://wg21.link/LWG4154>`__","The Mandates for ``std::packaged_task``'s constructor from a callable entity should consider decaying","2024-11 (Wrocław)","","","`#118364 <https://github.com/llvm/llvm-project/issues/118364>`__","" +"`LWG4157 <https://wg21.link/LWG4157>`__","The resolution of LWG3465 was damaged by P2167R3","2024-11 (Wrocław)","|Complete|","20","`#118365 <https://github.com/llvm/llvm-project/issues/118365>`__","" +"`LWG4164 <https://wg21.link/LWG4164>`__","Missing guarantees for ``forward_list`` modifiers","2024-11 (Wrocław)","|Complete|","21","`#118366 <https://github.com/llvm/llvm-project/issues/118366>`__","" +"`LWG4169 <https://wg21.link/LWG4169>`__","``std::atomic<T>``'s default constructor should be constrained","2024-11 (Wrocław)","","","`#118367 <https://github.com/llvm/llvm-project/issues/118367>`__","" +"`LWG4170 <https://wg21.link/LWG4170>`__","``contiguous_iterator`` should require ``to_address(I{})``","2024-11 (Wrocław)","","","`#118368 <https://github.com/llvm/llvm-project/issues/118368>`__","" "","","","","","" -"`LWG3578 <https://wg21.link/LWG3578>`__","Iterator SCARYness in the context of associative container merging","2025-02 (Hagenberg)","","","" -"`LWG3956 <https://wg21.link/LWG3956>`__","``chrono::parse`` uses ``from_stream`` as a customization point","2025-02 (Hagenberg)","","","" -"`LWG4172 <https://wg21.link/LWG4172>`__","``unique_lock`` self-move-assignment is broken","2025-02 (Hagenberg)","","","" -"`LWG4175 <https://wg21.link/LWG4175>`__","``get_env()`` specified in terms of ``as_const()`` but this doesn't work with rvalue senders","2025-02 (Hagenberg)","","","" -"`LWG4179 <https://wg21.link/LWG4179>`__","Wrong range in ``[alg.search]``","2025-02 (Hagenberg)","","","" -"`LWG4186 <https://wg21.link/LWG4186>`__","``regex_traits::transform_primary`` mistakenly detects ``typeid`` of a function","2025-02 (Hagenberg)","","","" -"`LWG4189 <https://wg21.link/LWG4189>`__","``cache_latest_view`` should be freestanding","2025-02 (Hagenberg)","","","" -"`LWG4191 <https://wg21.link/LWG4191>`__","P1467 changed the return type of ``pow(complex<float>, int)``","2025-02 (Hagenberg)","","","" -"`LWG4196 <https://wg21.link/LWG4196>`__","Complexity of ``inplace_merge()`` is incorrect","2025-02 (Hagenberg)","","","" +"`LWG3578 <https://wg21.link/LWG3578>`__","Iterator SCARYness in the context of associative container merging","2025-02 (Hagenberg)","","","`#127859 <https://github.com/llvm/llvm-project/issues/127859>`__","" +"`LWG3956 <https://wg21.link/LWG3956>`__","``chrono::parse`` uses ``from_stream`` as a customization point","2025-02 (Hagenberg)","","","`#127860 <https://github.com/llvm/llvm-project/issues/127860>`__","" +"`LWG4172 <https://wg21.link/LWG4172>`__","``unique_lock`` self-move-assignment is broken","2025-02 (Hagenberg)","","","`#127861 <https://github.com/llvm/llvm-project/issues/127861>`__","" +"`LWG4175 <https://wg21.link/LWG4175>`__","``get_env()`` specified in terms of ``as_const()`` but this doesn't work with rvalue senders","2025-02 (Hagenberg)","","","`#127862 <https://github.com/llvm/llvm-project/issues/127862>`__","" +"`LWG4179 <https://wg21.link/LWG4179>`__","Wrong range in ``[alg.search]``","2025-02 (Hagenberg)","","","`#127863 <https://github.com/llvm/llvm-project/issues/127863>`__","" +"`LWG4186 <https://wg21.link/LWG4186>`__","``regex_traits::transform_primary`` mistakenly detects ``typeid`` of a function","2025-02 (Hagenberg)","","","`#127864 <https://github.com/llvm/llvm-project/issues/127864>`__","" +"`LWG4189 <https://wg21.link/LWG4189>`__","``cache_latest_view`` should be freestanding","2025-02 (Hagenberg)","","","`#127865 <https://github.com/llvm/llvm-project/issues/127865>`__","" +"`LWG4191 <https://wg21.link/LWG4191>`__","P1467 changed the return type of ``pow(complex<float>, int)``","2025-02 (Hagenberg)","","","`#127866 <https://github.com/llvm/llvm-project/issues/127866>`__","" +"`LWG4196 <https://wg21.link/LWG4196>`__","Complexity of ``inplace_merge()`` is incorrect","2025-02 (Hagenberg)","","","`#127867 <https://github.com/llvm/llvm-project/issues/127867>`__","" "","","","","","" -"`LWG4198 <https://wg21.link/LWG4198>`__","``schedule_from`` isn't starting the schedule sender if decay-copying results throws","2025-06 (Sofia)","","","" -"`LWG4202 <https://wg21.link/LWG4202>`__","``enable-sender`` should be a variable template","2025-06 (Sofia)","","","" -"`LWG4203 <https://wg21.link/LWG4203>`__","Constraints on ``get-state`` functions are incorrect","2025-06 (Sofia)","","","" -"`LWG4204 <https://wg21.link/LWG4204>`__","specification of ``as-sndr2(Sig)`` in [exec.let] is incomplete","2025-06 (Sofia)","","","" -"`LWG4205 <https://wg21.link/LWG4205>`__","``let_[*].transform_env`` is specified in terms of the ``let_*`` sender itself instead of its child","2025-06 (Sofia)","","","" -"`LWG4208 <https://wg21.link/LWG4208>`__","Wording needs to ensure that in ``connect(sndr, rcvr)`` that ``rcvr`` expression is only evaluated once","2025-06 (Sofia)","","","" -"`LWG4209 <https://wg21.link/LWG4209>`__","``default_domain::transform_env`` should be returning ``FWD-ENV(env)``","2025-06 (Sofia)","","","" -"`LWG4188 <https://wg21.link/LWG4188>`__","``ostream::sentry`` destructor should handle exceptions","2025-06 (Sofia)","","","" -"`LWG4200 <https://wg21.link/LWG4200>`__","The ``operation_state`` concept can be simplified","2025-06 (Sofia)","","","" -"`LWG4201 <https://wg21.link/LWG4201>`__","``with-await-transform::await_transform`` should not use a deduced return type","2025-06 (Sofia)","","","" -"`LWG4217 <https://wg21.link/LWG4217>`__","Clarify ``mdspan`` layout mapping requirements for ``rank == 0``","2025-06 (Sofia)","","","" -"`LWG4222 <https://wg21.link/LWG4222>`__","``expected`` constructor from a single value missing a constraint","2025-06 (Sofia)","|Complete|","22","" -"`LWG4224 <https://wg21.link/LWG4224>`__","Philox engines should be freestanding","2025-06 (Sofia)","","","" -"`LWG4227 <https://wg21.link/LWG4227>`__","Missing ``noexcept`` operator in [exec.when.all]","2025-06 (Sofia)","","","" -"`LWG4231 <https://wg21.link/LWG4231>`__","``datapar::chunk<N>`` should use ``simd-size-type`` instead of ``size_t``","2025-06 (Sofia)","","","" -"`LWG4232 <https://wg21.link/LWG4232>`__","``datapar::resize`` does not resize","2025-06 (Sofia)","","","" -"`LWG4233 <https://wg21.link/LWG4233>`__","The helper lambda of ``std::erase`` for ``hive`` should specify return type as ``bool``","2025-06 (Sofia)","","","" -"`LWG4234 <https://wg21.link/LWG4234>`__","Including ``<hive>`` doesn't provide ``std::begin/end``","2025-06 (Sofia)","","","" -"`LWG4235 <https://wg21.link/LWG4235>`__","``cache_latest_view`` and ``to_input_view`` miss ``reserve_hint``","2025-06 (Sofia)","","","" -"`LWG4236 <https://wg21.link/LWG4236>`__","``chunk_view::outer-iterator::value_type`` should provide ``reserve_hint``","2025-06 (Sofia)","","","" -"`LWG4239 <https://wg21.link/LWG4239>`__","``flat_map``'s transparent comparator no longer works for string literals","2025-06 (Sofia)","","","" -"`LWG4242 <https://wg21.link/LWG4242>`__","``ranges::distance`` does not work with volatile iterators","2025-06 (Sofia)","","","" -"`LWG4245 <https://wg21.link/LWG4245>`__","Operators that interact with ``counted_iterator`` and ``default_sentinel_t`` should be ``noexcept``","2025-06 (Sofia)","","","" -"`LWG4247 <https://wg21.link/LWG4247>`__","Header ``<stdbit.h>`` is not yet freestanding","2025-06 (Sofia)","","","" +"`LWG4198 <https://wg21.link/LWG4198>`__","``schedule_from`` isn't starting the schedule sender if decay-copying results throws","2025-06 (Sofia)","","","`#148188 <https://github.com/llvm/llvm-project/issues/148188>`__","" +"`LWG4202 <https://wg21.link/LWG4202>`__","``enable-sender`` should be a variable template","2025-06 (Sofia)","","","`#148189 <https://github.com/llvm/llvm-project/issues/148189>`__","" +"`LWG4203 <https://wg21.link/LWG4203>`__","Constraints on ``get-state`` functions are incorrect","2025-06 (Sofia)","","","`#148190 <https://github.com/llvm/llvm-project/issues/148190>`__","" +"`LWG4204 <https://wg21.link/LWG4204>`__","specification of ``as-sndr2(Sig)`` in [exec.let] is incomplete","2025-06 (Sofia)","","","`#148192 <https://github.com/llvm/llvm-project/issues/148192>`__","" +"`LWG4205 <https://wg21.link/LWG4205>`__","``let_[*].transform_env`` is specified in terms of the ``let_*`` sender itself instead of its child","2025-06 (Sofia)","","","`#148193 <https://github.com/llvm/llvm-project/issues/148193>`__","" +"`LWG4208 <https://wg21.link/LWG4208>`__","Wording needs to ensure that in ``connect(sndr, rcvr)`` that ``rcvr`` expression is only evaluated once","2025-06 (Sofia)","","","`#148194 <https://github.com/llvm/llvm-project/issues/148194>`__","" +"`LWG4209 <https://wg21.link/LWG4209>`__","``default_domain::transform_env`` should be returning ``FWD-ENV(env)``","2025-06 (Sofia)","","","`#148196 <https://github.com/llvm/llvm-project/issues/148196>`__","" +"`LWG4188 <https://wg21.link/LWG4188>`__","``ostream::sentry`` destructor should handle exceptions","2025-06 (Sofia)","","","`#148200 <https://github.com/llvm/llvm-project/issues/148200>`__","" +"`LWG4200 <https://wg21.link/LWG4200>`__","The ``operation_state`` concept can be simplified","2025-06 (Sofia)","","","`#148201 <https://github.com/llvm/llvm-project/issues/148201>`__","" +"`LWG4201 <https://wg21.link/LWG4201>`__","``with-await-transform::await_transform`` should not use a deduced return type","2025-06 (Sofia)","","","`#148202 <https://github.com/llvm/llvm-project/issues/148202>`__","" +"`LWG4217 <https://wg21.link/LWG4217>`__","Clarify ``mdspan`` layout mapping requirements for ``rank == 0``","2025-06 (Sofia)","","","`#148203 <https://github.com/llvm/llvm-project/issues/148203>`__","" +"`LWG4222 <https://wg21.link/LWG4222>`__","``expected`` constructor from a single value missing a constraint","2025-06 (Sofia)","|Complete|","22","`#148208 <https://github.com/llvm/llvm-project/issues/148208>`__","" +"`LWG4224 <https://wg21.link/LWG4224>`__","Philox engines should be freestanding","2025-06 (Sofia)","","","`#148210 <https://github.com/llvm/llvm-project/issues/148210>`__","" +"`LWG4227 <https://wg21.link/LWG4227>`__","Missing ``noexcept`` operator in [exec.when.all]","2025-06 (Sofia)","","","`#148211 <https://github.com/llvm/llvm-project/issues/148211>`__","" +"`LWG4231 <https://wg21.link/LWG4231>`__","``datapar::chunk<N>`` should use ``simd-size-type`` instead of ``size_t``","2025-06 (Sofia)","","","`#148215 <https://github.com/llvm/llvm-project/issues/148215>`__","" +"`LWG4232 <https://wg21.link/LWG4232>`__","``datapar::resize`` does not resize","2025-06 (Sofia)","","","`#148216 <https://github.com/llvm/llvm-project/issues/148216>`__","" +"`LWG4233 <https://wg21.link/LWG4233>`__","The helper lambda of ``std::erase`` for ``hive`` should specify return type as ``bool``","2025-06 (Sofia)","","","`#148217 <https://github.com/llvm/llvm-project/issues/148217>`__","" +"`LWG4234 <https://wg21.link/LWG4234>`__","Including ``<hive>`` doesn't provide ``std::begin/end``","2025-06 (Sofia)","","","`#148218 <https://github.com/llvm/llvm-project/issues/148218>`__","" +"`LWG4235 <https://wg21.link/LWG4235>`__","``cache_latest_view`` and ``to_input_view`` miss ``reserve_hint``","2025-06 (Sofia)","","","`#148219 <https://github.com/llvm/llvm-project/issues/148219>`__","" +"`LWG4236 <https://wg21.link/LWG4236>`__","``chunk_view::outer-iterator::value_type`` should provide ``reserve_hint``","2025-06 (Sofia)","","","`#148220 <https://github.com/llvm/llvm-project/issues/148220>`__","" +"`LWG4239 <https://wg21.link/LWG4239>`__","``flat_map``'s transparent comparator no longer works for string literals","2025-06 (Sofia)","","","`#148223 <https://github.com/llvm/llvm-project/issues/148223>`__","" +"`LWG4242 <https://wg21.link/LWG4242>`__","``ranges::distance`` does not work with volatile iterators","2025-06 (Sofia)","","","`#148224 <https://github.com/llvm/llvm-project/issues/148224>`__","" +"`LWG4245 <https://wg21.link/LWG4245>`__","Operators that interact with ``counted_iterator`` and ``default_sentinel_t`` should be ``noexcept``","2025-06 (Sofia)","","","`#148226 <https://github.com/llvm/llvm-project/issues/148226>`__","" +"`LWG4247 <https://wg21.link/LWG4247>`__","Header ``<stdbit.h>`` is not yet freestanding","2025-06 (Sofia)","","","`#148227 <https://github.com/llvm/llvm-project/issues/148227>`__","" "","","","","","" -"`LWG3343 <https://wg21.link/LWG3343>`__","Ordering of calls to ``unlock()`` and ``notify_all()`` in Effects element of ``notify_all_at_thread_exit()`` should be reversed","Not Adopted Yet","|Complete|","16","" -"`LWG4139 <https://wg21.link/LWG4139>`__","§[time.zone.leap] recursive constraint in ``<=>``","Not Adopted Yet","|Complete|","20","" -"`LWG3456 <https://wg21.link/LWG3456>`__","Pattern used by ``std::from_chars`` is underspecified (option B)","Not Adopted Yet","|Complete|","20","" -"`LWG3882 <https://wg21.link/LWG3882>`__","``tuple`` relational operators have confused friendships","Not Adopted Yet","|Complete|","21","The comparsion operators are constrained harder than the proposed resolution. libstdc++ and MSVC STL do the same." +"`LWG3343 <https://wg21.link/LWG3343>`__","Ordering of calls to ``unlock()`` and ``notify_all()`` in Effects element of ``notify_all_at_thread_exit()`` should be reversed","Not Adopted Yet","|Complete|","16","`#105356 <https://github.com/llvm/llvm-project/issues/105356>`__","" +"`LWG4139 <https://wg21.link/LWG4139>`__","§[time.zone.leap] recursive constraint in ``<=>``","Not Adopted Yet","|Complete|","20","`#118369 <https://github.com/llvm/llvm-project/issues/118369>`__","" +"`LWG3456 <https://wg21.link/LWG3456>`__","Pattern used by ``std::from_chars`` is underspecified (option B)","Not Adopted Yet","|Complete|","20","`#118370 <https://github.com/llvm/llvm-project/issues/118370>`__","" +"`LWG3882 <https://wg21.link/LWG3882>`__","``tuple`` relational operators have confused friendships","Not Adopted Yet","|Complete|","21","The comparsion operators are constrained harder than the proposed resolution. libstdc++ and MSVC STL do the same.","" "","","","","","" diff --git a/libcxx/docs/Status/Cxx2cPapers.csv b/libcxx/docs/Status/Cxx2cPapers.csv index 3b8b2b7ad0b3..f873d16808af 100644 --- a/libcxx/docs/Status/Cxx2cPapers.csv +++ b/libcxx/docs/Status/Cxx2cPapers.csv @@ -1,159 +1,159 @@ "Paper #","Paper Name","Meeting","Status","First released version","Notes" -"`P2497R0 <https://wg21.link/P2497R0>`__","Testing for success or failure of ``<charconv>`` functions","2023-06 (Varna)","|Complete|","18","" -"`P2592R3 <https://wg21.link/P2592R3>`__","Hashing support for ``std::chrono`` value classes","2023-06 (Varna)","","","" -"`P2587R3 <https://wg21.link/P2587R3>`__","``to_string`` or not ``to_string``","2023-06 (Varna)","","","" -"`P2562R1 <https://wg21.link/P2562R1>`__","``constexpr`` Stable Sorting","2023-06 (Varna)","|Complete|","21","" -"`P2545R4 <https://wg21.link/P2545R4>`__","Read-Copy Update (RCU)","2023-06 (Varna)","","","" -"`P2530R3 <https://wg21.link/P2530R3>`__","Hazard Pointers for C++26","2023-06 (Varna)","","","" -"`P2538R1 <https://wg21.link/P2538R1>`__","ADL-proof ``std::projected``","2023-06 (Varna)","|Complete|","18","" -"`P2495R3 <https://wg21.link/P2495R3>`__","Interfacing ``stringstream``\s with ``string_view``","2023-06 (Varna)","|Complete|","19","" -"`P2510R3 <https://wg21.link/P2510R3>`__","Formatting pointers","2023-06 (Varna)","|Complete|","17","Implemented as a DR against C++20. (MSVC STL and libstdc++ will do the same.)" -"`P2198R7 <https://wg21.link/P2198R7>`__","Freestanding Feature-Test Macros and Implementation-Defined Extensions","2023-06 (Varna)","","","" -"`P2338R4 <https://wg21.link/P2338R4>`__","Freestanding Library: Character primitives and the C library","2023-06 (Varna)","","","" -"`P2013R5 <https://wg21.link/P2013R5>`__","Freestanding Language: Optional ``::operator new``","2023-06 (Varna)","","","" -"`P2363R5 <https://wg21.link/P2363R5>`__","Extending associative containers with the remaining heterogeneous overloads","2023-06 (Varna)","","","" -"`P1901R2 <https://wg21.link/P1901R2>`__","Enabling the Use of ``weak_ptr`` as Keys in Unordered Associative Containers","2023-06 (Varna)","","","" -"`P1885R12 <https://wg21.link/P1885R12>`__","Naming Text Encodings to Demystify Them","2023-06 (Varna)","","","" -"`P0792R14 <https://wg21.link/P0792R14>`__","``function_ref``: a type-erased callable reference","2023-06 (Varna)","","","" -"`P2874R2 <https://wg21.link/P2874R2>`__","P2874R2: Mandating Annex D Require No More","2023-06 (Varna)","|Complete|","12","" -"`P2757R3 <https://wg21.link/P2757R3>`__","Type-checking format args","2023-06 (Varna)","","","" -"`P2637R3 <https://wg21.link/P2637R3>`__","Member ``visit``","2023-06 (Varna)","|Complete|","19","Change of ``__cpp_lib_variant`` is completed in LLVM 20. Change of ``__cpp_lib_format`` is blocked by `P2419R2 <https://wg21.link/P2419R2>`__." -"`P2641R4 <https://wg21.link/P2641R4>`__","Checking if a ``union`` alternative is active","2023-06 (Varna)","","","" -"`P1759R6 <https://wg21.link/P1759R6>`__","Native handles and file streams","2023-06 (Varna)","|Complete|","18","" -"`P2697R1 <https://wg21.link/P2697R1>`__","Interfacing ``bitset`` with ``string_view``","2023-06 (Varna)","|Complete|","18","" -"`P1383R2 <https://wg21.link/P1383R2>`__","More ``constexpr`` for ``<cmath>`` and ``<complex>``","2023-06 (Varna)","","","" -"`P2734R0 <https://wg21.link/P2734R0>`__","Adding the new SI prefixes","2023-06 (Varna)","|Complete|","17","" -"`P2548R6 <https://wg21.link/P2548R6>`__","``copyable_function``","2023-06 (Varna)","","","" -"`P2714R1 <https://wg21.link/P2714R1>`__","Bind front and back to NTTP callables","2023-06 (Varna)","|Partial|","20","" -"`P2630R4 <https://wg21.link/P2630R4>`__","``submdspan``","2023-06 (Varna)","","","" +"`P2497R0 <https://wg21.link/P2497R0>`__","Testing for success or failure of ``<charconv>`` functions","2023-06 (Varna)","|Complete|","18","`#105357 <https://github.com/llvm/llvm-project/issues/105357>`__","" +"`P2592R3 <https://wg21.link/P2592R3>`__","Hashing support for ``std::chrono`` value classes","2023-06 (Varna)","","","`#105358 <https://github.com/llvm/llvm-project/issues/105358>`__","" +"`P2587R3 <https://wg21.link/P2587R3>`__","``to_string`` or not ``to_string``","2023-06 (Varna)","","","`#105359 <https://github.com/llvm/llvm-project/issues/105359>`__","" +"`P2562R1 <https://wg21.link/P2562R1>`__","``constexpr`` Stable Sorting","2023-06 (Varna)","|Complete|","21","`#105360 <https://github.com/llvm/llvm-project/issues/105360>`__","" +"`P2545R4 <https://wg21.link/P2545R4>`__","Read-Copy Update (RCU)","2023-06 (Varna)","","","`#105361 <https://github.com/llvm/llvm-project/issues/105361>`__","" +"`P2530R3 <https://wg21.link/P2530R3>`__","Hazard Pointers for C++26","2023-06 (Varna)","","","`#105362 <https://github.com/llvm/llvm-project/issues/105362>`__","" +"`P2538R1 <https://wg21.link/P2538R1>`__","ADL-proof ``std::projected``","2023-06 (Varna)","|Complete|","18","`#105363 <https://github.com/llvm/llvm-project/issues/105363>`__","" +"`P2495R3 <https://wg21.link/P2495R3>`__","Interfacing ``stringstream``\s with ``string_view``","2023-06 (Varna)","|Complete|","19","`#105364 <https://github.com/llvm/llvm-project/issues/105364>`__","" +"`P2510R3 <https://wg21.link/P2510R3>`__","Formatting pointers","2023-06 (Varna)","|Complete|","17","`#105365 <https://github.com/llvm/llvm-project/issues/105365>`__","Implemented as a DR against C++20. (MSVC STL and libstdc++ will do the same.)" +"`P2198R7 <https://wg21.link/P2198R7>`__","Freestanding Feature-Test Macros and Implementation-Defined Extensions","2023-06 (Varna)","","","`#105368 <https://github.com/llvm/llvm-project/issues/105368>`__","" +"`P2338R4 <https://wg21.link/P2338R4>`__","Freestanding Library: Character primitives and the C library","2023-06 (Varna)","","","`#105369 <https://github.com/llvm/llvm-project/issues/105369>`__","" +"`P2013R5 <https://wg21.link/P2013R5>`__","Freestanding Language: Optional ``::operator new``","2023-06 (Varna)","","","`#105370 <https://github.com/llvm/llvm-project/issues/105370>`__","" +"`P2363R5 <https://wg21.link/P2363R5>`__","Extending associative containers with the remaining heterogeneous overloads","2023-06 (Varna)","","","`#105371 <https://github.com/llvm/llvm-project/issues/105371>`__","" +"`P1901R2 <https://wg21.link/P1901R2>`__","Enabling the Use of ``weak_ptr`` as Keys in Unordered Associative Containers","2023-06 (Varna)","","","`#105372 <https://github.com/llvm/llvm-project/issues/105372>`__","" +"`P1885R12 <https://wg21.link/P1885R12>`__","Naming Text Encodings to Demystify Them","2023-06 (Varna)","","","`#105373 <https://github.com/llvm/llvm-project/issues/105373>`__","" +"`P0792R14 <https://wg21.link/P0792R14>`__","``function_ref``: a type-erased callable reference","2023-06 (Varna)","","","`#105376 <https://github.com/llvm/llvm-project/issues/105376>`__","" +"`P2874R2 <https://wg21.link/P2874R2>`__","P2874R2: Mandating Annex D Require No More","2023-06 (Varna)","|Complete|","12","`#105377 <https://github.com/llvm/llvm-project/issues/105377>`__","" +"`P2757R3 <https://wg21.link/P2757R3>`__","Type-checking format args","2023-06 (Varna)","","","`#105378 <https://github.com/llvm/llvm-project/issues/105378>`__","" +"`P2637R3 <https://wg21.link/P2637R3>`__","Member ``visit``","2023-06 (Varna)","|Complete|","19","`#105380 <https://github.com/llvm/llvm-project/issues/105380>`__","Change of ``__cpp_lib_variant`` is completed in LLVM 20. Change of ``__cpp_lib_format`` is blocked by `P2419R2 <https://wg21.link/P2419R2>`__." +"`P2641R4 <https://wg21.link/P2641R4>`__","Checking if a ``union`` alternative is active","2023-06 (Varna)","","","`#105381 <https://github.com/llvm/llvm-project/issues/105381>`__","" +"`P1759R6 <https://wg21.link/P1759R6>`__","Native handles and file streams","2023-06 (Varna)","|Complete|","18","`#105382 <https://github.com/llvm/llvm-project/issues/105382>`__","" +"`P2697R1 <https://wg21.link/P2697R1>`__","Interfacing ``bitset`` with ``string_view``","2023-06 (Varna)","|Complete|","18","`#105384 <https://github.com/llvm/llvm-project/issues/105384>`__","" +"`P1383R2 <https://wg21.link/P1383R2>`__","More ``constexpr`` for ``<cmath>`` and ``<complex>``","2023-06 (Varna)","","","`#105385 <https://github.com/llvm/llvm-project/issues/105385>`__","" +"`P2734R0 <https://wg21.link/P2734R0>`__","Adding the new SI prefixes","2023-06 (Varna)","|Complete|","17","`#105386 <https://github.com/llvm/llvm-project/issues/105386>`__","" +"`P2548R6 <https://wg21.link/P2548R6>`__","``copyable_function``","2023-06 (Varna)","","","`#105387 <https://github.com/llvm/llvm-project/issues/105387>`__","" +"`P2714R1 <https://wg21.link/P2714R1>`__","Bind front and back to NTTP callables","2023-06 (Varna)","|Partial|","20","`#105388 <https://github.com/llvm/llvm-project/issues/105388>`__","" +"`P2630R4 <https://wg21.link/P2630R4>`__","``submdspan``","2023-06 (Varna)","","","`#105389 <https://github.com/llvm/llvm-project/issues/105389>`__","" "","","","","","" -"`P0543R3 <https://wg21.link/P0543R3>`__","Saturation arithmetic","2023-11 (Kona)","|Complete|","18","" -"`P2407R5 <https://wg21.link/P2407R5>`__","Freestanding Library: Partial Classes","2023-11 (Kona)","","","" -"`P2546R5 <https://wg21.link/P2546R5>`__","Debugging Support","2023-11 (Kona)","","","" -"`P2905R2 <https://wg21.link/P2905R2>`__","Runtime format strings","2023-11 (Kona)","|Complete|","18","" -"`P2918R2 <https://wg21.link/P2918R2>`__","Runtime format strings II","2023-11 (Kona)","|Complete|","18","" -"`P2909R4 <https://wg21.link/P2909R4>`__","Fix formatting of code units as integers (Dude, where’s my ``char``?)","2023-11 (Kona)","|Complete|","18","" -"`P0952R2 <https://wg21.link/P0952R2>`__","A new specification for ``std::generate_canonical``","2023-11 (Kona)","","","" -"`P2447R6 <https://wg21.link/P2447R6>`__","``std::span`` over an initializer list","2023-11 (Kona)","|Complete|","18","" -"`P2821R5 <https://wg21.link/P2821R5>`__","``span.at()``","2023-11 (Kona)","|Complete|","18","" -"`P2868R3 <https://wg21.link/P2868R3>`__","Remove Deprecated ``std::allocator`` Typedef From C++26","2023-11 (Kona)","|Complete|","18","" -"`P2870R3 <https://wg21.link/P2870R3>`__","Remove ``basic_string::reserve()`` From C++26","2023-11 (Kona)","|Complete|","18","" -"`P2871R3 <https://wg21.link/P2871R3>`__","Remove Deprecated Unicode Conversion Facets from C++26","2023-11 (Kona)","|Complete|","18","" -"`P2819R2 <https://wg21.link/P2819R2>`__","Add tuple protocol to complex","2023-11 (Kona)","|Complete|","19","" -"`P2937R0 <https://wg21.link/P2937R0>`__","Freestanding: Remove ``strtok``","2023-11 (Kona)","","","" -"`P2833R2 <https://wg21.link/P2833R2>`__","Freestanding Library: inout expected span","2023-11 (Kona)","","","" -"`P2836R1 <https://wg21.link/P2836R1>`__","``std::basic_const_iterator`` should follow its underlying type's convertibility","2023-11 (Kona)","","","" -"`P2264R7 <https://wg21.link/P2264R7>`__","Make ``assert()`` macro user friendly for C and C++","2023-11 (Kona)","","","" -"`P1673R13 <https://wg21.link/P1673R13>`__","A free function linear algebra interface based on the BLAS","2023-11 (Kona)","","","" +"`P0543R3 <https://wg21.link/P0543R3>`__","Saturation arithmetic","2023-11 (Kona)","|Complete|","18","`#105390 <https://github.com/llvm/llvm-project/issues/105390>`__","" +"`P2407R5 <https://wg21.link/P2407R5>`__","Freestanding Library: Partial Classes","2023-11 (Kona)","","","`#105391 <https://github.com/llvm/llvm-project/issues/105391>`__","" +"`P2546R5 <https://wg21.link/P2546R5>`__","Debugging Support","2023-11 (Kona)","","","`#105392 <https://github.com/llvm/llvm-project/issues/105392>`__","" +"`P2905R2 <https://wg21.link/P2905R2>`__","Runtime format strings","2023-11 (Kona)","|Complete|","18","`#105393 <https://github.com/llvm/llvm-project/issues/105393>`__","" +"`P2918R2 <https://wg21.link/P2918R2>`__","Runtime format strings II","2023-11 (Kona)","|Complete|","18","`#105394 <https://github.com/llvm/llvm-project/issues/105394>`__","" +"`P2909R4 <https://wg21.link/P2909R4>`__","Fix formatting of code units as integers (Dude, where’s my ``char``?)","2023-11 (Kona)","|Complete|","18","`#105395 <https://github.com/llvm/llvm-project/issues/105395>`__","" +"`P0952R2 <https://wg21.link/P0952R2>`__","A new specification for ``std::generate_canonical``","2023-11 (Kona)","","","`#105396 <https://github.com/llvm/llvm-project/issues/105396>`__","" +"`P2447R6 <https://wg21.link/P2447R6>`__","``std::span`` over an initializer list","2023-11 (Kona)","|Complete|","18","`#105397 <https://github.com/llvm/llvm-project/issues/105397>`__","" +"`P2821R5 <https://wg21.link/P2821R5>`__","``span.at()``","2023-11 (Kona)","|Complete|","18","`#105399 <https://github.com/llvm/llvm-project/issues/105399>`__","" +"`P2868R3 <https://wg21.link/P2868R3>`__","Remove Deprecated ``std::allocator`` Typedef From C++26","2023-11 (Kona)","|Complete|","18","`#105400 <https://github.com/llvm/llvm-project/issues/105400>`__","" +"`P2870R3 <https://wg21.link/P2870R3>`__","Remove ``basic_string::reserve()`` From C++26","2023-11 (Kona)","|Complete|","18","`#105401 <https://github.com/llvm/llvm-project/issues/105401>`__","" +"`P2871R3 <https://wg21.link/P2871R3>`__","Remove Deprecated Unicode Conversion Facets from C++26","2023-11 (Kona)","|Complete|","18","`#105402 <https://github.com/llvm/llvm-project/issues/105402>`__","" +"`P2819R2 <https://wg21.link/P2819R2>`__","Add tuple protocol to complex","2023-11 (Kona)","|Complete|","19","`#105403 <https://github.com/llvm/llvm-project/issues/105403>`__","" +"`P2937R0 <https://wg21.link/P2937R0>`__","Freestanding: Remove ``strtok``","2023-11 (Kona)","","","`#105404 <https://github.com/llvm/llvm-project/issues/105404>`__","" +"`P2833R2 <https://wg21.link/P2833R2>`__","Freestanding Library: inout expected span","2023-11 (Kona)","","","`#105405 <https://github.com/llvm/llvm-project/issues/105405>`__","" +"`P2836R1 <https://wg21.link/P2836R1>`__","``std::basic_const_iterator`` should follow its underlying type's convertibility","2023-11 (Kona)","","","`#105406 <https://github.com/llvm/llvm-project/issues/105406>`__","" +"`P2264R7 <https://wg21.link/P2264R7>`__","Make ``assert()`` macro user friendly for C and C++","2023-11 (Kona)","","","`#105407 <https://github.com/llvm/llvm-project/issues/105407>`__","" +"`P1673R13 <https://wg21.link/P1673R13>`__","A free function linear algebra interface based on the BLAS","2023-11 (Kona)","","","`#105408 <https://github.com/llvm/llvm-project/issues/105408>`__","" "","","","","","" -"`P2875R4 <https://wg21.link/P2875R4>`__","Undeprecate ``polymorphic_allocator::destroy`` for C++26","2024-03 (Tokyo)","|Complete|","15","" -"`P2867R2 <https://wg21.link/P2867R2>`__","Remove Deprecated ``strstreams`` From C++26","2024-03 (Tokyo)","|Complete|","19","" -"`P2869R4 <https://wg21.link/P2869R4>`__","Remove Deprecated ``shared_ptr`` Atomic Access APIs from C++26","2024-03 (Tokyo)","","","" -"`P2872R3 <https://wg21.link/P2872R3>`__","Remove ``wstring_convert`` From C++26","2024-03 (Tokyo)","|Complete|","19","" -"`P3107R5 <https://wg21.link/P3107R5>`__","Permit an efficient implementation of ``std::print``","2024-03 (Tokyo)","","","" -"`P3142R0 <https://wg21.link/P3142R0>`__","Printing Blank Lines with ``println``","2024-03 (Tokyo)","|Complete|","19","Implemented as a DR against C++23. (MSVC STL and libstdc++ will do the same.)" -"`P2845R8 <https://wg21.link/P2845R8>`__","Formatting of ``std::filesystem::path``","2024-03 (Tokyo)","","","" -"`P0493R5 <https://wg21.link/P0493R5>`__","Atomic minimum/maximum","2024-03 (Tokyo)","","","" -"`P2542R8 <https://wg21.link/P2542R8>`__","``views::concat``","2024-03 (Tokyo)","","","" -"`P2591R5 <https://wg21.link/P2591R5>`__","Concatenation of strings and string views","2024-03 (Tokyo)","|Complete|","19","" -"`P2248R8 <https://wg21.link/P2248R8>`__","Enabling list-initialization for algorithms","2024-03 (Tokyo)","","","" -"`P2810R4 <https://wg21.link/P2810R4>`__","``is_debugger_present`` ``is_replaceable``","2024-03 (Tokyo)","","","" -"`P1068R11 <https://wg21.link/P1068R11>`__","Vector API for random number generation","2024-03 (Tokyo)","","","" -"`P2944R3 <https://wg21.link/P2944R3>`__","Comparisons for ``reference_wrapper``","2024-03 (Tokyo)","|Complete|","21","" -"`P2642R6 <https://wg21.link/P2642R6>`__","Padded ``mdspan`` layouts","2024-03 (Tokyo)","","","" -"`P3029R1 <https://wg21.link/P3029R1>`__","Better ``mdspan``'s CTAD","2024-03 (Tokyo)","|Complete|","19","" +"`P2875R4 <https://wg21.link/P2875R4>`__","Undeprecate ``polymorphic_allocator::destroy`` for C++26","2024-03 (Tokyo)","|Complete|","15","`#105410 <https://github.com/llvm/llvm-project/issues/105410>`__","" +"`P2867R2 <https://wg21.link/P2867R2>`__","Remove Deprecated ``strstreams`` From C++26","2024-03 (Tokyo)","|Complete|","19","`#105411 <https://github.com/llvm/llvm-project/issues/105411>`__","" +"`P2869R4 <https://wg21.link/P2869R4>`__","Remove Deprecated ``shared_ptr`` Atomic Access APIs from C++26","2024-03 (Tokyo)","","","`#105412 <https://github.com/llvm/llvm-project/issues/105412>`__","" +"`P2872R3 <https://wg21.link/P2872R3>`__","Remove ``wstring_convert`` From C++26","2024-03 (Tokyo)","|Complete|","19","`#105413 <https://github.com/llvm/llvm-project/issues/105413>`__","" +"`P3107R5 <https://wg21.link/P3107R5>`__","Permit an efficient implementation of ``std::print``","2024-03 (Tokyo)","","","`#105414 <https://github.com/llvm/llvm-project/issues/105414>`__","" +"`P3142R0 <https://wg21.link/P3142R0>`__","Printing Blank Lines with ``println``","2024-03 (Tokyo)","|Complete|","19","`#105415 <https://github.com/llvm/llvm-project/issues/105415>`__","Implemented as a DR against C++23. (MSVC STL and libstdc++ will do the same.)" +"`P2845R8 <https://wg21.link/P2845R8>`__","Formatting of ``std::filesystem::path``","2024-03 (Tokyo)","","","`#105416 <https://github.com/llvm/llvm-project/issues/105416>`__","" +"`P0493R5 <https://wg21.link/P0493R5>`__","Atomic minimum/maximum","2024-03 (Tokyo)","","","`#105418 <https://github.com/llvm/llvm-project/issues/105418>`__","" +"`P2542R8 <https://wg21.link/P2542R8>`__","``views::concat``","2024-03 (Tokyo)","","","`#105419 <https://github.com/llvm/llvm-project/issues/105419>`__","" +"`P2591R5 <https://wg21.link/P2591R5>`__","Concatenation of strings and string views","2024-03 (Tokyo)","|Complete|","19","`#105420 <https://github.com/llvm/llvm-project/issues/105420>`__","" +"`P2248R8 <https://wg21.link/P2248R8>`__","Enabling list-initialization for algorithms","2024-03 (Tokyo)","","","`#105421 <https://github.com/llvm/llvm-project/issues/105421>`__","" +"`P2810R4 <https://wg21.link/P2810R4>`__","``is_debugger_present`` ``is_replaceable``","2024-03 (Tokyo)","","","`#105422 <https://github.com/llvm/llvm-project/issues/105422>`__","" +"`P1068R11 <https://wg21.link/P1068R11>`__","Vector API for random number generation","2024-03 (Tokyo)","","","`#105423 <https://github.com/llvm/llvm-project/issues/105423>`__","" +"`P2944R3 <https://wg21.link/P2944R3>`__","Comparisons for ``reference_wrapper``","2024-03 (Tokyo)","|Complete|","21","`#105424 <https://github.com/llvm/llvm-project/issues/105424>`__","The changes to ``tuple``'s equality overload from P2165R4 are not yet implemented." +"`P2642R6 <https://wg21.link/P2642R6>`__","Padded ``mdspan`` layouts","2024-03 (Tokyo)","","","`#105425 <https://github.com/llvm/llvm-project/issues/105425>`__","" +"`P3029R1 <https://wg21.link/P3029R1>`__","Better ``mdspan``'s CTAD","2024-03 (Tokyo)","|Complete|","19","`#105426 <https://github.com/llvm/llvm-project/issues/105426>`__","" "","","","","","" -"`P2747R2 <https://wg21.link/P2747R2>`__","``constexpr`` placement new","2024-06 (St. Louis)","|Complete|","20","" -"`P2997R1 <https://wg21.link/P2997R1>`__","Removing the common reference requirement from the indirectly invocable concepts","2024-06 (St. Louis)","|Complete|","19","Implemented as a DR against C++20. (MSVC STL and libstdc++ will do the same.)" -"`P2389R2 <https://wg21.link/P2389R2>`__","``dextents`` Index Type Parameter","2024-06 (St. Louis)","|Complete|","19","" -"`P3168R2 <https://wg21.link/P3168R2>`__","Give ``std::optional`` Range Support","2024-06 (St. Louis)","|Complete|","22","" -"`P3217R0 <https://wg21.link/P3217R0>`__","Adjoints to 'Enabling list-initialization for algorithms': find_last","2024-06 (St. Louis)","","","" -"`P2985R0 <https://wg21.link/P2985R0>`__","A type trait for detecting virtual base classes","2024-06 (St. Louis)","|Complete|","20","" -"`P0843R14 <https://wg21.link/P0843R14>`__","``inplace_vector``","2024-06 (St. Louis)","","","" -"`P3235R3 <https://wg21.link/P3235R3>`__","``std::print`` more types faster with less memory","2024-06 (St. Louis)","","","" -"`P2968R2 <https://wg21.link/P2968R2>`__","Make ``std::ignore`` a first-class object","2024-06 (St. Louis)","|Complete|","19","" -"`P2075R6 <https://wg21.link/P2075R6>`__","Philox as an extension of the C++ RNG engines","2024-06 (St. Louis)","","","" -"`P2422R1 <https://wg21.link/P2422R1>`__","Remove ``nodiscard`` annotations from the standard library specification","2024-06 (St. Louis)","|Complete|","19","``nodiscard`` attributes were kept as a conforming extension" -"`P2300R10 <https://wg21.link/P2300R10>`__","``std::execution``","2024-06 (St. Louis)","","","" +"`P2747R2 <https://wg21.link/P2747R2>`__","``constexpr`` placement new","2024-06 (St. Louis)","|Complete|","20","`#105427 <https://github.com/llvm/llvm-project/issues/105427>`__","" +"`P2997R1 <https://wg21.link/P2997R1>`__","Removing the common reference requirement from the indirectly invocable concepts","2024-06 (St. Louis)","|Complete|","19","`#105428 <https://github.com/llvm/llvm-project/issues/105428>`__","Implemented as a DR against C++20. (MSVC STL and libstdc++ will do the same.)" +"`P2389R2 <https://wg21.link/P2389R2>`__","``dextents`` Index Type Parameter","2024-06 (St. Louis)","|Complete|","19","`#105429 <https://github.com/llvm/llvm-project/issues/105429>`__","" +"`P3168R2 <https://wg21.link/P3168R2>`__","Give ``std::optional`` Range Support","2024-06 (St. Louis)","|Complete|","22","`#105430 <https://github.com/llvm/llvm-project/issues/105430>`__","" +"`P3217R0 <https://wg21.link/P3217R0>`__","Adjoints to 'Enabling list-initialization for algorithms': find_last","2024-06 (St. Louis)","","","`#105431 <https://github.com/llvm/llvm-project/issues/105431>`__","" +"`P2985R0 <https://wg21.link/P2985R0>`__","A type trait for detecting virtual base classes","2024-06 (St. Louis)","|Complete|","20","`#105432 <https://github.com/llvm/llvm-project/issues/105432>`__","" +"`P0843R14 <https://wg21.link/P0843R14>`__","``inplace_vector``","2024-06 (St. Louis)","","","`#105433 <https://github.com/llvm/llvm-project/issues/105433>`__","" +"`P3235R3 <https://wg21.link/P3235R3>`__","``std::print`` more types faster with less memory","2024-06 (St. Louis)","","","`#105435 <https://github.com/llvm/llvm-project/issues/105435>`__","" +"`P2968R2 <https://wg21.link/P2968R2>`__","Make ``std::ignore`` a first-class object","2024-06 (St. Louis)","|Complete|","19","`#105436 <https://github.com/llvm/llvm-project/issues/105436>`__","" +"`P2075R6 <https://wg21.link/P2075R6>`__","Philox as an extension of the C++ RNG engines","2024-06 (St. Louis)","","","`#105437 <https://github.com/llvm/llvm-project/issues/105437>`__","" +"`P2422R1 <https://wg21.link/P2422R1>`__","Remove ``nodiscard`` annotations from the standard library specification","2024-06 (St. Louis)","|Complete|","19","`#105438 <https://github.com/llvm/llvm-project/issues/105438>`__","``nodiscard`` attributes were kept as a conforming extension" +"`P2300R10 <https://wg21.link/P2300R10>`__","``std::execution``","2024-06 (St. Louis)","","","`#105440 <https://github.com/llvm/llvm-project/issues/105440>`__","" "","","","","","" -"`P3136R1 <https://wg21.link/P3136R1>`__","Retiring niebloids","2024-11 (Wrocław)","|Complete|","14","" -"`P3138R5 <https://wg21.link/P3138R5>`__","``views::cache_latest``","2024-11 (Wrocław)","","","" -"`P3379R0 <https://wg21.link/P3379R0>`__","Constrain ``std::expected`` equality operators","2024-11 (Wrocław)","|Complete|","21","" -"`P2862R1 <https://wg21.link/P2862R1>`__","``text_encoding::name()`` should never return null values","2024-11 (Wrocław)","","","" -"`P2897R7 <https://wg21.link/P2897R7>`__","``aligned_accessor``: An ``mdspan`` accessor expressing pointer over-alignment","2024-11 (Wrocław)","|Complete|","21","" -"`P3355R1 <https://wg21.link/P3355R1>`__","Fix ``submdspan`` for C++26","2024-11 (Wrocław)","","","" -"`P3222R0 <https://wg21.link/P3222R0>`__","Fix C++26 by adding transposed special cases for P2642 layouts","2024-11 (Wrocław)","","","" -"`P3050R2 <https://wg21.link/P3050R2>`__","Fix C++26 by optimizing ``linalg::conjugated`` for noncomplex value types","2024-11 (Wrocław)","","","" -"`P3396R1 <https://wg21.link/P3396R1>`__","``std::execution`` wording fixes","2024-11 (Wrocław)","","","" -"`P2835R7 <https://wg21.link/P2835R7>`__","Expose ``std::atomic_ref``'s object address","2024-11 (Wrocław)","","","" -"`P3323R1 <https://wg21.link/P3323R1>`__","cv-qualified types in ``atomic`` and ``atomic_ref``","2024-11 (Wrocław)","","","" -"`P3508R0 <https://wg21.link/P3508R0>`__","Wording for ""constexpr for specialized memory algorithms""","2024-11 (Wrocław)","","","" -"`P3369R0 <https://wg21.link/P3369R0>`__","constexpr for ``uninitialized_default_construct``","2024-11 (Wrocław)","","","" -"`P3370R1 <https://wg21.link/P3370R1>`__","Add new library headers from C23","2024-11 (Wrocław)","","","" -"`P3309R3 <https://wg21.link/P3309R3>`__","constexpr ``atomic`` and ``atomic_ref``","2024-11 (Wrocław)","","","" -"`P1928R15 <https://wg21.link/P1928R15>`__","``std::simd`` — merge data-parallel types from the Parallelism TS 2","2024-11 (Wrocław)","","","" -"`P3325R5 <https://wg21.link/P3325R5>`__","A Utility for Creating Execution Environments","2024-11 (Wrocław)","","","" -"`P3068R6 <https://wg21.link/P3068R6>`__","Allowing exception throwing in constant-evaluation","2024-11 (Wrocław)","","","" -"`P3247R2 <https://wg21.link/P3247R2>`__","Deprecate the notion of trivial types","2024-11 (Wrocław)","|Complete|","21","" +"`P3136R1 <https://wg21.link/P3136R1>`__","Retiring niebloids","2024-11 (Wrocław)","|Complete|","14","`#118133 <https://github.com/llvm/llvm-project/issues/118133>`__","" +"`P3138R5 <https://wg21.link/P3138R5>`__","``views::cache_latest``","2024-11 (Wrocław)","","","`#118134 <https://github.com/llvm/llvm-project/issues/118134>`__","" +"`P3379R0 <https://wg21.link/P3379R0>`__","Constrain ``std::expected`` equality operators","2024-11 (Wrocław)","|Complete|","21","`#118135 <https://github.com/llvm/llvm-project/issues/118135>`__","" +"`P2862R1 <https://wg21.link/P2862R1>`__","``text_encoding::name()`` should never return null values","2024-11 (Wrocław)","","","`#118371 <https://github.com/llvm/llvm-project/issues/118371>`__","" +"`P2897R7 <https://wg21.link/P2897R7>`__","``aligned_accessor``: An ``mdspan`` accessor expressing pointer over-alignment","2024-11 (Wrocław)","|Complete|","21","`#118372 <https://github.com/llvm/llvm-project/issues/118372>`__","" +"`P3355R1 <https://wg21.link/P3355R1>`__","Fix ``submdspan`` for C++26","2024-11 (Wrocław)","","","`#118373 <https://github.com/llvm/llvm-project/issues/118373>`__","" +"`P3222R0 <https://wg21.link/P3222R0>`__","Fix C++26 by adding transposed special cases for P2642 layouts","2024-11 (Wrocław)","","","`#118374 <https://github.com/llvm/llvm-project/issues/118374>`__","" +"`P3050R2 <https://wg21.link/P3050R2>`__","Fix C++26 by optimizing ``linalg::conjugated`` for noncomplex value types","2024-11 (Wrocław)","","","`#118375 <https://github.com/llvm/llvm-project/issues/118375>`__","" +"`P3396R1 <https://wg21.link/P3396R1>`__","``std::execution`` wording fixes","2024-11 (Wrocław)","","","`#118376 <https://github.com/llvm/llvm-project/issues/118376>`__","" +"`P2835R7 <https://wg21.link/P2835R7>`__","Expose ``std::atomic_ref``'s object address","2024-11 (Wrocław)","","","`#118377 <https://github.com/llvm/llvm-project/issues/118377>`__","" +"`P3323R1 <https://wg21.link/P3323R1>`__","cv-qualified types in ``atomic`` and ``atomic_ref``","2024-11 (Wrocław)","","","`#118378 <https://github.com/llvm/llvm-project/issues/118378>`__","" +"`P3508R0 <https://wg21.link/P3508R0>`__","Wording for ""constexpr for specialized memory algorithms""","2024-11 (Wrocław)","","","`#118379 <https://github.com/llvm/llvm-project/issues/118379>`__","" +"`P3369R0 <https://wg21.link/P3369R0>`__","constexpr for ``uninitialized_default_construct``","2024-11 (Wrocław)","","","`#118380 <https://github.com/llvm/llvm-project/issues/118380>`__","" +"`P3370R1 <https://wg21.link/P3370R1>`__","Add new library headers from C23","2024-11 (Wrocław)","","","`#118381 <https://github.com/llvm/llvm-project/issues/118381>`__","" +"`P3309R3 <https://wg21.link/P3309R3>`__","constexpr ``atomic`` and ``atomic_ref``","2024-11 (Wrocław)","","","`#118382 <https://github.com/llvm/llvm-project/issues/118382>`__","" +"`P1928R15 <https://wg21.link/P1928R15>`__","``std::simd`` — merge data-parallel types from the Parallelism TS 2","2024-11 (Wrocław)","","","`#118384 <https://github.com/llvm/llvm-project/issues/118384>`__","" +"`P3325R5 <https://wg21.link/P3325R5>`__","A Utility for Creating Execution Environments","2024-11 (Wrocław)","","","`#118385 <https://github.com/llvm/llvm-project/issues/118385>`__","" +"`P3068R6 <https://wg21.link/P3068R6>`__","Allowing exception throwing in constant-evaluation","2024-11 (Wrocław)","","","`#118386 <https://github.com/llvm/llvm-project/issues/118386>`__","" +"`P3247R2 <https://wg21.link/P3247R2>`__","Deprecate the notion of trivial types","2024-11 (Wrocław)","|Complete|","21","`#118387 <https://github.com/llvm/llvm-project/issues/118387>`__","" "","","","","","" -"`P3074R7 <https://wg21.link/P3074R7>`__","trivial unions (was ``std::uninitialized``)","2025-02 (Hagenberg)","","","" -"`P1494R5 <https://wg21.link/P1494R5>`__","Partial program correctness","2025-02 (Hagenberg)","","","" -"`P2900R14 <https://wg21.link/P2900R14>`__","Contracts for C++","2025-02 (Hagenberg)","","","" -"`P3475R2 <https://wg21.link/P3475R2>`__","Defang and deprecate ``memory_order::consume``","2025-02 (Hagenberg)","","","" -"`P2786R13 <https://wg21.link/P2786R13>`__","Trivial Relocatability For C++26","2025-02 (Hagenberg)","","","" -"`P3137R3 <https://wg21.link/P3137R3>`__","``views::to_input``","2025-02 (Hagenberg)","","","" -"`P0472R3 <https://wg21.link/P0472R3>`__","Put ``std::monostate`` in ``<utility>``","2025-02 (Hagenberg)","|Complete|","21","" -"`P3349R1 <https://wg21.link/P3349R1>`__","Converting contiguous iterators to pointers","2025-02 (Hagenberg)","","","" -"`P3372R3 <https://wg21.link/P3372R3>`__","constexpr containers and adaptors","2025-02 (Hagenberg)","|In Progress|","","" -"`P3378R2 <https://wg21.link/P3378R2>`__","constexpr exception types","2025-02 (Hagenberg)","","","" -"`P3441R2 <https://wg21.link/P3441R2>`__","Rename ``simd_split`` to ``simd_chunk``","2025-02 (Hagenberg)","","","" -"`P3287R3 <https://wg21.link/P3287R3>`__","Exploration of namespaces for ``std::simd``","2025-02 (Hagenberg)","","","" -"`P2976R1 <https://wg21.link/P2976R1>`__","Freestanding Library: ``algorithm``, ``numeric``, and ``random``","2025-02 (Hagenberg)","","","" -"`P3430R3 <https://wg21.link/P3430R3>`__","simd issues: explicit, unsequenced, identity-element position, and members of disabled simd","2025-02 (Hagenberg)","","","" -"`P2663R7 <https://wg21.link/P2663R7>`__","Interleaved complex values support in ``std::simd``","2025-02 (Hagenberg)","","","" -"`P2933R4 <https://wg21.link/P2933R4>`__","Extend ``<bit>`` header function with overloads for ``std::simd``","2025-02 (Hagenberg)","","","" -"`P2846R6 <https://wg21.link/P2846R6>`__","``reserve_hint``: Eagerly reserving memory for not-quite-sized lazy ranges","2025-02 (Hagenberg)","","","" -"`P3471R4 <https://wg21.link/P3471R4>`__","Standard Library Hardening","2025-02 (Hagenberg)","","","" -"`P0447R28 <https://wg21.link/P0447R28>`__","Introduction of ``std::hive`` to the standard library","2025-02 (Hagenberg)","","","" -"`P3019R14 <https://wg21.link/P3019R14>`__","``indirect`` and ``polymorphic``: Vocabulary Types for Composite Class Design","2025-02 (Hagenberg)","","","" +"`P3074R7 <https://wg21.link/P3074R7>`__","trivial unions (was ``std::uninitialized``)","2025-02 (Hagenberg)","","","`#127868 <https://github.com/llvm/llvm-project/issues/127868>`__","" +"`P1494R5 <https://wg21.link/P1494R5>`__","Partial program correctness","2025-02 (Hagenberg)","","","`#127869 <https://github.com/llvm/llvm-project/issues/127869>`__","" +"`P2900R14 <https://wg21.link/P2900R14>`__","Contracts for C++","2025-02 (Hagenberg)","","","`#127870 <https://github.com/llvm/llvm-project/issues/127870>`__","" +"`P3475R2 <https://wg21.link/P3475R2>`__","Defang and deprecate ``memory_order::consume``","2025-02 (Hagenberg)","","","`#127871 <https://github.com/llvm/llvm-project/issues/127871>`__","" +"`P2786R13 <https://wg21.link/P2786R13>`__","Trivial Relocatability For C++26","2025-02 (Hagenberg)","","","`#127872 <https://github.com/llvm/llvm-project/issues/127872>`__","" +"`P3137R3 <https://wg21.link/P3137R3>`__","``views::to_input``","2025-02 (Hagenberg)","","","`#127873 <https://github.com/llvm/llvm-project/issues/127873>`__","" +"`P0472R3 <https://wg21.link/P0472R3>`__","Put ``std::monostate`` in ``<utility>``","2025-02 (Hagenberg)","|Complete|","21","`#127874 <https://github.com/llvm/llvm-project/issues/127874>`__","" +"`P3349R1 <https://wg21.link/P3349R1>`__","Converting contiguous iterators to pointers","2025-02 (Hagenberg)","","","`#127875 <https://github.com/llvm/llvm-project/issues/127875>`__","" +"`P3372R3 <https://wg21.link/P3372R3>`__","constexpr containers and adaptors","2025-02 (Hagenberg)","|In Progress|","","`#127876 <https://github.com/llvm/llvm-project/issues/127876>`__","" +"`P3378R2 <https://wg21.link/P3378R2>`__","constexpr exception types","2025-02 (Hagenberg)","","","`#127877 <https://github.com/llvm/llvm-project/issues/127877>`__","" +"`P3441R2 <https://wg21.link/P3441R2>`__","Rename ``simd_split`` to ``simd_chunk``","2025-02 (Hagenberg)","","","`#127878 <https://github.com/llvm/llvm-project/issues/127878>`__","" +"`P3287R3 <https://wg21.link/P3287R3>`__","Exploration of namespaces for ``std::simd``","2025-02 (Hagenberg)","","","`#127879 <https://github.com/llvm/llvm-project/issues/127879>`__","" +"`P2976R1 <https://wg21.link/P2976R1>`__","Freestanding Library: ``algorithm``, ``numeric``, and ``random``","2025-02 (Hagenberg)","","","`#127880 <https://github.com/llvm/llvm-project/issues/127880>`__","" +"`P3430R3 <https://wg21.link/P3430R3>`__","simd issues: explicit, unsequenced, identity-element position, and members of disabled simd","2025-02 (Hagenberg)","","","`#127881 <https://github.com/llvm/llvm-project/issues/127881>`__","" +"`P2663R7 <https://wg21.link/P2663R7>`__","Interleaved complex values support in ``std::simd``","2025-02 (Hagenberg)","","","`#127882 <https://github.com/llvm/llvm-project/issues/127882>`__","" +"`P2933R4 <https://wg21.link/P2933R4>`__","Extend ``<bit>`` header function with overloads for ``std::simd``","2025-02 (Hagenberg)","","","`#127883 <https://github.com/llvm/llvm-project/issues/127883>`__","" +"`P2846R6 <https://wg21.link/P2846R6>`__","``reserve_hint``: Eagerly reserving memory for not-quite-sized lazy ranges","2025-02 (Hagenberg)","","","`#127884 <https://github.com/llvm/llvm-project/issues/127884>`__","" +"`P3471R4 <https://wg21.link/P3471R4>`__","Standard Library Hardening","2025-02 (Hagenberg)","","","`#127885 <https://github.com/llvm/llvm-project/issues/127885>`__","" +"`P0447R28 <https://wg21.link/P0447R28>`__","Introduction of ``std::hive`` to the standard library","2025-02 (Hagenberg)","","","`#127886 <https://github.com/llvm/llvm-project/issues/127886>`__","" +"`P3019R14 <https://wg21.link/P3019R14>`__","``indirect`` and ``polymorphic``: Vocabulary Types for Composite Class Design","2025-02 (Hagenberg)","","","`#127887 <https://github.com/llvm/llvm-project/issues/127887>`__","" "","","","","","" -"`P2996R13 <https://wg21.link/P2996R13>`__","Reflection for C++26","2025-06 (Sofia)","","","" -"`P3394R4 <https://wg21.link/P3394R4>`__","Annotations for Reflection","2025-06 (Sofia)","","","" -"`P3293R3 <https://wg21.link/P3293R3>`__","Splicing a base class subobject","2025-06 (Sofia)","","","" -"`P3491R3 <https://wg21.link/P3491R3>`__","``define_static_{string,object,array}``","2025-06 (Sofia)","","","" -"`P3096R12 <https://wg21.link/P3096R12>`__","Function Parameter Reflection in Reflection for C++26","2025-06 (Sofia)","","","" -"`P2988R12 <https://wg21.link/P2988R12>`__","``std::optional<T&>``","2025-06 (Sofia)","","","" -"`P3348R4 <https://wg21.link/P3348R4>`__","C++26 should refer to C23 not C17","2025-06 (Sofia)","","","" -"`P3037R6 <https://wg21.link/P3037R6>`__","``constexpr`` ``std::shared_ptr`` and friends","2025-06 (Sofia)","","","" -"`P3284R4 <https://wg21.link/P3284R4>`__","``write_env`` and ``unstoppable`` Sender Adaptors","2025-06 (Sofia)","","","" -"`P3179R9 <https://wg21.link/P3179R9>`__","Parallel Range Algorithms","2025-06 (Sofia)","","","" -"`P3709R2 <https://wg21.link/P3709R2>`__","Reconsider parallel ``ranges::rotate_copy`` and ``ranges::reverse_copy``","2025-06 (Sofia)","","","" -"`P3641R0 <https://wg21.link/P3641R0>`__","Rename ``std::observable`` to ``std::observable_checkpoint``, and add a feature-test macro","2025-06 (Sofia)","","","" -"`P3044R2 <https://wg21.link/P3044R2>`__","sub-``string_view`` from ``string``","2025-06 (Sofia)","","","" -"`P2876R3 <https://wg21.link/P2876R3>`__","Proposal to extend ``std::simd`` with more constructors and accessors","2025-06 (Sofia)","","","" -"`P3480R6 <https://wg21.link/P3480R6>`__","``std::simd`` is a range","2025-06 (Sofia)","","","" -"`P2664R11 <https://wg21.link/P2664R11>`__","Extend ``std::simd`` with permutation API","2025-06 (Sofia)","","","" -"`P3691R1 <https://wg21.link/P3691R1>`__","Reconsider naming of the namespace for ``std::simd``","2025-06 (Sofia)","","","" -"`P3383R3 <https://wg21.link/P3383R3>`__","``mdspan.at()``","2025-06 (Sofia)","","","" -"`P2927R3 <https://wg21.link/P2927R3>`__","Inspecting ``exception_ptr``","2025-06 (Sofia)","","","" -"`P3748R0 <https://wg21.link/P3748R0>`__","Inspecting ``exception_ptr`` should be constexpr","2025-06 (Sofia)","","","" -"`P2830R10 <https://wg21.link/P2830R10>`__","Standardized Constexpr Type Ordering","2025-06 (Sofia)","","","" -"`P3570R2 <https://wg21.link/P3570R2>`__","optional variants in sender/receiver","2025-06 (Sofia)","","","" -"`P3481R5 <https://wg21.link/P3481R5>`__","``std::execution::bulk()`` issues","2025-06 (Sofia)","","","" -"`P3433R1 <https://wg21.link/P3433R1>`__","Allocator Support for Operation States","2025-06 (Sofia)","","","" -"`P3149R11 <https://wg21.link/P3149R11>`__","``async_scope`` - Creating scopes for non-sequential concurrency","2025-06 (Sofia)","","","" -"`P3682R0 <https://wg21.link/P3682R0>`__","Remove ``std::execution::split``","2025-06 (Sofia)","","","" -"`P2079R10 <https://wg21.link/P2079R10>`__","Parallel scheduler","2025-06 (Sofia)","","","" -"`P3557R3 <https://wg21.link/P3557R3>`__","High-Quality Sender Diagnostics with Constexpr Exceptions","2025-06 (Sofia)","","","" -"`P3560R2 <https://wg21.link/P3560R2>`__","Error Handling in Reflection","2025-06 (Sofia)","","","" -"`P3503R3 <https://wg21.link/P3503R3>`__","Make type-erased allocator use in ``promise`` and ``packaged_task`` consistent","2025-06 (Sofia)","","","" -"`P3008R6 <https://wg21.link/P3008R6>`__","Atomic floating-point min/max","2025-06 (Sofia)","","","" -"`P3111R8 <https://wg21.link/P3111R8>`__","Atomic Reduction Operations","2025-06 (Sofia)","","","" -"`P3060R3 <https://wg21.link/P3060R3>`__","Add ``std::views::indices(n)``","2025-06 (Sofia)","","","" -"`P2319R5 <https://wg21.link/P2319R5>`__","Prevent ``path`` presentation problems","2025-06 (Sofia)","","","" -"`P3223R2 <https://wg21.link/P3223R2>`__","Making ``std::istream::ignore`` less surprising","2025-06 (Sofia)","","","" -"`P2781R9 <https://wg21.link/P2781R9>`__","``std::constant_wrapper``","2025-06 (Sofia)","","","" -"`P3697R1 <https://wg21.link/P3697R1>`__","Minor additions to C++26 standard library hardening","2025-06 (Sofia)","","","" -"`P3552R3 <https://wg21.link/P3552R3>`__","Add a Coroutine Task Type","2025-06 (Sofia)","","","" -"`P1317R2 <https://wg21.link/P1317R2>`__","Remove return type deduction in ``std::apply``","2025-06 (Sofia)","","","" +"`P2996R13 <https://wg21.link/P2996R13>`__","Reflection for C++26","2025-06 (Sofia)","","","`#148123 <https://github.com/llvm/llvm-project/issues/148123>`__","" +"`P3394R4 <https://wg21.link/P3394R4>`__","Annotations for Reflection","2025-06 (Sofia)","","","`#148124 <https://github.com/llvm/llvm-project/issues/148124>`__","" +"`P3293R3 <https://wg21.link/P3293R3>`__","Splicing a base class subobject","2025-06 (Sofia)","","","`#148125 <https://github.com/llvm/llvm-project/issues/148125>`__","" +"`P3491R3 <https://wg21.link/P3491R3>`__","``define_static_{string,object,array}``","2025-06 (Sofia)","","","`#148126 <https://github.com/llvm/llvm-project/issues/148126>`__","" +"`P3096R12 <https://wg21.link/P3096R12>`__","Function Parameter Reflection in Reflection for C++26","2025-06 (Sofia)","","","`#148127 <https://github.com/llvm/llvm-project/issues/148127>`__","" +"`P2988R12 <https://wg21.link/P2988R12>`__","``std::optional<T&>``","2025-06 (Sofia)","","","`#148131 <https://github.com/llvm/llvm-project/issues/148131>`__","" +"`P3348R4 <https://wg21.link/P3348R4>`__","C++26 should refer to C23 not C17","2025-06 (Sofia)","","","`#148133 <https://github.com/llvm/llvm-project/issues/148133>`__","" +"`P3037R6 <https://wg21.link/P3037R6>`__","``constexpr`` ``std::shared_ptr`` and friends","2025-06 (Sofia)","","","`#148135 <https://github.com/llvm/llvm-project/issues/148135>`__","" +"`P3284R4 <https://wg21.link/P3284R4>`__","``write_env`` and ``unstoppable`` Sender Adaptors","2025-06 (Sofia)","","","`#148136 <https://github.com/llvm/llvm-project/issues/148136>`__","" +"`P3179R9 <https://wg21.link/P3179R9>`__","Parallel Range Algorithms","2025-06 (Sofia)","","","`#148137 <https://github.com/llvm/llvm-project/issues/148137>`__","" +"`P3709R2 <https://wg21.link/P3709R2>`__","Reconsider parallel ``ranges::rotate_copy`` and ``ranges::reverse_copy``","2025-06 (Sofia)","","","`#148138 <https://github.com/llvm/llvm-project/issues/148138>`__","" +"`P3641R0 <https://wg21.link/P3641R0>`__","Rename ``std::observable`` to ``std::observable_checkpoint``, and add a feature-test macro","2025-06 (Sofia)","","","`#148139 <https://github.com/llvm/llvm-project/issues/148139>`__","" +"`P3044R2 <https://wg21.link/P3044R2>`__","sub-``string_view`` from ``string``","2025-06 (Sofia)","","","`#148140 <https://github.com/llvm/llvm-project/issues/148140>`__","" +"`P2876R3 <https://wg21.link/P2876R3>`__","Proposal to extend ``std::simd`` with more constructors and accessors","2025-06 (Sofia)","","","`#148143 <https://github.com/llvm/llvm-project/issues/148143>`__","" +"`P3480R6 <https://wg21.link/P3480R6>`__","``std::simd`` is a range","2025-06 (Sofia)","","","`#148144 <https://github.com/llvm/llvm-project/issues/148144>`__","" +"`P2664R11 <https://wg21.link/P2664R11>`__","Extend ``std::simd`` with permutation API","2025-06 (Sofia)","","","`#148145 <https://github.com/llvm/llvm-project/issues/148145>`__","" +"`P3691R1 <https://wg21.link/P3691R1>`__","Reconsider naming of the namespace for ``std::simd``","2025-06 (Sofia)","","","`#148148 <https://github.com/llvm/llvm-project/issues/148148>`__","" +"`P3383R3 <https://wg21.link/P3383R3>`__","``mdspan.at()``","2025-06 (Sofia)","","","`#148149 <https://github.com/llvm/llvm-project/issues/148149>`__","" +"`P2927R3 <https://wg21.link/P2927R3>`__","Inspecting ``exception_ptr``","2025-06 (Sofia)","","","`#148150 <https://github.com/llvm/llvm-project/issues/148150>`__","" +"`P3748R0 <https://wg21.link/P3748R0>`__","Inspecting ``exception_ptr`` should be constexpr","2025-06 (Sofia)","","","`#148151 <https://github.com/llvm/llvm-project/issues/148151>`__","" +"`P2830R10 <https://wg21.link/P2830R10>`__","Standardized Constexpr Type Ordering","2025-06 (Sofia)","","","`#148152 <https://github.com/llvm/llvm-project/issues/148152>`__","" +"`P3570R2 <https://wg21.link/P3570R2>`__","optional variants in sender/receiver","2025-06 (Sofia)","","","`#148153 <https://github.com/llvm/llvm-project/issues/148153>`__","" +"`P3481R5 <https://wg21.link/P3481R5>`__","``std::execution::bulk()`` issues","2025-06 (Sofia)","","","`#148155 <https://github.com/llvm/llvm-project/issues/148155>`__","" +"`P3433R1 <https://wg21.link/P3433R1>`__","Allocator Support for Operation States","2025-06 (Sofia)","","","`#148157 <https://github.com/llvm/llvm-project/issues/148157>`__","" +"`P3149R11 <https://wg21.link/P3149R11>`__","``async_scope`` - Creating scopes for non-sequential concurrency","2025-06 (Sofia)","","","`#148158 <https://github.com/llvm/llvm-project/issues/148158>`__","" +"`P3682R0 <https://wg21.link/P3682R0>`__","Remove ``std::execution::split``","2025-06 (Sofia)","","","`#148160 <https://github.com/llvm/llvm-project/issues/148160>`__","" +"`P2079R10 <https://wg21.link/P2079R10>`__","Parallel scheduler","2025-06 (Sofia)","","","`#148161 <https://github.com/llvm/llvm-project/issues/148161>`__","" +"`P3557R3 <https://wg21.link/P3557R3>`__","High-Quality Sender Diagnostics with Constexpr Exceptions","2025-06 (Sofia)","","","`#148162 <https://github.com/llvm/llvm-project/issues/148162>`__","" +"`P3560R2 <https://wg21.link/P3560R2>`__","Error Handling in Reflection","2025-06 (Sofia)","","","`#148128 <https://github.com/llvm/llvm-project/issues/148128>`__","" +"`P3503R3 <https://wg21.link/P3503R3>`__","Make type-erased allocator use in ``promise`` and ``packaged_task`` consistent","2025-06 (Sofia)","","","`#148164 <https://github.com/llvm/llvm-project/issues/148164>`__","" +"`P3008R6 <https://wg21.link/P3008R6>`__","Atomic floating-point min/max","2025-06 (Sofia)","","","`#148168 <https://github.com/llvm/llvm-project/issues/148168>`__","" +"`P3111R8 <https://wg21.link/P3111R8>`__","Atomic Reduction Operations","2025-06 (Sofia)","","","`#148174 <https://github.com/llvm/llvm-project/issues/148174>`__","" +"`P3060R3 <https://wg21.link/P3060R3>`__","Add ``std::views::indices(n)``","2025-06 (Sofia)","","","`#148175 <https://github.com/llvm/llvm-project/issues/148175>`__","" +"`P2319R5 <https://wg21.link/P2319R5>`__","Prevent ``path`` presentation problems","2025-06 (Sofia)","","","`#148177 <https://github.com/llvm/llvm-project/issues/148177>`__","" +"`P3223R2 <https://wg21.link/P3223R2>`__","Making ``std::istream::ignore`` less surprising","2025-06 (Sofia)","","","`#148178 <https://github.com/llvm/llvm-project/issues/148178>`__","" +"`P2781R9 <https://wg21.link/P2781R9>`__","``std::constant_wrapper``","2025-06 (Sofia)","","","`#148179 <https://github.com/llvm/llvm-project/issues/148179>`__","" +"`P3697R1 <https://wg21.link/P3697R1>`__","Minor additions to C++26 standard library hardening","2025-06 (Sofia)","","","`#148180 <https://github.com/llvm/llvm-project/issues/148180>`__","" +"`P3552R3 <https://wg21.link/P3552R3>`__","Add a Coroutine Task Type","2025-06 (Sofia)","","","`#148182 <https://github.com/llvm/llvm-project/issues/148182>`__","" +"`P1317R2 <https://wg21.link/P1317R2>`__","Remove return type deduction in ``std::apply``","2025-06 (Sofia)","","","`#148183 <https://github.com/llvm/llvm-project/issues/148183>`__","" "","","","","","" diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst index 56cf4aca236f..44463385b81a 100644 --- a/libcxx/docs/TestingLibcxx.rst +++ b/libcxx/docs/TestingLibcxx.rst @@ -471,7 +471,7 @@ removed from the Standard. These tests should be written like: Benchmarks ========== -Libc++'s test suite also contains benchmarks. The benchmarks are written using the `Google Benchmark`_ +Libc++'s test suite also contains benchmarks. Many benchmarks are written using the `Google Benchmark`_ library, a copy of which is stored in the LLVM monorepo. For more information about using the Google Benchmark library, see the `official documentation <https://github.com/google/benchmark>`_. @@ -490,27 +490,46 @@ run through ``check-cxx`` for anything, instead run the benchmarks manually usin the instructions for running individual tests. If you want to compare the results of different benchmark runs, we recommend using the -``libcxx-compare-benchmarks`` helper tool. First, configure CMake in a build directory -and run the benchmark: +``compare-benchmarks`` helper tool. Note that the script has some dependencies, which can +be installed with: .. code-block:: bash - $ cmake -S runtimes -B <build1> [...] - $ libcxx/utils/libcxx-lit <build1> libcxx/test/benchmarks/string.bench.cpp --param optimization=speed + $ python -m venv .venv && source .venv/bin/activate # Optional but recommended + $ pip install -r libcxx/utils/requirements.txt -Then, do the same for the second configuration you want to test. Use a different build -directory for that configuration: +Once that's done, start by configuring CMake in a build directory and running one or +more benchmarks, as usual: .. code-block:: bash - $ cmake -S runtimes -B <build2> [...] - $ libcxx/utils/libcxx-lit <build2> libcxx/test/benchmarks/string.bench.cpp --param optimization=speed + $ cmake -S runtimes -B <build> [...] + $ libcxx/utils/libcxx-lit <build> libcxx/test/benchmarks/string.bench.cpp --param optimization=speed -Finally, use ``libcxx-compare-benchmarks`` to compare both: +Then, get the consolidated benchmark output for that run using ``consolidate-benchmarks``: .. code-block:: bash - $ libcxx/utils/libcxx-compare-benchmarks <build1> <build2> libcxx/test/benchmarks/string.bench.cpp + $ libcxx/utils/consolidate-benchmarks <build> > baseline.lnt + +The ``baseline.lnt`` file will contain a consolidation of all the benchmark results present in the build +directory. You can then make the desired modifications to the code, run the benchmark(s) again, and then run: + +.. code-block:: bash + + $ libcxx/utils/consolidate-benchmarks <build> > candidate.lnt + +Finally, use ``compare-benchmarks`` to compare both: + +.. code-block:: bash + + $ libcxx/utils/compare-benchmarks baseline.lnt candidate.lnt + + # Useful one-liner when iterating locally: + $ libcxx/utils/compare-benchmarks baseline.lnt <(libcxx/utils/consolidate-benchmarks <build>) + +The ``compare-benchmarks`` script provides some useful options like creating a chart to easily visualize +differences in a browser window. Use ``compare-benchmarks --help`` for details. .. _`Google Benchmark`: https://github.com/google/benchmark diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index c6b87a34a43e..db918a16e9a6 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -778,7 +778,6 @@ set(files __tree __tuple/find_index.h __tuple/ignore.h - __tuple/make_tuple_types.h __tuple/sfinae_helpers.h __tuple/tuple_element.h __tuple/tuple_like.h @@ -792,7 +791,6 @@ set(files __type_traits/aligned_storage.h __type_traits/aligned_union.h __type_traits/alignment_of.h - __type_traits/can_extract_key.h __type_traits/common_reference.h __type_traits/common_type.h __type_traits/conditional.h @@ -873,6 +871,7 @@ set(files __type_traits/is_trivially_relocatable.h __type_traits/is_unbounded_array.h __type_traits/is_union.h + __type_traits/is_unqualified.h __type_traits/is_unsigned.h __type_traits/is_valid_expansion.h __type_traits/is_void.h @@ -912,6 +911,7 @@ set(files __utility/cmp.h __utility/convert_to_integral.h __utility/declval.h + __utility/default_three_way_comparator.h __utility/element_count.h __utility/empty.h __utility/exception_guard.h @@ -922,6 +922,7 @@ set(files __utility/integer_sequence.h __utility/is_pointer_in_range.h __utility/is_valid_range.h + __utility/lazy_synth_three_way_comparator.h __utility/move.h __utility/no_destroy.h __utility/pair.h @@ -933,6 +934,7 @@ set(files __utility/small_buffer.h __utility/swap.h __utility/to_underlying.h + __utility/try_key_extraction.h __utility/unreachable.h __variant/monostate.h __vector/comparison.h diff --git a/libcxx/include/__algorithm/make_heap.h b/libcxx/include/__algorithm/make_heap.h index e8f0cdb27333..8cfeda2b5981 100644 --- a/libcxx/include/__algorithm/make_heap.h +++ b/libcxx/include/__algorithm/make_heap.h @@ -12,9 +12,11 @@ #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/iterator_operations.h> +#include <__algorithm/push_heap.h> #include <__algorithm/sift_down.h> #include <__config> #include <__iterator/iterator_traits.h> +#include <__type_traits/is_arithmetic.h> #include <__utility/move.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -31,13 +33,23 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) { __comp_ref_type<_Compare> __comp_ref = __comp; - using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type; - difference_type __n = __last - __first; + using __diff_t = __iter_diff_t<_RandomAccessIterator>; + const __diff_t __n = __last - __first; + + static const bool __assume_both_children = is_arithmetic<__iter_value_type<_RandomAccessIterator> >::value; + + // While it would be correct to always assume we have both children, in practice we observed this to be a performance + // improvement only for arithmetic types. + const __diff_t __sift_down_n = __assume_both_children ? ((__n & 1) ? __n : __n - 1) : __n; + if (__n > 1) { // start from the first parent, there is no need to consider children - for (difference_type __start = (__n - 2) / 2; __start >= 0; --__start) { - std::__sift_down<_AlgPolicy>(__first, __comp_ref, __n, __first + __start); + + for (__diff_t __start = (__sift_down_n - 2) / 2; __start >= 0; --__start) { + std::__sift_down<_AlgPolicy, __assume_both_children>(__first, __comp_ref, __sift_down_n, __start); } + if _LIBCPP_CONSTEXPR (__assume_both_children) + std::__sift_up<_AlgPolicy>(__first, __last, __comp, __n); } } diff --git a/libcxx/include/__algorithm/partial_sort.h b/libcxx/include/__algorithm/partial_sort.h index 7f8d0c49147e..4b39ae0cf2df 100644 --- a/libcxx/include/__algorithm/partial_sort.h +++ b/libcxx/include/__algorithm/partial_sort.h @@ -45,7 +45,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator __part for (; __i != __last; ++__i) { if (__comp(*__i, *__first)) { _IterOps<_AlgPolicy>::iter_swap(__i, __first); - std::__sift_down<_AlgPolicy>(__first, __comp, __len, __first); + std::__sift_down<_AlgPolicy, false>(__first, __comp, __len, 0); } } std::__sort_heap<_AlgPolicy>(std::move(__first), std::move(__middle), __comp); diff --git a/libcxx/include/__algorithm/partial_sort_copy.h b/libcxx/include/__algorithm/partial_sort_copy.h index 172f53b290d5..2230dfc9cc4a 100644 --- a/libcxx/include/__algorithm/partial_sort_copy.h +++ b/libcxx/include/__algorithm/partial_sort_copy.h @@ -60,7 +60,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator, _Random for (; __first != __last; ++__first) if (std::__invoke(__comp, std::__invoke(__proj1, *__first), std::__invoke(__proj2, *__result_first))) { *__result_first = *__first; - std::__sift_down<_AlgPolicy>(__result_first, __projected_comp, __len, __result_first); + std::__sift_down<_AlgPolicy, false>(__result_first, __projected_comp, __len, 0); } std::__sort_heap<_AlgPolicy>(__result_first, __r, __projected_comp); } diff --git a/libcxx/include/__algorithm/sift_down.h b/libcxx/include/__algorithm/sift_down.h index 42803e30631f..e01c9b2b00f8 100644 --- a/libcxx/include/__algorithm/sift_down.h +++ b/libcxx/include/__algorithm/sift_down.h @@ -24,59 +24,60 @@ _LIBCPP_PUSH_MACROS _LIBCPP_BEGIN_NAMESPACE_STD -template <class _AlgPolicy, class _Compare, class _RandomAccessIterator> +template <class _AlgPolicy, bool __assume_both_children, class _Compare, class _RandomAccessIterator> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __sift_down(_RandomAccessIterator __first, _Compare&& __comp, - typename iterator_traits<_RandomAccessIterator>::difference_type __len, - _RandomAccessIterator __start) { + __iter_diff_t<_RandomAccessIterator> __len, + __iter_diff_t<_RandomAccessIterator> __start) { using _Ops = _IterOps<_AlgPolicy>; typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; // left-child of __start is at 2 * __start + 1 // right-child of __start is at 2 * __start + 2 - difference_type __child = __start - __first; + difference_type __child = __start; if (__len < 2 || (__len - 2) / 2 < __child) return; - __child = 2 * __child + 1; - _RandomAccessIterator __child_i = __first + __child; + __child = 2 * __child + 1; - if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { + if _LIBCPP_CONSTEXPR (__assume_both_children) { + // right-child exists and is greater than left-child + __child += __comp(__first[__child], __first[__child + 1]); + } else if ((__child + 1) < __len && __comp(__first[__child], __first[__child + 1])) { // right-child exists and is greater than left-child - ++__child_i; ++__child; } // check if we are in heap-order - if (__comp(*__child_i, *__start)) + if (__comp(__first[__child], __first[__start])) // we are, __start is larger than its largest child return; - value_type __top(_Ops::__iter_move(__start)); + value_type __top(_Ops::__iter_move(__first + __start)); do { // we are not in heap-order, swap the parent with its largest child - *__start = _Ops::__iter_move(__child_i); - __start = __child_i; + __first[__start] = _Ops::__iter_move(__first + __child); + __start = __child; if ((__len - 2) / 2 < __child) break; // recompute the child based off of the updated parent - __child = 2 * __child + 1; - __child_i = __first + __child; + __child = 2 * __child + 1; - if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { + if _LIBCPP_CONSTEXPR (__assume_both_children) { + __child += __comp(__first[__child], __first[__child + 1]); + } else if ((__child + 1) < __len && __comp(__first[__child], __first[__child + 1])) { // right-child exists and is greater than left-child - ++__child_i; ++__child; } // check if we are in heap-order - } while (!__comp(*__child_i, __top)); - *__start = std::move(__top); + } while (!__comp(__first[__child], __top)); + __first[__start] = std::move(__top); } template <class _AlgPolicy, class _Compare, class _RandomAccessIterator> diff --git a/libcxx/include/__algorithm/simd_utils.h b/libcxx/include/__algorithm/simd_utils.h index 07fef20f6166..96b074c063a5 100644 --- a/libcxx/include/__algorithm/simd_utils.h +++ b/libcxx/include/__algorithm/simd_utils.h @@ -123,7 +123,7 @@ template <class _Tp, size_t _Np> [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_t __find_first_set(__simd_vector<_Tp, _Np> __vec) noexcept { using __mask_vec = __simd_vector<bool, _Np>; - // This has MSan disabled du to https://github.com/llvm/llvm-project/issues/85876 + // This has MSan disabled du to https://llvm.org/PR85876 auto __impl = [&]<class _MaskT>(_MaskT) _LIBCPP_NO_SANITIZE("memory") noexcept { # if defined(_LIBCPP_BIG_ENDIAN) return std::min<size_t>( diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h index 06cb5b8ce705..8aa894e9228c 100644 --- a/libcxx/include/__algorithm/sort.h +++ b/libcxx/include/__algorithm/sort.h @@ -860,6 +860,9 @@ __sort<__less<long double>&, long double*>(long double*, long double*, __less<lo template <class _AlgPolicy, class _RandomAccessIterator, class _Comp> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __sort_dispatch(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) { + if (__first == __last) // log(0) is undefined, so don't try computing the depth + return; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; difference_type __depth_limit = 2 * std::__bit_log2(std::__to_unsigned_like(__last - __first)); diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h index eead49dde619..3554ff516995 100644 --- a/libcxx/include/__atomic/atomic.h +++ b/libcxx/include/__atomic/atomic.h @@ -350,7 +350,7 @@ private: // &Context.getTargetInfo().getLongDoubleFormat() == // &llvm::APFloat::x87DoubleExtended()) // For more info - // https://github.com/llvm/llvm-project/issues/68602 + // https://llvm.org/PR68602 // https://reviews.llvm.org/D53965 return !__is_fp80_long_double(); # endif @@ -367,7 +367,7 @@ private: while (!__self.compare_exchange_weak(__old, __new, __m, memory_order_relaxed)) { # ifdef _LIBCPP_COMPILER_CLANG_BASED if constexpr (__is_fp80_long_double()) { - // https://github.com/llvm/llvm-project/issues/47978 + // https://llvm.org/PR47978 // clang bug: __old is not updated on failure for atomic<long double>::compare_exchange_weak // Note __old = __self.load(memory_order_relaxed) will not work std::__cxx_atomic_load_inplace(std::addressof(__self.__a_), std::addressof(__old), memory_order_relaxed); diff --git a/libcxx/include/__bit/bit_log2.h b/libcxx/include/__bit/bit_log2.h index 8077cd91d6fd..9ceeec1b2bc9 100644 --- a/libcxx/include/__bit/bit_log2.h +++ b/libcxx/include/__bit/bit_log2.h @@ -9,6 +9,7 @@ #ifndef _LIBCPP___BIT_BIT_LOG2_H #define _LIBCPP___BIT_BIT_LOG2_H +#include <__assert> #include <__bit/countl.h> #include <__config> #include <__type_traits/integer_traits.h> @@ -23,6 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class _Tp> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __bit_log2(_Tp __t) _NOEXCEPT { static_assert(__is_unsigned_integer_v<_Tp>, "__bit_log2 requires an unsigned integer type"); + _LIBCPP_ASSERT_INTERNAL(__t != 0, "logarithm of 0 is undefined"); return numeric_limits<_Tp>::digits - 1 - std::__countl_zero(__t); } diff --git a/libcxx/include/__charconv/from_chars_result.h b/libcxx/include/__charconv/from_chars_result.h index a7bfd6530a8a..b4ecea3d1145 100644 --- a/libcxx/include/__charconv/from_chars_result.h +++ b/libcxx/include/__charconv/from_chars_result.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 17 -struct _LIBCPP_EXPORTED_FROM_ABI from_chars_result { +struct from_chars_result { const char* ptr; errc ec; # if _LIBCPP_STD_VER >= 20 diff --git a/libcxx/include/__charconv/to_chars_result.h b/libcxx/include/__charconv/to_chars_result.h index 41dea4ab1472..a3cd4e28d017 100644 --- a/libcxx/include/__charconv/to_chars_result.h +++ b/libcxx/include/__charconv/to_chars_result.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 17 -struct _LIBCPP_EXPORTED_FROM_ABI to_chars_result { +struct to_chars_result { char* ptr; errc ec; # if _LIBCPP_STD_VER >= 20 diff --git a/libcxx/include/__config b/libcxx/include/__config index 77a71b6cf1ca..23b9123fa691 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -934,7 +934,7 @@ typedef __char32_t char32_t; # endif # endif -# if defined(__FreeBSD__) && defined(__clang__) && __has_attribute(__no_thread_safety_analysis__) +# if __has_attribute(__no_thread_safety_analysis__) # define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS __attribute__((__no_thread_safety_analysis__)) # else # define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS @@ -1156,6 +1156,13 @@ typedef __char32_t char32_t; # define _LIBCPP_LIFETIMEBOUND # endif +// This is to work around https://llvm.org/PR156809 +# ifndef _LIBCPP_CXX03_LANG +# define _LIBCPP_CTOR_LIFETIMEBOUND _LIBCPP_LIFETIMEBOUND +# else +# define _LIBCPP_CTOR_LIFETIMEBOUND +# endif + # if __has_cpp_attribute(_Clang::__noescape__) # define _LIBCPP_NOESCAPE [[_Clang::__noescape__]] # else diff --git a/libcxx/include/__configuration/abi.h b/libcxx/include/__configuration/abi.h index a75cd0a67533..2d33b9c03090 100644 --- a/libcxx/include/__configuration/abi.h +++ b/libcxx/include/__configuration/abi.h @@ -72,6 +72,7 @@ # define _LIBCPP_ABI_NO_FILESYSTEM_INLINE_NAMESPACE # define _LIBCPP_ABI_NO_ITERATOR_BASES # define _LIBCPP_ABI_NO_RANDOM_DEVICE_COMPATIBILITY_LAYOUT +# define _LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER # define _LIBCPP_ABI_OPTIMIZED_FUNCTION # define _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO # define _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION @@ -98,11 +99,20 @@ # endif #endif +// TODO(LLVM 22): Remove this check +#if defined(_LIBCPP_ABI_NO_ITERATOR_BASES) && !defined(_LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER) +# ifndef _LIBCPP_ONLY_NO_ITERATOR_BASES +# error "You probably want to define _LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER. This has been split out from" \ + " _LIBCPP_ABI_NO_ITERATOR_BASES to allow only removing the second iterator member, since they aren't really related." \ + "If you actually want this ABI configuration, please define _LIBCPP_ONLY_NO_ITERATOR_BASES instead." +# endif +#endif + // We had some bugs where we use [[no_unique_address]] together with construct_at, // which causes UB as the call on construct_at could write to overlapping subobjects // -// https://github.com/llvm/llvm-project/issues/70506 -// https://github.com/llvm/llvm-project/issues/70494 +// https://llvm.org/PR70506 +// https://llvm.org/PR70494 // // To fix the bug we had to change the ABI of some classes to remove [[no_unique_address]] under certain conditions. // The macro below is used for all classes whose ABI have changed as part of fixing these bugs. diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h index ae58e36b508b..2fbc34a3cf8a 100644 --- a/libcxx/include/__configuration/availability.h +++ b/libcxx/include/__configuration/availability.h @@ -72,7 +72,7 @@ // // We also allow users to force-disable availability markup via the `_LIBCPP_DISABLE_AVAILABILITY` // macro because that is the only way to work around a Clang bug related to availability -// attributes: https://github.com/llvm/llvm-project/issues/134151. +// attributes: https://llvm.org/PR134151. // Once that bug has been fixed, we should remove the macro. #if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCXXABI_BUILDING_LIBRARY) || \ !defined(_LIBCPP_COMPILER_CLANG_BASED) || defined(_LIBCPP_DISABLE_AVAILABILITY) @@ -307,7 +307,7 @@ // This controls the availability of the C++17 std::pmr library, // which is implemented in large part in the built library. // -// TODO: Enable std::pmr markup once https://github.com/llvm/llvm-project/issues/40340 has been fixed +// TODO: Enable std::pmr markup once https://llvm.org/PR40340 has been fixed // Until then, it is possible for folks to try to use `std::pmr` when back-deploying to targets that don't support // it and it'll be a load-time error, but we don't have a good alternative because the library won't compile if we // use availability annotations until that bug has been fixed. diff --git a/libcxx/include/__cxx03/__config b/libcxx/include/__cxx03/__config index 9b88a495055e..d574eab8a12b 100644 --- a/libcxx/include/__cxx03/__config +++ b/libcxx/include/__cxx03/__config @@ -622,18 +622,6 @@ typedef __char32_t char32_t; # define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION # endif -// It is not yet possible to use aligned_alloc() on all Apple platforms since -// 10.15 was the first version to ship an implementation of aligned_alloc(). -# if defined(__APPLE__) -# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) -# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC -# endif -# elif defined(__ANDROID__) && __ANDROID_API__ < 28 -// Android only provides aligned_alloc when targeting API 28 or higher. -# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC -# endif - # if defined(__APPLE__) || defined(__FreeBSD__) # define _LIBCPP_HAS_DEFAULTRUNELOCALE # endif diff --git a/libcxx/include/__cxx03/__iterator/prev.h b/libcxx/include/__cxx03/__iterator/prev.h index dc1bdaf58402..32f6e66dac9a 100644 --- a/libcxx/include/__cxx03/__iterator/prev.h +++ b/libcxx/include/__cxx03/__iterator/prev.h @@ -15,16 +15,20 @@ #include <__cxx03/__iterator/advance.h> #include <__cxx03/__iterator/iterator_traits.h> #include <__cxx03/__type_traits/enable_if.h> +#include <__cxx03/__utility/move.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__cxx03/__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0> inline _LIBCPP_HIDE_FROM_ABI _InputIter -prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) { +prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n) { // Calling `advance` with a negative value on a non-bidirectional iterator is a no-op in the current implementation. // Note that this check duplicates the similar check in `std::advance`. _LIBCPP_ASSERT_PEDANTIC(__n <= 0 || __has_bidirectional_iterator_category<_InputIter>::value, @@ -33,6 +37,18 @@ prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = return __x; } +// LWG 3197 +// It is unclear what the implications of "BidirectionalIterator" in the standard are. +// However, calling std::prev(non-bidi-iterator) is obviously an error and we should catch it at compile time. +template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0> +[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _InputIter prev(_InputIter __it) { + static_assert(__has_bidirectional_iterator_category<_InputIter>::value, + "Attempt to prev(it) with a non-bidirectional iterator"); + return std::prev(std::move(__it), 1); +} + +_LIBCPP_POP_MACROS + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___CXX03___ITERATOR_PREV_H diff --git a/libcxx/include/__cxx03/__locale b/libcxx/include/__cxx03/__locale index d5faa89b99fc..86160bcdcbd5 100644 --- a/libcxx/include/__cxx03/__locale +++ b/libcxx/include/__cxx03/__locale @@ -582,18 +582,6 @@ public: #endif _LIBCPP_HIDE_FROM_ABI const mask* table() const _NOEXCEPT { return __tab_; } static const mask* classic_table() _NOEXCEPT; -#if defined(__GLIBC__) || defined(__EMSCRIPTEN__) - static const int* __classic_upper_table() _NOEXCEPT; - static const int* __classic_lower_table() _NOEXCEPT; -#endif -#if defined(__NetBSD__) - static const short* __classic_upper_table() _NOEXCEPT; - static const short* __classic_lower_table() _NOEXCEPT; -#endif -#if defined(__MVS__) - static const unsigned short* __classic_upper_table() _NOEXCEPT; - static const unsigned short* __classic_lower_table() _NOEXCEPT; -#endif protected: ~ctype() override; diff --git a/libcxx/include/__cxx03/__mutex/once_flag.h b/libcxx/include/__cxx03/__mutex/once_flag.h index eaeaa6121bff..529aa7707177 100644 --- a/libcxx/include/__cxx03/__mutex/once_flag.h +++ b/libcxx/include/__cxx03/__mutex/once_flag.h @@ -10,6 +10,7 @@ #define _LIBCPP___CXX03___MUTEX_ONCE_FLAG_H #include <__cxx03/__config> +#include <__cxx03/__memory/addressof.h> #include <__cxx03/__memory/shared_ptr.h> // __libcpp_acquire_load #include <__cxx03/__tuple/tuple_indices.h> #include <__cxx03/__tuple/tuple_size.h> @@ -82,7 +83,7 @@ template <class _Callable> inline _LIBCPP_HIDE_FROM_ABI void call_once(once_flag& __flag, _Callable& __func) { if (__libcpp_acquire_load(&__flag.__state_) != once_flag::_Complete) { __call_once_param<_Callable> __p(__func); - std::__call_once(__flag.__state_, &__p, &__call_once_proxy<_Callable>); + std::__call_once(__flag.__state_, std::addressof(__p), std::addressof(__call_once_proxy<_Callable>)); } } @@ -90,7 +91,7 @@ template <class _Callable> inline _LIBCPP_HIDE_FROM_ABI void call_once(once_flag& __flag, const _Callable& __func) { if (__libcpp_acquire_load(&__flag.__state_) != once_flag::_Complete) { __call_once_param<const _Callable> __p(__func); - std::__call_once(__flag.__state_, &__p, &__call_once_proxy<const _Callable>); + std::__call_once(__flag.__state_, std::addressof(__p), std::addressof(__call_once_proxy<const _Callable>)); } } diff --git a/libcxx/include/__cxx03/bitset b/libcxx/include/__cxx03/bitset index 63d2c23a73bd..37ad674686ba 100644 --- a/libcxx/include/__cxx03/bitset +++ b/libcxx/include/__cxx03/bitset @@ -185,9 +185,9 @@ protected: __storage_type __first_[_N_words]; typedef __bit_reference<__bitset> reference; - typedef __bit_const_reference<__bitset> const_reference; - typedef __bit_iterator<__bitset, false> iterator; - typedef __bit_iterator<__bitset, true> const_iterator; + typedef __bit_const_reference<__bitset> __const_reference; + typedef __bit_iterator<__bitset, false> __iterator; + typedef __bit_iterator<__bitset, true> __const_iterator; _LIBCPP_HIDE_FROM_ABI __bitset() _NOEXCEPT; _LIBCPP_HIDE_FROM_ABI explicit __bitset(unsigned long long __v) _NOEXCEPT; @@ -195,14 +195,14 @@ protected: _LIBCPP_HIDE_FROM_ABI reference __make_ref(size_t __pos) _NOEXCEPT { return reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word); } - _LIBCPP_HIDE_FROM_ABI const_reference __make_ref(size_t __pos) const _NOEXCEPT { - return const_reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word); + _LIBCPP_HIDE_FROM_ABI __const_reference __make_ref(size_t __pos) const _NOEXCEPT { + return __const_reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word); } - _LIBCPP_HIDE_FROM_ABI iterator __make_iter(size_t __pos) _NOEXCEPT { - return iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word); + _LIBCPP_HIDE_FROM_ABI __iterator __make_iter(size_t __pos) _NOEXCEPT { + return __iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word); } - _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(size_t __pos) const _NOEXCEPT { - return const_iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word); + _LIBCPP_HIDE_FROM_ABI __const_iterator __make_iter(size_t __pos) const _NOEXCEPT { + return __const_iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word); } _LIBCPP_HIDE_FROM_ABI void operator&=(const __bitset& __v) _NOEXCEPT; @@ -302,8 +302,8 @@ _LIBCPP_HIDE_FROM_ABI void __bitset<_N_words, _Size>::flip() _NOEXCEPT { template <size_t _N_words, size_t _Size> _LIBCPP_HIDE_FROM_ABI unsigned long __bitset<_N_words, _Size>::to_ulong(false_type) const { - const_iterator __e = __make_iter(_Size); - const_iterator __i = std::find(__make_iter(sizeof(unsigned long) * CHAR_BIT), __e, true); + __const_iterator __e = __make_iter(_Size); + __const_iterator __i = std::find(__make_iter(sizeof(unsigned long) * CHAR_BIT), __e, true); if (__i != __e) __throw_overflow_error("bitset to_ulong overflow error"); @@ -317,8 +317,8 @@ inline _LIBCPP_HIDE_FROM_ABI unsigned long __bitset<_N_words, _Size>::to_ulong(t template <size_t _N_words, size_t _Size> _LIBCPP_HIDE_FROM_ABI unsigned long long __bitset<_N_words, _Size>::to_ullong(false_type) const { - const_iterator __e = __make_iter(_Size); - const_iterator __i = std::find(__make_iter(sizeof(unsigned long long) * CHAR_BIT), __e, true); + __const_iterator __e = __make_iter(_Size); + __const_iterator __i = std::find(__make_iter(sizeof(unsigned long long) * CHAR_BIT), __e, true); if (__i != __e) __throw_overflow_error("bitset to_ullong overflow error"); @@ -410,9 +410,9 @@ protected: __storage_type __first_; typedef __bit_reference<__bitset> reference; - typedef __bit_const_reference<__bitset> const_reference; - typedef __bit_iterator<__bitset, false> iterator; - typedef __bit_iterator<__bitset, true> const_iterator; + typedef __bit_const_reference<__bitset> __const_reference; + typedef __bit_iterator<__bitset, false> __iterator; + typedef __bit_iterator<__bitset, true> __const_iterator; _LIBCPP_HIDE_FROM_ABI __bitset() _NOEXCEPT; _LIBCPP_HIDE_FROM_ABI explicit __bitset(unsigned long long __v) _NOEXCEPT; @@ -420,14 +420,14 @@ protected: _LIBCPP_HIDE_FROM_ABI reference __make_ref(size_t __pos) _NOEXCEPT { return reference(&__first_, __storage_type(1) << __pos); } - _LIBCPP_HIDE_FROM_ABI const_reference __make_ref(size_t __pos) const _NOEXCEPT { - return const_reference(&__first_, __storage_type(1) << __pos); + _LIBCPP_HIDE_FROM_ABI __const_reference __make_ref(size_t __pos) const _NOEXCEPT { + return __const_reference(&__first_, __storage_type(1) << __pos); } - _LIBCPP_HIDE_FROM_ABI iterator __make_iter(size_t __pos) _NOEXCEPT { - return iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word); + _LIBCPP_HIDE_FROM_ABI __iterator __make_iter(size_t __pos) _NOEXCEPT { + return __iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word); } - _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(size_t __pos) const _NOEXCEPT { - return const_iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word); + _LIBCPP_HIDE_FROM_ABI __const_iterator __make_iter(size_t __pos) const _NOEXCEPT { + return __const_iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word); } _LIBCPP_HIDE_FROM_ABI void operator&=(const __bitset& __v) _NOEXCEPT; @@ -522,17 +522,17 @@ protected: friend struct __bit_array<__bitset>; typedef __bit_reference<__bitset> reference; - typedef __bit_const_reference<__bitset> const_reference; - typedef __bit_iterator<__bitset, false> iterator; - typedef __bit_iterator<__bitset, true> const_iterator; + typedef __bit_const_reference<__bitset> __const_reference; + typedef __bit_iterator<__bitset, false> __iterator; + typedef __bit_iterator<__bitset, true> __const_iterator; _LIBCPP_HIDE_FROM_ABI __bitset() _NOEXCEPT; _LIBCPP_HIDE_FROM_ABI explicit __bitset(unsigned long long) _NOEXCEPT; _LIBCPP_HIDE_FROM_ABI reference __make_ref(size_t) _NOEXCEPT { return reference(nullptr, 1); } - _LIBCPP_HIDE_FROM_ABI const_reference __make_ref(size_t) const _NOEXCEPT { return const_reference(nullptr, 1); } - _LIBCPP_HIDE_FROM_ABI iterator __make_iter(size_t) _NOEXCEPT { return iterator(nullptr, 0); } - _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(size_t) const _NOEXCEPT { return const_iterator(nullptr, 0); } + _LIBCPP_HIDE_FROM_ABI __const_reference __make_ref(size_t) const _NOEXCEPT { return __const_reference(nullptr, 1); } + _LIBCPP_HIDE_FROM_ABI __iterator __make_iter(size_t) _NOEXCEPT { return __iterator(nullptr, 0); } + _LIBCPP_HIDE_FROM_ABI __const_iterator __make_iter(size_t) const _NOEXCEPT { return __const_iterator(nullptr, 0); } _LIBCPP_HIDE_FROM_ABI void operator&=(const __bitset&) _NOEXCEPT {} _LIBCPP_HIDE_FROM_ABI void operator|=(const __bitset&) _NOEXCEPT {} @@ -563,15 +563,15 @@ class _LIBCPP_TEMPLATE_VIS bitset : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size> { public: static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1; - typedef __bitset<__n_words, _Size> base; + typedef __bitset<__n_words, _Size> __base; public: - typedef typename base::reference reference; - typedef typename base::const_reference const_reference; + typedef typename __base::reference reference; + typedef typename __base::__const_reference __const_reference; // 23.3.5.1 constructors: _LIBCPP_HIDE_FROM_ABI bitset() _NOEXCEPT {} - _LIBCPP_HIDE_FROM_ABI bitset(unsigned long long __v) _NOEXCEPT : base(__v) {} + _LIBCPP_HIDE_FROM_ABI bitset(unsigned long long __v) _NOEXCEPT : __base(__v) {} template <class _CharT, __enable_if_t<_IsCharLikeType<_CharT>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI explicit bitset( const _CharT* __str, @@ -613,11 +613,11 @@ public: // element access: #ifdef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL - _LIBCPP_HIDE_FROM_ABI bool operator[](size_t __p) const { return base::__make_ref(__p); } + _LIBCPP_HIDE_FROM_ABI bool operator[](size_t __p) const { return __base::__make_ref(__p); } #else - _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_t __p) const { return base::__make_ref(__p); } + _LIBCPP_HIDE_FROM_ABI __const_reference operator[](size_t __p) const { return __base::__make_ref(__p); } #endif - _LIBCPP_HIDE_FROM_ABI reference operator[](size_t __p) { return base::__make_ref(__p); } + _LIBCPP_HIDE_FROM_ABI reference operator[](size_t __p) { return __base::__make_ref(__p); } _LIBCPP_HIDE_FROM_ABI unsigned long to_ulong() const; _LIBCPP_HIDE_FROM_ABI unsigned long long to_ullong() const; template <class _CharT, class _Traits, class _Allocator> @@ -656,51 +656,51 @@ private: _CharT __c = __str[__mp - 1 - __i]; (*this)[__i] = _Traits::eq(__c, __one); } - std::fill(base::__make_iter(__i), base::__make_iter(_Size), false); + std::fill(__base::__make_iter(__i), __base::__make_iter(_Size), false); } - _LIBCPP_HIDE_FROM_ABI size_t __hash_code() const _NOEXCEPT { return base::__hash_code(); } + _LIBCPP_HIDE_FROM_ABI size_t __hash_code() const _NOEXCEPT { return __base::__hash_code(); } friend struct hash<bitset>; }; template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator&=(const bitset& __rhs) _NOEXCEPT { - base::operator&=(__rhs); + __base::operator&=(__rhs); return *this; } template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator|=(const bitset& __rhs) _NOEXCEPT { - base::operator|=(__rhs); + __base::operator|=(__rhs); return *this; } template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator^=(const bitset& __rhs) _NOEXCEPT { - base::operator^=(__rhs); + __base::operator^=(__rhs); return *this; } template <size_t _Size> _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT { __pos = std::min(__pos, _Size); - std::copy_backward(base::__make_iter(0), base::__make_iter(_Size - __pos), base::__make_iter(_Size)); - std::fill_n(base::__make_iter(0), __pos, false); + std::copy_backward(__base::__make_iter(0), __base::__make_iter(_Size - __pos), __base::__make_iter(_Size)); + std::fill_n(__base::__make_iter(0), __pos, false); return *this; } template <size_t _Size> _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT { __pos = std::min(__pos, _Size); - std::copy(base::__make_iter(__pos), base::__make_iter(_Size), base::__make_iter(0)); - std::fill_n(base::__make_iter(_Size - __pos), __pos, false); + std::copy(__base::__make_iter(__pos), __base::__make_iter(_Size), __base::__make_iter(0)); + std::fill_n(__base::__make_iter(_Size - __pos), __pos, false); return *this; } template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::set() _NOEXCEPT { - std::fill_n(base::__make_iter(0), _Size, true); + std::fill_n(__base::__make_iter(0), _Size, true); return *this; } @@ -715,7 +715,7 @@ _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::set(size_t __pos, bool __val template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::reset() _NOEXCEPT { - std::fill_n(base::__make_iter(0), _Size, false); + std::fill_n(__base::__make_iter(0), _Size, false); return *this; } @@ -737,7 +737,7 @@ inline _LIBCPP_HIDE_FROM_ABI bitset<_Size> bitset<_Size>::operator~() const _NOE template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::flip() _NOEXCEPT { - base::flip(); + __base::flip(); return *this; } @@ -746,19 +746,19 @@ _LIBCPP_HIDE_FROM_ABI bitset<_Size>& bitset<_Size>::flip(size_t __pos) { if (__pos >= _Size) __throw_out_of_range("bitset flip argument out of range"); - reference __r = base::__make_ref(__pos); + reference __r = __base::__make_ref(__pos); __r = ~__r; return *this; } template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI unsigned long bitset<_Size>::to_ulong() const { - return base::to_ulong(); + return __base::to_ulong(); } template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI unsigned long long bitset<_Size>::to_ullong() const { - return base::to_ullong(); + return __base::to_ullong(); } template <size_t _Size> @@ -795,12 +795,12 @@ bitset<_Size>::to_string(char __zero, char __one) const { template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI size_t bitset<_Size>::count() const _NOEXCEPT { - return static_cast<size_t>(std::count(base::__make_iter(0), base::__make_iter(_Size), true)); + return static_cast<size_t>(std::count(__base::__make_iter(0), __base::__make_iter(_Size), true)); } template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT { - return std::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0)); + return std::equal(__base::__make_iter(0), __base::__make_iter(_Size), __rhs.__make_iter(0)); } template <size_t _Size> @@ -818,12 +818,12 @@ _LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::test(size_t __pos) const { template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::all() const _NOEXCEPT { - return base::all(); + return __base::all(); } template <size_t _Size> inline _LIBCPP_HIDE_FROM_ABI bool bitset<_Size>::any() const _NOEXCEPT { - return base::any(); + return __base::any(); } template <size_t _Size> diff --git a/libcxx/include/__cxx03/forward_list b/libcxx/include/__cxx03/forward_list index 8a8b5f289e38..da7d9f18f0bc 100644 --- a/libcxx/include/__cxx03/forward_list +++ b/libcxx/include/__cxx03/forward_list @@ -572,12 +572,12 @@ void __forward_list_base<_Tp, _Alloc>::clear() _NOEXCEPT { template <class _Tp, class _Alloc /*= allocator<_Tp>*/> class _LIBCPP_TEMPLATE_VIS forward_list : private __forward_list_base<_Tp, _Alloc> { - typedef __forward_list_base<_Tp, _Alloc> base; - typedef typename base::__node_allocator __node_allocator; - typedef typename base::__node_type __node_type; - typedef typename base::__node_traits __node_traits; - typedef typename base::__node_pointer __node_pointer; - typedef typename base::__begin_node_pointer __begin_node_pointer; + typedef __forward_list_base<_Tp, _Alloc> __base; + typedef typename __base::__node_allocator __node_allocator; + typedef typename __base::__node_type __node_type; + typedef typename __base::__node_traits __node_traits; + typedef typename __base::__node_pointer __node_pointer; + typedef typename __base::__begin_node_pointer __begin_node_pointer; public: typedef _Tp value_type; @@ -598,8 +598,8 @@ public: typedef typename allocator_traits<allocator_type>::size_type size_type; typedef typename allocator_traits<allocator_type>::difference_type difference_type; - typedef typename base::iterator iterator; - typedef typename base::const_iterator const_iterator; + typedef typename __base::iterator iterator; + typedef typename __base::const_iterator const_iterator; typedef void __remove_return_type; _LIBCPP_HIDE_FROM_ABI forward_list() {} // = default; @@ -608,7 +608,7 @@ public: _LIBCPP_HIDE_FROM_ABI forward_list(size_type __n, const value_type& __v); template <__enable_if_t<__is_allocator<_Alloc>::value, int> = 0> - _LIBCPP_HIDE_FROM_ABI forward_list(size_type __n, const value_type& __v, const allocator_type& __a) : base(__a) { + _LIBCPP_HIDE_FROM_ABI forward_list(size_type __n, const value_type& __v, const allocator_type& __a) : __base(__a) { insert_after(cbefore_begin(), __n, __v); } @@ -630,35 +630,37 @@ public: _LIBCPP_HIDE_FROM_ABI void assign(size_type __n, const value_type& __v); - _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT { return allocator_type(base::__alloc()); } + _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT { return allocator_type(__base::__alloc()); } - _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return iterator(base::__before_begin()->__next_); } + _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return iterator(__base::__before_begin()->__next_); } _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { - return const_iterator(base::__before_begin()->__next_); + return const_iterator(__base::__before_begin()->__next_); } _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return iterator(nullptr); } _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return const_iterator(nullptr); } _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { - return const_iterator(base::__before_begin()->__next_); + return const_iterator(__base::__before_begin()->__next_); } _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT { return const_iterator(nullptr); } - _LIBCPP_HIDE_FROM_ABI iterator before_begin() _NOEXCEPT { return iterator(base::__before_begin()); } - _LIBCPP_HIDE_FROM_ABI const_iterator before_begin() const _NOEXCEPT { return const_iterator(base::__before_begin()); } + _LIBCPP_HIDE_FROM_ABI iterator before_begin() _NOEXCEPT { return iterator(__base::__before_begin()); } + _LIBCPP_HIDE_FROM_ABI const_iterator before_begin() const _NOEXCEPT { + return const_iterator(__base::__before_begin()); + } _LIBCPP_HIDE_FROM_ABI const_iterator cbefore_begin() const _NOEXCEPT { - return const_iterator(base::__before_begin()); + return const_iterator(__base::__before_begin()); } _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { - return base::__before_begin()->__next_ == nullptr; + return __base::__before_begin()->__next_ == nullptr; } _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { - return std::min<size_type>(__node_traits::max_size(base::__alloc()), numeric_limits<difference_type>::max()); + return std::min<size_type>(__node_traits::max_size(__base::__alloc()), numeric_limits<difference_type>::max()); } - _LIBCPP_HIDE_FROM_ABI reference front() { return base::__before_begin()->__next_->__get_value(); } - _LIBCPP_HIDE_FROM_ABI const_reference front() const { return base::__before_begin()->__next_->__get_value(); } + _LIBCPP_HIDE_FROM_ABI reference front() { return __base::__before_begin()->__next_->__get_value(); } + _LIBCPP_HIDE_FROM_ABI const_reference front() const { return __base::__before_begin()->__next_->__get_value(); } _LIBCPP_HIDE_FROM_ABI void push_front(const value_type& __v); @@ -675,11 +677,11 @@ public: _LIBCPP_HIDE_FROM_ABI iterator erase_after(const_iterator __p); _LIBCPP_HIDE_FROM_ABI iterator erase_after(const_iterator __f, const_iterator __l); - _LIBCPP_HIDE_FROM_ABI void swap(forward_list& __x) { base::swap(__x); } + _LIBCPP_HIDE_FROM_ABI void swap(forward_list& __x) { __base::swap(__x); } _LIBCPP_HIDE_FROM_ABI void resize(size_type __n); _LIBCPP_HIDE_FROM_ABI void resize(size_type __n, const value_type& __v); - _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { base::clear(); } + _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __base::clear(); } _LIBCPP_HIDE_FROM_ABI void splice_after(const_iterator __p, forward_list&& __x); _LIBCPP_HIDE_FROM_ABI void splice_after(const_iterator __p, forward_list&& __x, const_iterator __i); @@ -716,12 +718,12 @@ private: }; template <class _Tp, class _Alloc> -inline forward_list<_Tp, _Alloc>::forward_list(const allocator_type& __a) : base(__a) {} +inline forward_list<_Tp, _Alloc>::forward_list(const allocator_type& __a) : __base(__a) {} template <class _Tp, class _Alloc> forward_list<_Tp, _Alloc>::forward_list(size_type __n) { if (__n > 0) { - for (__begin_node_pointer __p = base::__before_begin(); __n > 0; --__n, __p = __p->__next_as_begin()) { + for (__begin_node_pointer __p = __base::__before_begin(); __n > 0; --__n, __p = __p->__next_as_begin()) { __p->__next_ = this->__create_node(/* next = */ nullptr); } } @@ -740,26 +742,27 @@ forward_list<_Tp, _Alloc>::forward_list(_InputIterator __f, _InputIterator __l) template <class _Tp, class _Alloc> template <class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> > -forward_list<_Tp, _Alloc>::forward_list(_InputIterator __f, _InputIterator __l, const allocator_type& __a) : base(__a) { +forward_list<_Tp, _Alloc>::forward_list(_InputIterator __f, _InputIterator __l, const allocator_type& __a) + : __base(__a) { insert_after(cbefore_begin(), __f, __l); } template <class _Tp, class _Alloc> forward_list<_Tp, _Alloc>::forward_list(const forward_list& __x) - : base(__node_traits::select_on_container_copy_construction(__x.__alloc())) { + : __base(__node_traits::select_on_container_copy_construction(__x.__alloc())) { insert_after(cbefore_begin(), __x.begin(), __x.end()); } template <class _Tp, class _Alloc> forward_list<_Tp, _Alloc>::forward_list(const forward_list& __x, const __type_identity_t<allocator_type>& __a) - : base(__a) { + : __base(__a) { insert_after(cbefore_begin(), __x.begin(), __x.end()); } template <class _Tp, class _Alloc> forward_list<_Tp, _Alloc>& forward_list<_Tp, _Alloc>::operator=(const forward_list& __x) { if (this != std::addressof(__x)) { - base::__copy_assign_alloc(__x); + __base::__copy_assign_alloc(__x); assign(__x.begin(), __x.end()); } return *this; @@ -800,13 +803,13 @@ void forward_list<_Tp, _Alloc>::assign(size_type __n, const value_type& __v) { template <class _Tp, class _Alloc> void forward_list<_Tp, _Alloc>::push_front(const value_type& __v) { - base::__before_begin()->__next_ = this->__create_node(/* next = */ base::__before_begin()->__next_, __v); + __base::__before_begin()->__next_ = this->__create_node(/* next = */ __base::__before_begin()->__next_, __v); } template <class _Tp, class _Alloc> void forward_list<_Tp, _Alloc>::pop_front() { - __node_pointer __p = base::__before_begin()->__next_; - base::__before_begin()->__next_ = __p->__next_; + __node_pointer __p = __base::__before_begin()->__next_; + __base::__before_begin()->__next_ = __p->__next_; this->__delete_node(__p); } @@ -1082,8 +1085,9 @@ template <class _Tp, class _Alloc> template <class _Compare> void forward_list<_Tp, _Alloc>::merge(forward_list& __x, _Compare __comp) { if (this != std::addressof(__x)) { - base::__before_begin()->__next_ = __merge(base::__before_begin()->__next_, __x.__before_begin()->__next_, __comp); - __x.__before_begin()->__next_ = nullptr; + __base::__before_begin()->__next_ = + __merge(__base::__before_begin()->__next_, __x.__before_begin()->__next_, __comp); + __x.__before_begin()->__next_ = nullptr; } } @@ -1127,7 +1131,7 @@ forward_list<_Tp, _Alloc>::__merge(__node_pointer __f1, __node_pointer __f2, _Co template <class _Tp, class _Alloc> template <class _Compare> inline void forward_list<_Tp, _Alloc>::sort(_Compare __comp) { - base::__before_begin()->__next_ = __sort(base::__before_begin()->__next_, std::distance(begin(), end()), __comp); + __base::__before_begin()->__next_ = __sort(__base::__before_begin()->__next_, std::distance(begin(), end()), __comp); } template <class _Tp, class _Alloc> @@ -1157,7 +1161,7 @@ forward_list<_Tp, _Alloc>::__sort(__node_pointer __f1, difference_type __sz, _Co template <class _Tp, class _Alloc> void forward_list<_Tp, _Alloc>::reverse() _NOEXCEPT { - __node_pointer __p = base::__before_begin()->__next_; + __node_pointer __p = __base::__before_begin()->__next_; if (__p != nullptr) { __node_pointer __f = __p->__next_; __p->__next_ = nullptr; @@ -1167,7 +1171,7 @@ void forward_list<_Tp, _Alloc>::reverse() _NOEXCEPT { __p = __f; __f = __t; } - base::__before_begin()->__next_ = __p; + __base::__before_begin()->__next_ = __p; } } diff --git a/libcxx/include/__cxx03/list b/libcxx/include/__cxx03/list index f863885fbcf9..25aff2f5ebb2 100644 --- a/libcxx/include/__cxx03/list +++ b/libcxx/include/__cxx03/list @@ -612,14 +612,14 @@ void __list_imp<_Tp, _Alloc>::swap(__list_imp& __c) { template <class _Tp, class _Alloc /*= allocator<_Tp>*/> class _LIBCPP_TEMPLATE_VIS list : private __list_imp<_Tp, _Alloc> { - typedef __list_imp<_Tp, _Alloc> base; - typedef typename base::__node_type __node_type; - typedef typename base::__node_allocator __node_allocator; - typedef typename base::__node_pointer __node_pointer; - typedef typename base::__node_alloc_traits __node_alloc_traits; - typedef typename base::__node_base __node_base; - typedef typename base::__node_base_pointer __node_base_pointer; - typedef typename base::__link_pointer __link_pointer; + typedef __list_imp<_Tp, _Alloc> __base; + typedef typename __base::__node_type __node_type; + typedef typename __base::__node_allocator __node_allocator; + typedef typename __base::__node_pointer __node_pointer; + typedef typename __base::__node_alloc_traits __node_alloc_traits; + typedef typename __base::__node_base __node_base; + typedef typename __base::__node_base_pointer __node_base_pointer; + typedef typename __base::__link_pointer __link_pointer; public: typedef _Tp value_type; @@ -629,22 +629,22 @@ public: "Allocator::value_type must be same type as value_type"); typedef value_type& reference; typedef const value_type& const_reference; - typedef typename base::pointer pointer; - typedef typename base::const_pointer const_pointer; - typedef typename base::size_type size_type; - typedef typename base::difference_type difference_type; - typedef typename base::iterator iterator; - typedef typename base::const_iterator const_iterator; + typedef typename __base::pointer pointer; + typedef typename __base::const_pointer const_pointer; + typedef typename __base::size_type size_type; + typedef typename __base::difference_type difference_type; + typedef typename __base::iterator iterator; + typedef typename __base::const_iterator const_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef void __remove_return_type; _LIBCPP_HIDE_FROM_ABI list() {} - _LIBCPP_HIDE_FROM_ABI explicit list(const allocator_type& __a) : base(__a) {} + _LIBCPP_HIDE_FROM_ABI explicit list(const allocator_type& __a) : __base(__a) {} _LIBCPP_HIDE_FROM_ABI explicit list(size_type __n); _LIBCPP_HIDE_FROM_ABI list(size_type __n, const value_type& __x); template <__enable_if_t<__is_allocator<_Alloc>::value, int> = 0> - _LIBCPP_HIDE_FROM_ABI list(size_type __n, const value_type& __x, const allocator_type& __a) : base(__a) { + _LIBCPP_HIDE_FROM_ABI list(size_type __n, const value_type& __x, const allocator_type& __a) : __base(__a) { for (; __n > 0; --__n) push_back(__x); } @@ -666,18 +666,18 @@ public: _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT; - _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return base::__sz(); } - _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return base::empty(); } + _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return __base::__sz(); } + _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return __base::empty(); } _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { - return std::min<size_type>(base::__node_alloc_max_size(), numeric_limits<difference_type >::max()); + return std::min<size_type>(__base::__node_alloc_max_size(), numeric_limits<difference_type >::max()); } - _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return base::begin(); } - _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return base::begin(); } - _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return base::end(); } - _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return base::end(); } - _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { return base::begin(); } - _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT { return base::end(); } + _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return __base::begin(); } + _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return __base::begin(); } + _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return __base::end(); } + _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return __base::end(); } + _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT { return __base::begin(); } + _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT { return __base::end(); } _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() _NOEXCEPT { return reverse_iterator(end()); } _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT { return const_reverse_iterator(end()); } @@ -688,19 +688,19 @@ public: _LIBCPP_HIDE_FROM_ABI reference front() { _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "list::front called on empty list"); - return base::__end_.__next_->__as_node()->__get_value(); + return __base::__end_.__next_->__as_node()->__get_value(); } _LIBCPP_HIDE_FROM_ABI const_reference front() const { _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "list::front called on empty list"); - return base::__end_.__next_->__as_node()->__get_value(); + return __base::__end_.__next_->__as_node()->__get_value(); } _LIBCPP_HIDE_FROM_ABI reference back() { _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "list::back called on empty list"); - return base::__end_.__prev_->__as_node()->__get_value(); + return __base::__end_.__prev_->__as_node()->__get_value(); } _LIBCPP_HIDE_FROM_ABI const_reference back() const { _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "list::back called on empty list"); - return base::__end_.__prev_->__as_node()->__get_value(); + return __base::__end_.__prev_->__as_node()->__get_value(); } _LIBCPP_HIDE_FROM_ABI void push_front(const value_type& __x); @@ -714,8 +714,8 @@ public: template <class _InpIter, __enable_if_t<__has_input_iterator_category<_InpIter>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _InpIter __f, _InpIter __l); - _LIBCPP_HIDE_FROM_ABI void swap(list& __c) { base::swap(__c); } - _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { base::clear(); } + _LIBCPP_HIDE_FROM_ABI void swap(list& __c) { __base::swap(__c); } + _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __base::clear(); } _LIBCPP_HIDE_FROM_ABI void pop_front(); _LIBCPP_HIDE_FROM_ABI void pop_back(); @@ -779,24 +779,24 @@ inline void list<_Tp, _Alloc>::__link_nodes(__link_pointer __p, __link_pointer _ // Link in nodes [__f, __l] at the front of the list template <class _Tp, class _Alloc> inline void list<_Tp, _Alloc>::__link_nodes_at_front(__link_pointer __f, __link_pointer __l) { - __f->__prev_ = base::__end_as_link(); - __l->__next_ = base::__end_.__next_; - __l->__next_->__prev_ = __l; - base::__end_.__next_ = __f; + __f->__prev_ = __base::__end_as_link(); + __l->__next_ = __base::__end_.__next_; + __l->__next_->__prev_ = __l; + __base::__end_.__next_ = __f; } // Link in nodes [__f, __l] at the back of the list template <class _Tp, class _Alloc> inline void list<_Tp, _Alloc>::__link_nodes_at_back(__link_pointer __f, __link_pointer __l) { - __l->__next_ = base::__end_as_link(); - __f->__prev_ = base::__end_.__prev_; - __f->__prev_->__next_ = __f; - base::__end_.__prev_ = __l; + __l->__next_ = __base::__end_as_link(); + __f->__prev_ = __base::__end_.__prev_; + __f->__prev_->__next_ = __f; + __base::__end_.__prev_ = __l; } template <class _Tp, class _Alloc> inline typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::__iterator(size_type __n) { - return __n <= base::__sz() / 2 ? std::next(begin(), __n) : std::prev(end(), base::__sz() - __n); + return __n <= __base::__sz() / 2 ? std::next(begin(), __n) : std::prev(end(), __base::__sz() - __n); } template <class _Tp, class _Alloc> @@ -820,20 +820,20 @@ list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l) { template <class _Tp, class _Alloc> template <class _InpIter, __enable_if_t<__has_input_iterator_category<_InpIter>::value, int> > -list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, const allocator_type& __a) : base(__a) { +list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, const allocator_type& __a) : __base(__a) { for (; __f != __l; ++__f) __emplace_back(*__f); } template <class _Tp, class _Alloc> list<_Tp, _Alloc>::list(const list& __c) - : base(__node_alloc_traits::select_on_container_copy_construction(__c.__node_alloc())) { + : __base(__node_alloc_traits::select_on_container_copy_construction(__c.__node_alloc())) { for (const_iterator __i = __c.begin(), __e = __c.end(); __i != __e; ++__i) push_back(*__i); } template <class _Tp, class _Alloc> -list<_Tp, _Alloc>::list(const list& __c, const __type_identity_t<allocator_type>& __a) : base(__a) { +list<_Tp, _Alloc>::list(const list& __c, const __type_identity_t<allocator_type>& __a) : __base(__a) { for (const_iterator __i = __c.begin(), __e = __c.end(); __i != __e; ++__i) push_back(*__i); } @@ -841,7 +841,7 @@ list<_Tp, _Alloc>::list(const list& __c, const __type_identity_t<allocator_type> template <class _Tp, class _Alloc> inline list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(const list& __c) { if (this != std::addressof(__c)) { - base::__copy_assign_alloc(__c); + __base::__copy_assign_alloc(__c); assign(__c.begin(), __c.end()); } return *this; @@ -880,14 +880,14 @@ void list<_Tp, _Alloc>::assign(size_type __n, const value_type& __x) { template <class _Tp, class _Alloc> inline _Alloc list<_Tp, _Alloc>::get_allocator() const _NOEXCEPT { - return allocator_type(base::__node_alloc()); + return allocator_type(__base::__node_alloc()); } template <class _Tp, class _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, const value_type& __x) { __node_pointer __node = this->__create_node(/* prev = */ nullptr, /* next = */ nullptr, __x); __link_nodes(__p.__ptr_, __node->__as_link(), __node->__as_link()); - ++base::__sz(); + ++__base::__sz(); return iterator(__node->__as_link()); } @@ -921,7 +921,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _ } #endif // _LIBCPP_HAS_NO_EXCEPTIONS __link_nodes(__p.__ptr_, __r.__ptr_, __e.__ptr_); - base::__sz() += __ds; + __base::__sz() += __ds; } return __r; } @@ -963,7 +963,7 @@ list<_Tp, _Alloc>::__insert_with_sentinel(const_iterator __p, _Iterator __f, _Se } #endif // _LIBCPP_HAS_NO_EXCEPTIONS __link_nodes(__p.__ptr_, __r.__ptr_, __e.__ptr_); - base::__sz() += __ds; + __base::__sz() += __ds; } return __r; } @@ -973,7 +973,7 @@ void list<_Tp, _Alloc>::push_front(const value_type& __x) { __node_pointer __node = this->__create_node(/* prev = */ nullptr, /* next = */ nullptr, __x); __link_pointer __nl = __node->__as_link(); __link_nodes_at_front(__nl, __nl); - ++base::__sz(); + ++__base::__sz(); } template <class _Tp, class _Alloc> @@ -981,24 +981,24 @@ void list<_Tp, _Alloc>::push_back(const value_type& __x) { __node_pointer __node = this->__create_node(/* prev = */ nullptr, /* next = */ nullptr, __x); __link_pointer __nl = __node->__as_link(); __link_nodes_at_back(__nl, __nl); - ++base::__sz(); + ++__base::__sz(); } template <class _Tp, class _Alloc> void list<_Tp, _Alloc>::pop_front() { _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "list::pop_front() called with empty list"); - __link_pointer __n = base::__end_.__next_; - base::__unlink_nodes(__n, __n); - --base::__sz(); + __link_pointer __n = __base::__end_.__next_; + __base::__unlink_nodes(__n, __n); + --__base::__sz(); this->__delete_node(__n->__as_node()); } template <class _Tp, class _Alloc> void list<_Tp, _Alloc>::pop_back() { _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "list::pop_back() called on an empty list"); - __link_pointer __n = base::__end_.__prev_; - base::__unlink_nodes(__n, __n); - --base::__sz(); + __link_pointer __n = __base::__end_.__prev_; + __base::__unlink_nodes(__n, __n); + --__base::__sz(); this->__delete_node(__n->__as_node()); } @@ -1007,8 +1007,8 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __p _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__p != end(), "list::erase(iterator) called with a non-dereferenceable iterator"); __link_pointer __n = __p.__ptr_; __link_pointer __r = __n->__next_; - base::__unlink_nodes(__n, __n); - --base::__sz(); + __base::__unlink_nodes(__n, __n); + --__base::__sz(); this->__delete_node(__n->__as_node()); return iterator(__r); } @@ -1016,11 +1016,11 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __p template <class _Tp, class _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l) { if (__f != __l) { - base::__unlink_nodes(__f.__ptr_, __l.__ptr_->__prev_); + __base::__unlink_nodes(__f.__ptr_, __l.__ptr_->__prev_); while (__f != __l) { __link_pointer __n = __f.__ptr_; ++__f; - --base::__sz(); + --__base::__sz(); this->__delete_node(__n->__as_node()); } } @@ -1029,10 +1029,10 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __f template <class _Tp, class _Alloc> void list<_Tp, _Alloc>::resize(size_type __n) { - if (__n < base::__sz()) + if (__n < __base::__sz()) erase(__iterator(__n), end()); - else if (__n > base::__sz()) { - __n -= base::__sz(); + else if (__n > __base::__sz()) { + __n -= __base::__sz(); size_type __ds = 0; __node_pointer __node = this->__create_node(/* prev = */ nullptr, /* next = */ nullptr); ++__ds; @@ -1058,16 +1058,16 @@ void list<_Tp, _Alloc>::resize(size_type __n) { } #endif // _LIBCPP_HAS_NO_EXCEPTIONS __link_nodes_at_back(__r.__ptr_, __e.__ptr_); - base::__sz() += __ds; + __base::__sz() += __ds; } } template <class _Tp, class _Alloc> void list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x) { - if (__n < base::__sz()) + if (__n < __base::__sz()) erase(__iterator(__n), end()); - else if (__n > base::__sz()) { - __n -= base::__sz(); + else if (__n > __base::__sz()) { + __n -= __base::__sz(); size_type __ds = 0; __node_pointer __node = this->__create_node(/* prev = */ nullptr, /* next = */ nullptr, __x); ++__ds; @@ -1093,8 +1093,8 @@ void list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x) { throw; } #endif // _LIBCPP_HAS_NO_EXCEPTIONS - __link_nodes(base::__end_as_link(), __r.__ptr_, __e.__ptr_); - base::__sz() += __ds; + __link_nodes(__base::__end_as_link(), __r.__ptr_, __e.__ptr_); + __base::__sz() += __ds; } } @@ -1105,9 +1105,9 @@ void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c) { if (!__c.empty()) { __link_pointer __f = __c.__end_.__next_; __link_pointer __l = __c.__end_.__prev_; - base::__unlink_nodes(__f, __l); + __base::__unlink_nodes(__f, __l); __link_nodes(__p.__ptr_, __f, __l); - base::__sz() += __c.__sz(); + __base::__sz() += __c.__sz(); __c.__sz() = 0; } } @@ -1116,10 +1116,10 @@ template <class _Tp, class _Alloc> void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i) { if (__p.__ptr_ != __i.__ptr_ && __p.__ptr_ != __i.__ptr_->__next_) { __link_pointer __f = __i.__ptr_; - base::__unlink_nodes(__f, __f); + __base::__unlink_nodes(__f, __f); __link_nodes(__p.__ptr_, __f, __f); --__c.__sz(); - ++base::__sz(); + ++__base::__sz(); } } @@ -1132,9 +1132,9 @@ void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f if (this != std::addressof(__c)) { size_type __s = std::distance(__f, __l) + 1; __c.__sz() -= __s; - base::__sz() += __s; + __base::__sz() += __s; } - base::__unlink_nodes(__first, __last); + __base::__unlink_nodes(__first, __last); __link_nodes(__p.__ptr_, __first, __last); } } @@ -1214,12 +1214,12 @@ void list<_Tp, _Alloc>::merge(list& __c, _Comp __comp) { iterator __m2 = std::next(__f2); for (; __m2 != __e2 && __comp(*__m2, *__f1); ++__m2, (void)++__ds) ; - base::__sz() += __ds; + __base::__sz() += __ds; __c.__sz() -= __ds; __link_pointer __f = __f2.__ptr_; __link_pointer __l = __m2.__ptr_->__prev_; __f2 = __m2; - base::__unlink_nodes(__f, __l); + __base::__unlink_nodes(__f, __l); __m2 = std::next(__f1); __link_nodes(__f1.__ptr_, __f, __l); __f1 = __m2; @@ -1238,7 +1238,7 @@ inline void list<_Tp, _Alloc>::sort() { template <class _Tp, class _Alloc> template <class _Comp> inline void list<_Tp, _Alloc>::sort(_Comp __comp) { - __sort(begin(), end(), base::__sz(), __comp); + __sort(begin(), end(), __base::__sz(), __comp); } template <class _Tp, class _Alloc> @@ -1252,7 +1252,7 @@ list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __ case 2: if (__comp(*--__e2, *__f1)) { __link_pointer __f = __e2.__ptr_; - base::__unlink_nodes(__f, __f); + __base::__unlink_nodes(__f, __f); __link_nodes(__f1.__ptr_, __f, __f); return __e2; } @@ -1270,7 +1270,7 @@ list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __ __link_pointer __l = __m2.__ptr_->__prev_; __r = __f2; __e1 = __f2 = __m2; - base::__unlink_nodes(__f, __l); + __base::__unlink_nodes(__f, __l); __m2 = std::next(__f1); __link_nodes(__f1.__ptr_, __f, __l); __f1 = __m2; @@ -1286,7 +1286,7 @@ list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __ if (__e1 == __f2) __e1 = __m2; __f2 = __m2; - base::__unlink_nodes(__f, __l); + __base::__unlink_nodes(__f, __l); __m2 = std::next(__f1); __link_nodes(__f1.__ptr_, __f, __l); __f1 = __m2; @@ -1298,7 +1298,7 @@ list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __ template <class _Tp, class _Alloc> void list<_Tp, _Alloc>::reverse() _NOEXCEPT { - if (base::__sz() > 1) { + if (__base::__sz() > 1) { iterator __e = end(); for (iterator __i = begin(); __i.__ptr_ != __e.__ptr_;) { std::swap(__i.__ptr_->__prev_, __i.__ptr_->__next_); diff --git a/libcxx/include/__cxx03/locale b/libcxx/include/__cxx03/locale index 64162f5a4ff2..57267ab39022 100644 --- a/libcxx/include/__cxx03/locale +++ b/libcxx/include/__cxx03/locale @@ -2460,6 +2460,8 @@ _LIBCPP_HIDE_FROM_ABI void __double_or_nothing(unique_ptr<_Tp, void (*)(void*)>& __throw_bad_alloc(); if (__owns) __b.release(); + else + std::memcpy(__t, __b.get(), __cur_cap); __b = unique_ptr<_Tp, void (*)(void*)>(__t, free); __new_cap /= sizeof(_Tp); __n = __b.get() + __n_off; @@ -2655,20 +2657,22 @@ _InputIterator money_get<_CharT, _InputIterator>::do_get( char_type __atoms[sizeof(__src) - 1]; __ct.widen(__src, __src + (sizeof(__src) - 1), __atoms); char __nbuf[__bz]; - char* __nc = __nbuf; + char* __nc = __nbuf; + const char* __nc_in = __nc; unique_ptr<char, void (*)(void*)> __h(nullptr, free); if (__wn - __wb.get() > __bz - 2) { __h.reset((char*)malloc(static_cast<size_t>(__wn - __wb.get() + 2))); if (__h.get() == nullptr) __throw_bad_alloc(); - __nc = __h.get(); + __nc = __h.get(); + __nc_in = __nc; } if (__neg) *__nc++ = '-'; for (const char_type* __w = __wb.get(); __w < __wn; ++__w, ++__nc) *__nc = __src[std::find(__atoms, std::end(__atoms), *__w) - __atoms]; *__nc = char(); - if (sscanf(__nbuf, "%Lf", &__v) != 1) + if (sscanf(__nc_in, "%Lf", &__v) != 1) __throw_runtime_error("money_get error"); } if (__b == __e) diff --git a/libcxx/include/__cxx03/string b/libcxx/include/__cxx03/string index 7d54030d0b66..178140486105 100644 --- a/libcxx/include/__cxx03/string +++ b/libcxx/include/__cxx03/string @@ -1101,12 +1101,20 @@ public: _LIBCPP_HIDE_FROM_ABI size_type length() const _NOEXCEPT { return size(); } _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { - size_type __m = __alloc_traits::max_size(__alloc()); - if (__m <= std::numeric_limits<size_type>::max() / 2) { - return __m - __alignment; + if (size_type __m = __alloc_traits::max_size(__alloc()); __m <= std::numeric_limits<size_type>::max() / 2) { + size_type __res = __m - __alignment; + + // When the __endian_factor == 2, our string representation assumes that the capacity + // (including the null terminator) is always even, so we have to make sure the lowest bit isn't set when the + // string grows to max_size() + if (__endian_factor == 2) + __res &= ~size_type(1); + + // We have to allocate space for the null terminator, but max_size() doesn't include it. + return __res - 1; } else { bool __uses_lsb = __endian_factor == 2; - return __uses_lsb ? __m - __alignment : (__m / 2) - __alignment; + return __uses_lsb ? __m - __alignment - 1 : (__m / 2) - __alignment - 1; } } @@ -1970,11 +1978,11 @@ void basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace( size_type __n_add, const value_type* __p_new_stuff) { size_type __ms = max_size(); - if (__delta_cap > __ms - __old_cap - 1) + if (__delta_cap > __ms - __old_cap) __throw_length_error(); pointer __old_p = __get_pointer(); size_type __cap = - __old_cap < __ms / 2 - __alignment ? __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) : __ms - 1; + __old_cap < __ms / 2 - __alignment ? __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) : __ms; __annotate_delete(); auto __allocation = std::__allocate_at_least(__alloc(), __cap + 1); pointer __p = __allocation.ptr; @@ -2017,7 +2025,7 @@ void __throw_length_error(); pointer __old_p = __get_pointer(); size_type __cap = - __old_cap < __ms / 2 - __alignment ? __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) : __ms - 1; + __old_cap < __ms / 2 - __alignment ? __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) : __ms; __annotate_delete(); auto __allocation = std::__allocate_at_least(__alloc(), __cap + 1); pointer __p = __allocation.ptr; diff --git a/libcxx/include/__filesystem/file_status.h b/libcxx/include/__filesystem/file_status.h index da316c8b0274..eecaf3c492f0 100644 --- a/libcxx/include/__filesystem/file_status.h +++ b/libcxx/include/__filesystem/file_status.h @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -class _LIBCPP_EXPORTED_FROM_ABI file_status { +class file_status { public: // constructors _LIBCPP_HIDE_FROM_ABI file_status() noexcept : file_status(file_type::none) {} diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h index 381e5678a585..7f5121020275 100644 --- a/libcxx/include/__filesystem/path.h +++ b/libcxx/include/__filesystem/path.h @@ -861,7 +861,7 @@ public: } // iterators - class _LIBCPP_EXPORTED_FROM_ABI iterator; + class iterator; typedef iterator const_iterator; iterator begin() const; diff --git a/libcxx/include/__filesystem/space_info.h b/libcxx/include/__filesystem/space_info.h index 3fa57d33096f..28f7ced40d27 100644 --- a/libcxx/include/__filesystem/space_info.h +++ b/libcxx/include/__filesystem/space_info.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -struct _LIBCPP_EXPORTED_FROM_ABI space_info { +struct space_info { uintmax_t capacity; uintmax_t free; uintmax_t available; diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h index cc74e3858a40..d53b6cec707d 100644 --- a/libcxx/include/__format/formatter_output.h +++ b/libcxx/include/__format/formatter_output.h @@ -45,7 +45,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD namespace __formatter { -struct _LIBCPP_EXPORTED_FROM_ABI __padding_size_result { +struct __padding_size_result { size_t __before_; size_t __after_; }; diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h index dc112ebfd0fa..c768fd90d01b 100644 --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -15,16 +15,14 @@ #include <__cstddef/nullptr_t.h> #include <__exception/exception.h> #include <__functional/binary_function.h> -#include <__functional/invoke.h> #include <__functional/unary_function.h> #include <__memory/addressof.h> #include <__type_traits/aligned_storage.h> #include <__type_traits/decay.h> -#include <__type_traits/is_core_convertible.h> +#include <__type_traits/invoke.h> #include <__type_traits/is_scalar.h> #include <__type_traits/is_trivially_constructible.h> #include <__type_traits/is_trivially_destructible.h> -#include <__type_traits/is_void.h> #include <__type_traits/strip_signature.h> #include <__utility/forward.h> #include <__utility/move.h> @@ -95,29 +93,29 @@ template <class _Rp, class _A1, class _A2> struct __maybe_derive_from_binary_function<_Rp(_A1, _A2)> : public __binary_function<_A1, _A2, _Rp> {}; template <class _Fp> -_LIBCPP_HIDE_FROM_ABI bool __not_null(_Fp const&) { - return true; +_LIBCPP_HIDE_FROM_ABI bool __is_null(_Fp const&) { + return false; } template <class _Fp> -_LIBCPP_HIDE_FROM_ABI bool __not_null(_Fp* __ptr) { - return __ptr; +_LIBCPP_HIDE_FROM_ABI bool __is_null(_Fp* __ptr) { + return !__ptr; } template <class _Ret, class _Class> -_LIBCPP_HIDE_FROM_ABI bool __not_null(_Ret _Class::*__ptr) { - return __ptr; +_LIBCPP_HIDE_FROM_ABI bool __is_null(_Ret _Class::* __ptr) { + return !__ptr; } template <class _Fp> -_LIBCPP_HIDE_FROM_ABI bool __not_null(function<_Fp> const& __f) { - return !!__f; +_LIBCPP_HIDE_FROM_ABI bool __is_null(function<_Fp> const& __f) { + return !__f; } # if __has_extension(blocks) template <class _Rp, class... _Args> -_LIBCPP_HIDE_FROM_ABI bool __not_null(_Rp (^__p)(_Args...)) { - return __p; +_LIBCPP_HIDE_FROM_ABI bool __is_null(_Rp (^__p)(_Args...)) { + return !__p; } # endif @@ -206,12 +204,13 @@ public: _LIBCPP_HIDE_FROM_ABI explicit __value_func(_Fp&& __f) : __f_(nullptr) { typedef __function::__func<_Fp, _Rp(_ArgTypes...)> _Fun; - if (__function::__not_null(__f)) { - if (sizeof(_Fun) <= sizeof(__buf_) && is_nothrow_copy_constructible<_Fp>::value) { - __f_ = ::new (std::addressof(__buf_)) _Fun(std::move(__f)); - } else { - __f_ = new _Fun(std::move(__f)); - } + if (__function::__is_null(__f)) + return; + + if (sizeof(_Fun) <= sizeof(__buf_) && is_nothrow_copy_constructible<_Fp>::value) { + __f_ = ::new (std::addressof(__buf_)) _Fun(std::move(__f)); + } else { + __f_ = new _Fun(std::move(__f)); } } @@ -356,7 +355,31 @@ struct __policy { // type. template <typename _Fun> _LIBCPP_HIDE_FROM_ABI static const __policy* __create() { - return __choose_policy<_Fun>(__use_small_storage<_Fun>()); + if constexpr (__use_small_storage<_Fun>::value) { + static constexpr __policy __policy = { + nullptr, + nullptr, + false, +# if _LIBCPP_HAS_RTTI + &typeid(_Fun) +# else + nullptr +# endif + }; + return &__policy; + } else { + static constexpr __policy __policy = { + std::addressof(__large_clone<_Fun>), + std::addressof(__large_destroy<_Fun>), + false, +# if _LIBCPP_HAS_RTTI + &typeid(_Fun) +# else + nullptr +# endif + }; + return &__policy; + } } _LIBCPP_HIDE_FROM_ABI static const __policy* __create_empty() { @@ -384,36 +407,6 @@ private: _LIBCPP_HIDE_FROM_ABI static void __large_destroy(void* __s) { delete static_cast<_Fun*>(__s); } - - template <typename _Fun> - _LIBCPP_HIDE_FROM_ABI static const __policy* __choose_policy(/* is_small = */ false_type) { - static constexpr __policy __policy = { - std::addressof(__large_clone<_Fun>), - std::addressof(__large_destroy<_Fun>), - false, -# if _LIBCPP_HAS_RTTI - &typeid(_Fun) -# else - nullptr -# endif - }; - return &__policy; - } - - template <typename _Fun> - _LIBCPP_HIDE_FROM_ABI static const __policy* __choose_policy(/* is_small = */ true_type) { - static constexpr __policy __policy = { - nullptr, - nullptr, - false, -# if _LIBCPP_HAS_RTTI - &typeid(_Fun) -# else - nullptr -# endif - }; - return &__policy; - } }; // Used to choose between perfect forwarding or pass-by-value. Pass-by-value is @@ -455,14 +448,15 @@ public: template <class _Fp, __enable_if_t<!is_same<__decay_t<_Fp>, __policy_func>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI explicit __policy_func(_Fp&& __f) : __policy_(__policy::__create_empty()) { - if (__function::__not_null(__f)) { - __func_ = __call_func<_Fp>; - __policy_ = __policy::__create<_Fp>(); - if (__use_small_storage<_Fp>()) { - ::new ((void*)&__buf_.__small) _Fp(std::move(__f)); - } else { - __buf_.__large = ::new _Fp(std::move(__f)); - } + if (__function::__is_null(__f)) + return; + + __func_ = __call_func<_Fp>; + __policy_ = __policy::__create<_Fp>(); + if (__use_small_storage<_Fp>()) { + ::new ((void*)&__buf_.__small) _Fp(std::move(__f)); + } else { + __buf_.__large = ::new _Fp(std::move(__f)); } } @@ -615,21 +609,9 @@ class function<_Rp(_ArgTypes...)> __func __f_; - template <class _Fp, - bool = _And<_IsNotSame<__remove_cvref_t<_Fp>, function>, __is_invocable<_Fp, _ArgTypes...> >::value> - struct __callable; - template <class _Fp> - struct __callable<_Fp, true> { - static const bool value = - is_void<_Rp>::value || __is_core_convertible<__invoke_result_t<_Fp, _ArgTypes...>, _Rp>::value; - }; - template <class _Fp> - struct __callable<_Fp, false> { - static const bool value = false; - }; - template <class _Fp> - using _EnableIfLValueCallable _LIBCPP_NODEBUG = __enable_if_t<__callable<_Fp&>::value>; + using _EnableIfLValueCallable _LIBCPP_NODEBUG = __enable_if_t< + _And<_IsNotSame<__remove_cvref_t<_Fp>, function>, __is_invocable_r<_Rp, _Fp&, _ArgTypes...>>::value>; public: typedef _Rp result_type; diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h index 489a6f00b8a3..83bbf1b5e26c 100644 --- a/libcxx/include/__functional/hash.h +++ b/libcxx/include/__functional/hash.h @@ -21,6 +21,7 @@ #include <__type_traits/is_enum.h> #include <__type_traits/is_floating_point.h> #include <__type_traits/is_integral.h> +#include <__type_traits/is_unqualified.h> #include <__type_traits/underlying_type.h> #include <__utility/pair.h> #include <__utility/swap.h> @@ -355,7 +356,8 @@ struct __hash_impl { }; template <class _Tp> -struct __hash_impl<_Tp, __enable_if_t<is_enum<_Tp>::value> > : __unary_function<_Tp, size_t> { +struct __hash_impl<_Tp, __enable_if_t<is_enum<_Tp>::value && __is_unqualified_v<_Tp> > > + : __unary_function<_Tp, size_t> { _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT { using type = __underlying_type_t<_Tp>; return hash<type>()(static_cast<type>(__v)); @@ -363,17 +365,21 @@ struct __hash_impl<_Tp, __enable_if_t<is_enum<_Tp>::value> > : __unary_function< }; template <class _Tp> -struct __hash_impl<_Tp, __enable_if_t<is_integral<_Tp>::value && (sizeof(_Tp) <= sizeof(size_t))> > +struct __hash_impl< + _Tp, + __enable_if_t<is_integral<_Tp>::value && __is_unqualified_v<_Tp> && (sizeof(_Tp) <= sizeof(size_t))> > : __unary_function<_Tp, size_t> { _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT { return static_cast<size_t>(__v); } }; template <class _Tp> -struct __hash_impl<_Tp, __enable_if_t<is_integral<_Tp>::value && (sizeof(_Tp) > sizeof(size_t))> > +struct __hash_impl<_Tp, + __enable_if_t<is_integral<_Tp>::value && __is_unqualified_v<_Tp> && (sizeof(_Tp) > sizeof(size_t))> > : __scalar_hash<_Tp> {}; template <class _Tp> -struct __hash_impl<_Tp, __enable_if_t<is_floating_point<_Tp>::value> > : __scalar_hash<_Tp> { +struct __hash_impl<_Tp, __enable_if_t<is_floating_point<_Tp>::value && __is_unqualified_v<_Tp> > > + : __scalar_hash<_Tp> { _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT { // -0.0 and 0.0 should return same hash if (__v == 0.0f) diff --git a/libcxx/include/__fwd/tuple.h b/libcxx/include/__fwd/tuple.h index 39ed94d9806e..dc96c03e2024 100644 --- a/libcxx/include/__fwd/tuple.h +++ b/libcxx/include/__fwd/tuple.h @@ -21,11 +21,20 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <size_t, class> struct tuple_element; +template <size_t _Np, class _Tp> +using __tuple_element_t _LIBCPP_NODEBUG = typename tuple_element<_Np, _Tp>::type; + #ifndef _LIBCPP_CXX03_LANG template <class...> class tuple; +template <class> +inline const bool __is_tuple_v = false; + +template <class... _Tp> +inline const bool __is_tuple_v<tuple<_Tp...>> = true; + template <size_t _Ip, class... _Tp> struct tuple_element<_Ip, tuple<_Tp...> > { using type _LIBCPP_NODEBUG = __type_pack_element<_Ip, _Tp...>; diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table index 996ec9fa31ac..f0e88bbf2bc3 100644 --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -29,7 +29,6 @@ #include <__memory/swap_allocator.h> #include <__memory/unique_ptr.h> #include <__new/launder.h> -#include <__type_traits/can_extract_key.h> #include <__type_traits/copy_cvref.h> #include <__type_traits/enable_if.h> #include <__type_traits/invoke.h> @@ -46,6 +45,7 @@ #include <__utility/move.h> #include <__utility/pair.h> #include <__utility/swap.h> +#include <__utility/try_key_extraction.h> #include <limits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -201,22 +201,11 @@ struct __hash_node_types; template <class _NodePtr, class _Tp, class _VoidPtr> struct __hash_node_types<_NodePtr, __hash_node<_Tp, _VoidPtr> > { - typedef ptrdiff_t difference_type; - typedef size_t size_type; - - typedef __rebind_pointer_t<_NodePtr, void> __void_pointer; - typedef typename pointer_traits<_NodePtr>::element_type __node_type; - typedef _NodePtr __node_pointer; - typedef __hash_node_base<__node_pointer> __node_base_type; - typedef __rebind_pointer_t<_NodePtr, __node_base_type> __node_base_pointer; - - typedef typename __node_base_type::__next_pointer __next_pointer; + typedef typename __hash_node_base<_NodePtr>::__next_pointer __next_pointer; using __node_value_type _LIBCPP_NODEBUG = __get_hash_node_value_type_t<_Tp>; - typedef __rebind_pointer_t<_VoidPtr, __node_value_type> __node_value_type_pointer; - typedef __rebind_pointer_t<_VoidPtr, const __node_value_type> __const_node_value_type_pointer; private: static_assert(!is_const<__node_type>::value, "_NodePtr should never be a pointer to const"); @@ -237,13 +226,6 @@ struct __hash_node_types_from_iterator<__hash_local_iterator<_NodePtr> > : __has template <class _NodePtr> struct __hash_node_types_from_iterator<__hash_const_local_iterator<_NodePtr> > : __hash_node_types<_NodePtr> {}; -template <class _NodeValueTp, class _VoidPtr> -struct __make_hash_node_types { - typedef __hash_node<_NodeValueTp, _VoidPtr> _NodeTp; - typedef __rebind_pointer_t<_VoidPtr, _NodeTp> _NodePtr; - typedef __hash_node_types<_NodePtr> type; -}; - template <class _NodePtr> class __hash_iterator { typedef __hash_node_types<_NodePtr> _NodeTypes; @@ -255,9 +237,9 @@ class __hash_iterator { public: typedef forward_iterator_tag iterator_category; typedef typename _NodeTypes::__node_value_type value_type; - typedef typename _NodeTypes::difference_type difference_type; + using difference_type = ptrdiff_t; typedef value_type& reference; - typedef typename _NodeTypes::__node_value_type_pointer pointer; + using pointer = __rebind_pointer_t<_NodePtr, value_type>; _LIBCPP_HIDE_FROM_ABI __hash_iterator() _NOEXCEPT : __node_(nullptr) {} @@ -322,9 +304,9 @@ public: typedef forward_iterator_tag iterator_category; typedef typename _NodeTypes::__node_value_type value_type; - typedef typename _NodeTypes::difference_type difference_type; + using difference_type = ptrdiff_t; typedef const value_type& reference; - typedef typename _NodeTypes::__const_node_value_type_pointer pointer; + using pointer = __rebind_pointer_t<_NodePtr, const value_type>; _LIBCPP_HIDE_FROM_ABI __hash_const_iterator() _NOEXCEPT : __node_(nullptr) {} @@ -387,9 +369,9 @@ class __hash_local_iterator { public: typedef forward_iterator_tag iterator_category; typedef typename _NodeTypes::__node_value_type value_type; - typedef typename _NodeTypes::difference_type difference_type; + using difference_type = ptrdiff_t; typedef value_type& reference; - typedef typename _NodeTypes::__node_value_type_pointer pointer; + using pointer = __rebind_pointer_t<_NodePtr, value_type>; _LIBCPP_HIDE_FROM_ABI __hash_local_iterator() _NOEXCEPT : __node_(nullptr) {} @@ -465,9 +447,9 @@ public: typedef forward_iterator_tag iterator_category; typedef typename _NodeTypes::__node_value_type value_type; - typedef typename _NodeTypes::difference_type difference_type; + using difference_type = ptrdiff_t; typedef const value_type& reference; - typedef typename _NodeTypes::__const_node_value_type_pointer pointer; + using pointer = __rebind_pointer_t<_ConstNodePtr, const value_type>; _LIBCPP_HIDE_FROM_ABI __hash_const_local_iterator() _NOEXCEPT : __node_(nullptr) {} @@ -646,10 +628,8 @@ public: private: typedef allocator_traits<allocator_type> __alloc_traits; - typedef typename __make_hash_node_types<_Tp, typename __alloc_traits::void_pointer>::type _NodeTypes; public: - typedef typename _NodeTypes::__node_value_type __node_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef typename __alloc_traits::pointer pointer; @@ -657,22 +637,23 @@ public: #ifndef _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE typedef typename __alloc_traits::size_type size_type; #else - typedef typename _NodeTypes::size_type size_type; + using size_type = size_t; #endif - typedef typename _NodeTypes::difference_type difference_type; + using difference_type = ptrdiff_t; public: // Create __node - typedef typename _NodeTypes::__node_type __node; - typedef __rebind_alloc<__alloc_traits, __node> __node_allocator; - typedef allocator_traits<__node_allocator> __node_traits; - typedef typename _NodeTypes::__void_pointer __void_pointer; - typedef typename _NodeTypes::__node_pointer __node_pointer; - typedef typename _NodeTypes::__node_pointer __node_const_pointer; - typedef typename _NodeTypes::__node_base_type __first_node; - typedef typename _NodeTypes::__node_base_pointer __node_base_pointer; - typedef typename _NodeTypes::__next_pointer __next_pointer; + using __void_pointer _LIBCPP_NODEBUG = typename __alloc_traits::void_pointer; + + using __node _LIBCPP_NODEBUG = __hash_node<_Tp, __void_pointer>; + using __node_allocator _LIBCPP_NODEBUG = __rebind_alloc<__alloc_traits, __node>; + using __node_traits _LIBCPP_NODEBUG = allocator_traits<__node_allocator>; + using __node_pointer _LIBCPP_NODEBUG = __rebind_pointer_t<__void_pointer, __node>; + + using __first_node _LIBCPP_NODEBUG = __hash_node_base<__node_pointer>; + using __node_base_pointer _LIBCPP_NODEBUG = __rebind_pointer_t<__void_pointer, __first_node>; + using __next_pointer _LIBCPP_NODEBUG = __node_base_pointer; private: // check for sane allocator pointer rebinding semantics. Rebinding the @@ -797,40 +778,66 @@ public: _LIBCPP_HIDE_FROM_ABI iterator __node_insert_multi(__node_pointer __nd); _LIBCPP_HIDE_FROM_ABI iterator __node_insert_multi(const_iterator __p, __node_pointer __nd); - template <class _Key, class... _Args> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_key_args(_Key const& __k, _Args&&... __args); - - template <class... _Args> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_impl(_Args&&... __args); - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique(_Pp&& __x) { - return __emplace_unique_extract_key(std::forward<_Pp>(__x), __can_extract_key<_Pp, key_type>()); - } - - template <class _First, - class _Second, - __enable_if_t<__can_extract_map_key<_First, key_type, value_type>::value, int> = 0> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique(_First&& __f, _Second&& __s) { - return __emplace_unique_key_args(__f, std::forward<_First>(__f), std::forward<_Second>(__s)); - } - template <class... _Args> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique(_Args&&... __args) { - return __emplace_unique_impl(std::forward<_Args>(__args)...); - } - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) { - return __emplace_unique_impl(std::forward<_Pp>(__x)); - } - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) { - return __emplace_unique_key_args(__x, std::forward<_Pp>(__x)); - } - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) { - return __emplace_unique_key_args(__x.first, std::forward<_Pp>(__x)); + return std::__try_key_extraction<key_type>( + [this](const key_type& __key, _Args&&... __args2) { + size_t __hash = hash_function()(__key); + size_type __bc = bucket_count(); + bool __inserted = false; + __next_pointer __nd; + size_t __chash; + if (__bc != 0) { + __chash = std::__constrain_hash(__hash, __bc); + __nd = __bucket_list_[__chash]; + if (__nd != nullptr) { + for (__nd = __nd->__next_; + __nd != nullptr && + (__nd->__hash() == __hash || std::__constrain_hash(__nd->__hash(), __bc) == __chash); + __nd = __nd->__next_) { + if ((__nd->__hash() == __hash) && key_eq()(__nd->__upcast()->__get_value(), __key)) + goto __done; + } + } + } + { + __node_holder __h = __construct_node_hash(__hash, std::forward<_Args>(__args2)...); + if (size() + 1 > __bc * max_load_factor() || __bc == 0) { + __rehash_unique(std::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc), + size_type(__math::ceil(float(size() + 1) / max_load_factor())))); + __bc = bucket_count(); + __chash = std::__constrain_hash(__hash, __bc); + } + // insert_after __bucket_list_[__chash], or __first_node if bucket is null + __next_pointer __pn = __bucket_list_[__chash]; + if (__pn == nullptr) { + __pn = __first_node_.__ptr(); + __h->__next_ = __pn->__next_; + __pn->__next_ = __h.get()->__ptr(); + // fix up __bucket_list_ + __bucket_list_[__chash] = __pn; + if (__h->__next_ != nullptr) + __bucket_list_[std::__constrain_hash(__h->__next_->__hash(), __bc)] = __h.get()->__ptr(); + } else { + __h->__next_ = __pn->__next_; + __pn->__next_ = static_cast<__next_pointer>(__h.get()); + } + __nd = static_cast<__next_pointer>(__h.release()); + // increment size + ++size(); + __inserted = true; + } + __done: + return pair<iterator, bool>(iterator(__nd), __inserted); + }, + [this](_Args&&... __args2) { + __node_holder __h = __construct_node(std::forward<_Args>(__args2)...); + pair<iterator, bool> __r = __node_insert_unique(__h.get()); + if (__r.second) + __h.release(); + return __r; + }, + std::forward<_Args>(__args)...); } template <class... _Args> @@ -999,8 +1006,8 @@ private: template <class... _Args> _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node(_Args&&... __args); - template <class _First, class... _Rest> - _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node_hash(size_t __hash, _First&& __f, _Rest&&... __rest); + template <class... _Args> + _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node_hash(size_t __hash, _Args&&... __args); _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const __hash_table& __u) { __copy_assign_alloc(__u, integral_constant<bool, __node_traits::propagate_on_container_copy_assignment::value>()); @@ -1024,7 +1031,21 @@ private: } _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {} - _LIBCPP_HIDE_FROM_ABI void __deallocate_node(__next_pointer __np) _NOEXCEPT; + _LIBCPP_HIDE_FROM_ABI void __deallocate_node(__node_pointer __nd) _NOEXCEPT { + auto& __alloc = __node_alloc(); + __node_traits::destroy(__alloc, std::addressof(__nd->__get_value())); + std::__destroy_at(std::__to_address(__nd)); + __node_traits::deallocate(__alloc, __nd, 1); + } + + _LIBCPP_HIDE_FROM_ABI void __deallocate_node_list(__next_pointer __np) _NOEXCEPT { + while (__np != nullptr) { + __next_pointer __next = __np->__next_; + __deallocate_node(__np->__upcast()); + __np = __next; + } + } + _LIBCPP_HIDE_FROM_ABI __next_pointer __detach() _NOEXCEPT; template <class _From, class _ValueT = _Tp, __enable_if_t<__is_hash_value_type<_ValueT>::value, int> = 0> @@ -1162,7 +1183,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table() { static_assert(is_copy_constructible<hasher>::value, "Hasher must be copy-constructible."); #endif - __deallocate_node(__first_node_.__next_); + __deallocate_node_list(__first_node_.__next_); } template <class _Tp, class _Hash, class _Equal, class _Alloc> @@ -1238,7 +1259,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(const __hash_table& __other) // At this point we either have consumed the whole incoming hash table, or we don't have any more nodes to reuse in // the destination. Either continue with constructing new nodes, or deallocate the left over nodes. if (__own_iter->__next_) { - __deallocate_node(__own_iter->__next_); + __deallocate_node_list(__own_iter->__next_); __own_iter->__next_ = nullptr; } else { __copy_construct(__other_iter, __own_iter, __current_chash); @@ -1250,19 +1271,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(const __hash_table& __other) } template <class _Tp, class _Hash, class _Equal, class _Alloc> -void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate_node(__next_pointer __np) _NOEXCEPT { - __node_allocator& __na = __node_alloc(); - while (__np != nullptr) { - __next_pointer __next = __np->__next_; - __node_pointer __real_np = __np->__upcast(); - __node_traits::destroy(__na, std::addressof(__real_np->__get_value())); - std::__destroy_at(std::addressof(*__real_np)); - __node_traits::deallocate(__na, __real_np, 1); - __np = __next; - } -} - -template <class _Tp, class _Hash, class _Equal, class _Alloc> typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__next_pointer __hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach() _NOEXCEPT { size_type __bc = bucket_count(); @@ -1317,11 +1325,11 @@ void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(__hash_table& __u, } #if _LIBCPP_HAS_EXCEPTIONS } catch (...) { - __deallocate_node(__cache); + __deallocate_node_list(__cache); throw; } #endif // _LIBCPP_HAS_EXCEPTIONS - __deallocate_node(__cache); + __deallocate_node_list(__cache); } const_iterator __i = __u.begin(); while (__u.size() != 0) @@ -1360,11 +1368,11 @@ void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __ } #if _LIBCPP_HAS_EXCEPTIONS } catch (...) { - __deallocate_node(__cache); + __deallocate_node_list(__cache); throw; } #endif // _LIBCPP_HAS_EXCEPTIONS - __deallocate_node(__cache); + __deallocate_node_list(__cache); } for (; __first != __last; ++__first) __emplace_unique(*__first); @@ -1390,11 +1398,11 @@ void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __f } #if _LIBCPP_HAS_EXCEPTIONS } catch (...) { - __deallocate_node(__cache); + __deallocate_node_list(__cache); throw; } #endif // _LIBCPP_HAS_EXCEPTIONS - __deallocate_node(__cache); + __deallocate_node_list(__cache); } for (; __first != __last; ++__first) __emplace_multi(*__first); @@ -1427,7 +1435,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::end() const _NOEXCEPT { template <class _Tp, class _Hash, class _Equal, class _Alloc> void __hash_table<_Tp, _Hash, _Equal, _Alloc>::clear() _NOEXCEPT { if (size() > 0) { - __deallocate_node(__first_node_.__next_); + __deallocate_node_list(__first_node_.__next_); __first_node_.__next_ = nullptr; size_type __bc = bucket_count(); for (size_type __i = 0; __i < __bc; ++__i) @@ -1614,69 +1622,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(const_iterator __p } template <class _Tp, class _Hash, class _Equal, class _Alloc> -template <class _Key, class... _Args> -pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool> -__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args) { - size_t __hash = hash_function()(__k); - size_type __bc = bucket_count(); - bool __inserted = false; - __next_pointer __nd; - size_t __chash; - if (__bc != 0) { - __chash = std::__constrain_hash(__hash, __bc); - __nd = __bucket_list_[__chash]; - if (__nd != nullptr) { - for (__nd = __nd->__next_; - __nd != nullptr && (__nd->__hash() == __hash || std::__constrain_hash(__nd->__hash(), __bc) == __chash); - __nd = __nd->__next_) { - if ((__nd->__hash() == __hash) && key_eq()(__nd->__upcast()->__get_value(), __k)) - goto __done; - } - } - } - { - __node_holder __h = __construct_node_hash(__hash, std::forward<_Args>(__args)...); - if (size() + 1 > __bc * max_load_factor() || __bc == 0) { - __rehash_unique(std::max<size_type>( - 2 * __bc + !std::__is_hash_power2(__bc), size_type(__math::ceil(float(size() + 1) / max_load_factor())))); - __bc = bucket_count(); - __chash = std::__constrain_hash(__hash, __bc); - } - // insert_after __bucket_list_[__chash], or __first_node if bucket is null - __next_pointer __pn = __bucket_list_[__chash]; - if (__pn == nullptr) { - __pn = __first_node_.__ptr(); - __h->__next_ = __pn->__next_; - __pn->__next_ = __h.get()->__ptr(); - // fix up __bucket_list_ - __bucket_list_[__chash] = __pn; - if (__h->__next_ != nullptr) - __bucket_list_[std::__constrain_hash(__h->__next_->__hash(), __bc)] = __h.get()->__ptr(); - } else { - __h->__next_ = __pn->__next_; - __pn->__next_ = static_cast<__next_pointer>(__h.get()); - } - __nd = static_cast<__next_pointer>(__h.release()); - // increment size - ++size(); - __inserted = true; - } -__done: - return pair<iterator, bool>(iterator(__nd), __inserted); -} - -template <class _Tp, class _Hash, class _Equal, class _Alloc> -template <class... _Args> -pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool> -__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_impl(_Args&&... __args) { - __node_holder __h = __construct_node(std::forward<_Args>(__args)...); - pair<iterator, bool> __r = __node_insert_unique(__h.get()); - if (__r.second) - __h.release(); - return __r; -} - -template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class... _Args> typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_multi(_Args&&... __args) { @@ -1927,15 +1872,14 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&&... __args) { } template <class _Tp, class _Hash, class _Equal, class _Alloc> -template <class _First, class... _Rest> +template <class... _Args> typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder -__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(size_t __hash, _First&& __f, _Rest&&... __rest) { - static_assert(!__is_hash_value_type<_First, _Rest...>::value, "Construct cannot be called with a hash value type"); +__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(size_t __hash, _Args&&... __args) { + static_assert(!__is_hash_value_type<_Args...>::value, "Construct cannot be called with a hash value type"); __node_allocator& __na = __node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); std::__construct_at(std::addressof(*__h), /* next = */ nullptr, /* hash = */ __hash); - __node_traits::construct( - __na, std::addressof(__h->__get_value()), std::forward<_First>(__f), std::forward<_Rest>(__rest)...); + __node_traits::construct(__na, std::addressof(__h->__get_value()), std::forward<_Args>(__args)...); __h.get_deleter().__value_constructed = true; return __h; } @@ -1955,12 +1899,57 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __p) { template <class _Tp, class _Hash, class _Equal, class _Alloc> typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __first, const_iterator __last) { - for (const_iterator __p = __first; __first != __last; __p = __first) { - ++__first; - erase(__p); + if (__first == __last) + return iterator(__last.__node_); + + // current node + __next_pointer __current = __first.__node_; + size_type __bucket_count = bucket_count(); + size_t __chash = std::__constrain_hash(__current->__hash(), __bucket_count); + // find previous node + __next_pointer __before_first = __bucket_list_[__chash]; + for (; __before_first->__next_ != __current; __before_first = __before_first->__next_) + ; + + __next_pointer __last_node = __last.__node_; + + // If __before_first is in the same bucket (i.e. the first element we erase is not the first in the bucket), clear + // this bucket first without re-linking it + if (__before_first != __first_node_.__ptr() && + std::__constrain_hash(__before_first->__hash(), __bucket_count) == __chash) { + while (__current != __last_node) { + if (auto __next_chash = std::__constrain_hash(__current->__hash(), __bucket_count); __next_chash != __chash) { + __chash = __next_chash; + break; + } + auto __next = __current->__next_; + __deallocate_node(__current->__upcast()); + __current = __next; + --__size_; + } } - __next_pointer __np = __last.__node_; - return iterator(__np); + + while (__current != __last_node) { + auto __next = __current->__next_; + __deallocate_node(__current->__upcast()); + __current = __next; + --__size_; + + // When switching buckets, set the old bucket to be empty and update the next bucket to have __before_first as its + // before-first element + if (__next) { + if (auto __next_chash = std::__constrain_hash(__next->__hash(), __bucket_count); __next_chash != __chash) { + __bucket_list_[__chash] = nullptr; + __chash = __next_chash; + __bucket_list_[__chash] = __before_first; + } + } + } + + // re-link __before_first with __last + __before_first->__next_ = __current; + + return iterator(__last.__node_); } template <class _Tp, class _Hash, class _Equal, class _Alloc> diff --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h index 3a11fae4cb87..d051c08751d3 100644 --- a/libcxx/include/__iterator/back_insert_iterator.h +++ b/libcxx/include/__iterator/back_insert_iterator.h @@ -26,15 +26,9 @@ _LIBCPP_PUSH_MACROS _LIBCPP_BEGIN_NAMESPACE_STD -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Container> class back_insert_iterator -#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<output_iterator_tag, void, void, void, void> -#endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<back_insert_iterator<_Container>, output_iterator_tag, void, void, void, void> { protected: _Container* container; diff --git a/libcxx/include/__iterator/bounded_iter.h b/libcxx/include/__iterator/bounded_iter.h index d12750d1f81a..26eae87917ea 100644 --- a/libcxx/include/__iterator/bounded_iter.h +++ b/libcxx/include/__iterator/bounded_iter.h @@ -116,8 +116,7 @@ public: // These operations check that the iterator is dereferenceable. Since the class invariant is // that the iterator is always within `[begin, end]`, we only need to check it's not pointing to // `end`. This is easier for the optimizer because it aligns with the `iter != container.end()` - // checks that typical callers already use (see - // https://github.com/llvm/llvm-project/issues/78829). + // checks that typical callers already use (see https://llvm.org/PR78829). _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT { _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __current_ != __end_, "__bounded_iter::operator*: Attempt to dereference an iterator at the end"); diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h index 20a1ab469110..f38688734b38 100644 --- a/libcxx/include/__iterator/concepts.h +++ b/libcxx/include/__iterator/concepts.h @@ -118,7 +118,7 @@ concept __signed_integer_like = signed_integral<_Tp>; template <class _Ip> concept weakly_incrementable = - // TODO: remove this once the clang bug is fixed (bugs.llvm.org/PR48173). + // TODO: remove this once the clang bug is fixed (https://llvm.org/PR48173). !same_as<_Ip, bool> && // Currently, clang does not handle bool correctly. movable<_Ip> && requires(_Ip __i) { typename iter_difference_t<_Ip>; diff --git a/libcxx/include/__iterator/front_insert_iterator.h b/libcxx/include/__iterator/front_insert_iterator.h index d79c4d78b636..2ab5383a1d91 100644 --- a/libcxx/include/__iterator/front_insert_iterator.h +++ b/libcxx/include/__iterator/front_insert_iterator.h @@ -26,15 +26,9 @@ _LIBCPP_PUSH_MACROS _LIBCPP_BEGIN_NAMESPACE_STD -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Container> class front_insert_iterator -#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<output_iterator_tag, void, void, void, void> -#endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<front_insert_iterator<_Container>, output_iterator_tag, void, void, void, void> { protected: _Container* container; diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h index 95768cb8e036..6a5818b47877 100644 --- a/libcxx/include/__iterator/insert_iterator.h +++ b/libcxx/include/__iterator/insert_iterator.h @@ -35,15 +35,9 @@ template <class _Container> using __insert_iterator_iter_t _LIBCPP_NODEBUG = typename _Container::iterator; #endif -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Container> class insert_iterator -#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<output_iterator_tag, void, void, void, void> -#endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<insert_iterator<_Container>, output_iterator_tag, void, void, void, void> { protected: _Container* container; __insert_iterator_iter_t<_Container> iter; diff --git a/libcxx/include/__iterator/istream_iterator.h b/libcxx/include/__iterator/istream_iterator.h index cdb8056cfe98..f4b13f09c7e2 100644 --- a/libcxx/include/__iterator/istream_iterator.h +++ b/libcxx/include/__iterator/istream_iterator.h @@ -25,15 +25,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Tp, class _CharT = char, class _Traits = char_traits<_CharT>, class _Distance = ptrdiff_t> class istream_iterator -#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<input_iterator_tag, _Tp, _Distance, const _Tp*, const _Tp&> -#endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<istream_iterator<_Tp, _CharT, _Traits, _Distance>, + input_iterator_tag, + _Tp, + _Distance, + const _Tp*, + const _Tp&> { public: typedef input_iterator_tag iterator_category; typedef _Tp value_type; diff --git a/libcxx/include/__iterator/istreambuf_iterator.h b/libcxx/include/__iterator/istreambuf_iterator.h index b7b28cd1a0b7..4fc87a84f019 100644 --- a/libcxx/include/__iterator/istreambuf_iterator.h +++ b/libcxx/include/__iterator/istreambuf_iterator.h @@ -25,15 +25,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _CharT, class _Traits> class istreambuf_iterator -#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, _CharT*, _CharT> -#endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<istreambuf_iterator<_CharT, _Traits>, + input_iterator_tag, + _CharT, + typename _Traits::off_type, + _CharT*, + _CharT> { public: typedef input_iterator_tag iterator_category; typedef _CharT value_type; diff --git a/libcxx/include/__iterator/iterator.h b/libcxx/include/__iterator/iterator.h index d7fcd8c4dd73..c599f61797a7 100644 --- a/libcxx/include/__iterator/iterator.h +++ b/libcxx/include/__iterator/iterator.h @@ -28,6 +28,19 @@ struct _LIBCPP_DEPRECATED_IN_CXX17 iterator { typedef _Category iterator_category; }; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH +#ifdef _LIBCPP_ABI_NO_ITERATOR_BASES +template <class _Derived> +struct __no_iterator_base {}; + +template <class _Derived, class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> +using __iterator_base _LIBCPP_NODEBUG = __no_iterator_base<_Derived>; +#else +template <class _Derived, class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> +using __iterator_base _LIBCPP_NODEBUG = iterator<_Category, _Tp, _Distance, _Pointer, _Reference>; +#endif +_LIBCPP_SUPPRESS_DEPRECATED_POP + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___ITERATOR_ITERATOR_H diff --git a/libcxx/include/__iterator/ostream_iterator.h b/libcxx/include/__iterator/ostream_iterator.h index 2b459f462851..64e79f010f64 100644 --- a/libcxx/include/__iterator/ostream_iterator.h +++ b/libcxx/include/__iterator/ostream_iterator.h @@ -24,15 +24,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Tp, class _CharT = char, class _Traits = char_traits<_CharT> > class ostream_iterator -#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<output_iterator_tag, void, void, void, void> -#endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<ostream_iterator<_Tp, _CharT, _Traits>, output_iterator_tag, void, void, void, void> { public: typedef output_iterator_tag iterator_category; typedef void value_type; diff --git a/libcxx/include/__iterator/ostreambuf_iterator.h b/libcxx/include/__iterator/ostreambuf_iterator.h index 7133331a7bf6..4a3b2fa02449 100644 --- a/libcxx/include/__iterator/ostreambuf_iterator.h +++ b/libcxx/include/__iterator/ostreambuf_iterator.h @@ -25,15 +25,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _CharT, class _Traits> class ostreambuf_iterator -#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<output_iterator_tag, void, void, void, void> -#endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<ostreambuf_iterator<_CharT, _Traits>, output_iterator_tag, void, void, void, void> { public: typedef output_iterator_tag iterator_category; typedef void value_type; diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h index 8935e5a8ff7a..834695dd1670 100644 --- a/libcxx/include/__iterator/reverse_iterator.h +++ b/libcxx/include/__iterator/reverse_iterator.h @@ -46,21 +46,16 @@ _LIBCPP_BEGIN_NAMESPACE_STD -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Iter> class reverse_iterator -#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<typename iterator_traits<_Iter>::iterator_category, - typename iterator_traits<_Iter>::value_type, - typename iterator_traits<_Iter>::difference_type, - typename iterator_traits<_Iter>::pointer, - typename iterator_traits<_Iter>::reference> -#endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<reverse_iterator<_Iter>, + typename iterator_traits<_Iter>::iterator_category, + typename iterator_traits<_Iter>::value_type, + typename iterator_traits<_Iter>::difference_type, + typename iterator_traits<_Iter>::pointer, + typename iterator_traits<_Iter>::reference> { private: -#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES +#ifndef _LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER _Iter __t_; // no longer used as of LWG #2360, not removed due to ABI break #endif @@ -91,7 +86,7 @@ public: using reference = typename iterator_traits<_Iter>::reference; #endif -#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES +#ifndef _LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator() : __t_(), current() {} _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit reverse_iterator(_Iter __x) : __t_(__x), current(__x) {} diff --git a/libcxx/include/__math/hypot.h b/libcxx/include/__math/hypot.h index 8e8c35b4a41c..2b12d7be2107 100644 --- a/libcxx/include/__math/hypot.h +++ b/libcxx/include/__math/hypot.h @@ -53,7 +53,7 @@ inline _LIBCPP_HIDE_FROM_ABI __promote_t<_A1, _A2> hypot(_A1 __x, _A2 __y) _NOEX // Computes the three-dimensional hypotenuse: `std::hypot(x,y,z)`. // The naive implementation might over-/underflow which is why this implementation is more involved: // If the square of an argument might run into issues, we scale the arguments appropriately. -// See https://github.com/llvm/llvm-project/issues/92782 for a detailed discussion and summary. +// See https://llvm.org/PR92782 for a detailed discussion and summary. template <class _Real> _LIBCPP_HIDE_FROM_ABI _Real __hypot(_Real __x, _Real __y, _Real __z) { // Factors needed to determine if over-/underflow might happen diff --git a/libcxx/include/__memory/compressed_pair.h b/libcxx/include/__memory/compressed_pair.h index 29e503931b0b..12163f4af61c 100644 --- a/libcxx/include/__memory/compressed_pair.h +++ b/libcxx/include/__memory/compressed_pair.h @@ -52,7 +52,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD // // Furthermore, that alignment must be the same as what was used in the old __compressed_pair layout, so we must // handle reference types specially since alignof(T&) == alignof(T). -// See https://github.com/llvm/llvm-project/issues/118559. +// See https://llvm.org/PR118559. #ifndef _LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h index 8c7f8dff1b76..62fcd93263b0 100644 --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/include/__memory/pointer_traits.h @@ -255,7 +255,7 @@ concept __resettable_smart_pointer_with_args = requires(_Smart __s, _Pointer __p // This function ensures safe conversions between fancy pointers at compile-time, where we avoid casts from/to // `__void_pointer` by obtaining the underlying raw pointer from the fancy pointer using `std::to_address`, // then dereferencing it to retrieve the pointed-to object, and finally constructing the target fancy pointer -// to that object using the `std::pointer_traits<>::pinter_to` function. +// to that object using the `std::pointer_traits<>::pointer_to` function. template <class _PtrTo, class _PtrFrom> _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI _PtrTo __static_fancy_pointer_cast(const _PtrFrom& __p) { using __ptr_traits = pointer_traits<_PtrTo>; diff --git a/libcxx/include/__memory/raw_storage_iterator.h b/libcxx/include/__memory/raw_storage_iterator.h index 0e8b9090704f..d98b3faf4846 100644 --- a/libcxx/include/__memory/raw_storage_iterator.h +++ b/libcxx/include/__memory/raw_storage_iterator.h @@ -28,15 +28,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR) -_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _OutputIterator, class _Tp> class _LIBCPP_DEPRECATED_IN_CXX17 raw_storage_iterator -# if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) - : public iterator<output_iterator_tag, void, void, void, void> -# endif -{ - _LIBCPP_SUPPRESS_DEPRECATED_POP - + : public __iterator_base<raw_storage_iterator<_OutputIterator, _Tp>, output_iterator_tag, void, void, void, void> { private: _OutputIterator __x_; diff --git a/libcxx/include/__memory_resource/pool_options.h b/libcxx/include/__memory_resource/pool_options.h index 324b8aaa8502..fd20ced56795 100644 --- a/libcxx/include/__memory_resource/pool_options.h +++ b/libcxx/include/__memory_resource/pool_options.h @@ -24,7 +24,7 @@ namespace pmr { // [mem.res.pool.options] -struct _LIBCPP_EXPORTED_FROM_ABI pool_options { +struct pool_options { size_t max_blocks_per_chunk = 0; size_t largest_required_pool_block = 0; }; diff --git a/libcxx/include/__mutex/tag_types.h b/libcxx/include/__mutex/tag_types.h index 2b2dd58ee4e8..36b1a3d92b14 100644 --- a/libcxx/include/__mutex/tag_types.h +++ b/libcxx/include/__mutex/tag_types.h @@ -17,15 +17,15 @@ _LIBCPP_BEGIN_NAMESPACE_STD -struct _LIBCPP_EXPORTED_FROM_ABI defer_lock_t { +struct defer_lock_t { explicit defer_lock_t() = default; }; -struct _LIBCPP_EXPORTED_FROM_ABI try_to_lock_t { +struct try_to_lock_t { explicit try_to_lock_t() = default; }; -struct _LIBCPP_EXPORTED_FROM_ABI adopt_lock_t { +struct adopt_lock_t { explicit adopt_lock_t() = default; }; diff --git a/libcxx/include/__new/nothrow_t.h b/libcxx/include/__new/nothrow_t.h index a286bf7af628..a09977212393 100644 --- a/libcxx/include/__new/nothrow_t.h +++ b/libcxx/include/__new/nothrow_t.h @@ -19,7 +19,7 @@ # include <new.h> #else _LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD -struct _LIBCPP_EXPORTED_FROM_ABI nothrow_t { +struct nothrow_t { explicit nothrow_t() = default; }; extern _LIBCPP_EXPORTED_FROM_ABI const nothrow_t nothrow; diff --git a/libcxx/include/__random/binomial_distribution.h b/libcxx/include/__random/binomial_distribution.h index b4b434082776..bada8cfdd74a 100644 --- a/libcxx/include/__random/binomial_distribution.h +++ b/libcxx/include/__random/binomial_distribution.h @@ -97,13 +97,25 @@ public: } }; -// The LLVM C library provides this with conflicting `noexcept` attributes. -#if !defined(_LIBCPP_MSVCRT_LIKE) && !defined(__LLVM_LIBC__) -extern "C" double lgamma_r(double, int*); +// Some libc declares the math functions to be `noexcept`. +#if defined(_LIBCPP_GLIBC_PREREQ) +# if _LIBCPP_GLIBC_PREREQ(2, 8) +# define _LIBCPP_LGAMMA_R_NOEXCEPT _NOEXCEPT +# else +# define _LIBCPP_LGAMMA_R_NOEXCEPT +# endif +#elif defined(__LLVM_LIBC__) +# define _LIBCPP_LGAMMA_R_NOEXCEPT _NOEXCEPT +#else +# define _LIBCPP_LGAMMA_R_NOEXCEPT +#endif + +#if !defined(_LIBCPP_MSVCRT_LIKE) +extern "C" double lgamma_r(double, int*) _LIBCPP_LGAMMA_R_NOEXCEPT; #endif inline _LIBCPP_HIDE_FROM_ABI double __libcpp_lgamma(double __d) { -#if defined(_LIBCPP_MSVCRT_LIKE) || defined(__LLVM_LIBC__) +#if defined(_LIBCPP_MSVCRT_LIKE) return lgamma(__d); #else int __sign; diff --git a/libcxx/include/__ranges/as_rvalue_view.h b/libcxx/include/__ranges/as_rvalue_view.h index 5849a6c36839..08acf3d7736c 100644 --- a/libcxx/include/__ranges/as_rvalue_view.h +++ b/libcxx/include/__ranges/as_rvalue_view.h @@ -117,7 +117,7 @@ struct __fn : __range_adaptor_closure<__fn> { return /*---------------------------------*/ as_rvalue_view(std::forward<_Range>(__range)); } - template <class _Range> + template <input_range _Range> requires same_as<range_rvalue_reference_t<_Range>, range_reference_t<_Range>> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI static constexpr auto operator()(_Range&& __range) noexcept(noexcept(views::all(std::forward<_Range>(__range)))) diff --git a/libcxx/include/__string/constexpr_c_functions.h b/libcxx/include/__string/constexpr_c_functions.h index 119669e16bbc..160d2af10950 100644 --- a/libcxx/include/__string/constexpr_c_functions.h +++ b/libcxx/include/__string/constexpr_c_functions.h @@ -22,7 +22,6 @@ #include <__type_traits/is_equality_comparable.h> #include <__type_traits/is_integral.h> #include <__type_traits/is_same.h> -#include <__type_traits/is_trivially_copyable.h> #include <__type_traits/is_trivially_lexicographically_comparable.h> #include <__type_traits/remove_cv.h> #include <__utility/element_count.h> @@ -225,6 +224,8 @@ __constexpr_memmove(_Tp* __dest, _Up* __src, __element_count __n) { std::__assign_trivially_copyable(__dest[__i], __src[__i]); } } + } else if _LIBCPP_CONSTEXPR (sizeof(_Tp) == __datasizeof_v<_Tp>) { + ::__builtin_memmove(__dest, __src, __count * sizeof(_Tp)); } else if (__count > 0) { ::__builtin_memmove(__dest, __src, (__count - 1) * sizeof(_Tp) + __datasizeof_v<_Tp>); } diff --git a/libcxx/include/__system_error/error_category.h b/libcxx/include/__system_error/error_category.h index 7233e2211044..191f4d83a90c 100644 --- a/libcxx/include/__system_error/error_category.h +++ b/libcxx/include/__system_error/error_category.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -class _LIBCPP_EXPORTED_FROM_ABI error_condition; +class error_condition; class _LIBCPP_EXPORTED_FROM_ABI error_code; class _LIBCPP_HIDDEN __do_message; diff --git a/libcxx/include/__thread/id.h b/libcxx/include/__thread/id.h index c9c86c80c859..14a51fc9ee88 100644 --- a/libcxx/include/__thread/id.h +++ b/libcxx/include/__thread/id.h @@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_HAS_THREADS -class _LIBCPP_EXPORTED_FROM_ABI __thread_id; +class __thread_id; namespace this_thread { diff --git a/libcxx/include/__tree b/libcxx/include/__tree index 0f3640ef6a83..81a73342cc61 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -23,7 +23,6 @@ #include <__memory/pointer_traits.h> #include <__memory/swap_allocator.h> #include <__memory/unique_ptr.h> -#include <__type_traits/can_extract_key.h> #include <__type_traits/copy_cvref.h> #include <__type_traits/enable_if.h> #include <__type_traits/invoke.h> @@ -35,9 +34,11 @@ #include <__type_traits/is_swappable.h> #include <__type_traits/remove_const.h> #include <__utility/forward.h> +#include <__utility/lazy_synth_three_way_comparator.h> #include <__utility/move.h> #include <__utility/pair.h> #include <__utility/swap.h> +#include <__utility/try_key_extraction.h> #include <limits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -551,7 +552,7 @@ private: template <class _Pointer> class __tree_end_node { public: - typedef _Pointer pointer; + using pointer = _Pointer; pointer __left_; _LIBCPP_HIDE_FROM_ABI __tree_end_node() _NOEXCEPT : __left_() {} @@ -595,11 +596,11 @@ public: template <class _Allocator> class __tree_node_destructor { - typedef _Allocator allocator_type; - typedef allocator_traits<allocator_type> __alloc_traits; + using allocator_type = _Allocator; + using __alloc_traits _LIBCPP_NODEBUG = allocator_traits<allocator_type>; public: - typedef typename __alloc_traits::pointer pointer; + using pointer = typename __alloc_traits::pointer; private: allocator_type& __na_; @@ -636,10 +637,11 @@ struct __generic_container_node_destructor<__tree_node<_Tp, _VoidPtr>, _Alloc> : template <class _Tp, class _NodePtr, class _DiffType> class __tree_iterator { - typedef __tree_node_types<_NodePtr> _NodeTypes; - typedef _NodePtr __node_pointer; - typedef typename _NodeTypes::__node_base_pointer __node_base_pointer; - typedef typename _NodeTypes::__end_node_pointer __end_node_pointer; + using _NodeTypes _LIBCPP_NODEBUG = __tree_node_types<_NodePtr>; + // NOLINTNEXTLINE(libcpp-nodebug-on-aliases) lldb relies on this alias for pretty printing + using __node_pointer = _NodePtr; + using __node_base_pointer _LIBCPP_NODEBUG = typename _NodeTypes::__node_base_pointer; + using __end_node_pointer _LIBCPP_NODEBUG = typename _NodeTypes::__end_node_pointer; __end_node_pointer __ptr_; @@ -696,11 +698,11 @@ private: template <class _Tp, class _NodePtr, class _DiffType> class __tree_const_iterator { - typedef __tree_node_types<_NodePtr> _NodeTypes; + using _NodeTypes _LIBCPP_NODEBUG = __tree_node_types<_NodePtr>; // NOLINTNEXTLINE(libcpp-nodebug-on-aliases) lldb relies on this alias for pretty printing - using __node_pointer = _NodePtr; - typedef typename _NodeTypes::__node_base_pointer __node_base_pointer; - typedef typename _NodeTypes::__end_node_pointer __end_node_pointer; + using __node_pointer = _NodePtr; + using __node_base_pointer _LIBCPP_NODEBUG = typename _NodeTypes::__node_base_pointer; + using __end_node_pointer _LIBCPP_NODEBUG = typename _NodeTypes::__end_node_pointer; __end_node_pointer __ptr_; @@ -769,21 +771,20 @@ int __diagnose_non_const_comparator(); template <class _Tp, class _Compare, class _Allocator> class __tree { public: - using value_type = __get_node_value_type_t<_Tp>; - typedef _Compare value_compare; - typedef _Allocator allocator_type; + using value_type = __get_node_value_type_t<_Tp>; + using value_compare = _Compare; + using allocator_type = _Allocator; private: - typedef allocator_traits<allocator_type> __alloc_traits; - using key_type = __get_tree_key_type_t<_Tp>; + using __alloc_traits _LIBCPP_NODEBUG = allocator_traits<allocator_type>; + using key_type = __get_tree_key_type_t<_Tp>; public: - typedef typename __alloc_traits::pointer pointer; - typedef typename __alloc_traits::const_pointer const_pointer; - typedef typename __alloc_traits::size_type size_type; - typedef typename __alloc_traits::difference_type difference_type; + using pointer = typename __alloc_traits::pointer; + using const_pointer = typename __alloc_traits::const_pointer; + using size_type = typename __alloc_traits::size_type; + using difference_type = typename __alloc_traits::difference_type; -public: using __void_pointer _LIBCPP_NODEBUG = typename __alloc_traits::void_pointer; using __node _LIBCPP_NODEBUG = __tree_node<_Tp, __void_pointer>; @@ -798,8 +799,8 @@ public: using __parent_pointer _LIBCPP_NODEBUG = __end_node_pointer; // TODO: Remove this once the uses in <map> are removed - typedef __rebind_alloc<__alloc_traits, __node> __node_allocator; - typedef allocator_traits<__node_allocator> __node_traits; + using __node_allocator _LIBCPP_NODEBUG = __rebind_alloc<__alloc_traits, __node>; + using __node_traits _LIBCPP_NODEBUG = allocator_traits<__node_allocator>; // TODO(LLVM 22): Remove this check #ifndef _LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB @@ -819,8 +820,8 @@ private: // the pointer using 'pointer_traits'. static_assert(is_same<__node_pointer, typename __node_traits::pointer>::value, "Allocator does not rebind pointers in a sane manner."); - typedef __rebind_alloc<__node_traits, __node_base> __node_base_allocator; - typedef allocator_traits<__node_base_allocator> __node_base_traits; + using __node_base_allocator _LIBCPP_NODEBUG = __rebind_alloc<__node_traits, __node_base>; + using __node_base_traits _LIBCPP_NODEBUG = allocator_traits<__node_base_allocator>; static_assert(is_same<__node_base_pointer, typename __node_base_traits::pointer>::value, "Allocator does not rebind pointers in a sane manner."); @@ -857,13 +858,25 @@ public: return std::addressof(__end_node()->__left_); } - typedef __tree_iterator<_Tp, __node_pointer, difference_type> iterator; - typedef __tree_const_iterator<_Tp, __node_pointer, difference_type> const_iterator; + using iterator = __tree_iterator<_Tp, __node_pointer, difference_type>; + using const_iterator = __tree_const_iterator<_Tp, __node_pointer, difference_type>; _LIBCPP_HIDE_FROM_ABI explicit __tree(const value_compare& __comp) _NOEXCEPT_( - is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_copy_constructible<value_compare>::value); - _LIBCPP_HIDE_FROM_ABI explicit __tree(const allocator_type& __a); - _LIBCPP_HIDE_FROM_ABI __tree(const value_compare& __comp, const allocator_type& __a); + is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_copy_constructible<value_compare>::value) + : __size_(0), __value_comp_(__comp) { + __begin_node_ = __end_node(); + } + + _LIBCPP_HIDE_FROM_ABI explicit __tree(const allocator_type& __a) + : __begin_node_(), __node_alloc_(__node_allocator(__a)), __size_(0) { + __begin_node_ = __end_node(); + } + + _LIBCPP_HIDE_FROM_ABI __tree(const value_compare& __comp, const allocator_type& __a) + : __begin_node_(), __node_alloc_(__node_allocator(__a)), __size_(0), __value_comp_(__comp) { + __begin_node_ = __end_node(); + } + _LIBCPP_HIDE_FROM_ABI __tree(const __tree& __t); _LIBCPP_HIDE_FROM_ABI __tree& operator=(const __tree& __t); template <class _ForwardIterator> @@ -873,13 +886,20 @@ public: _LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t) _NOEXCEPT_( is_nothrow_move_constructible<__node_allocator>::value&& is_nothrow_move_constructible<value_compare>::value); _LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t, const allocator_type& __a); + _LIBCPP_HIDE_FROM_ABI __tree& operator=(__tree&& __t) _NOEXCEPT_(is_nothrow_move_assignable<value_compare>::value && ((__node_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable<__node_allocator>::value) || - allocator_traits<__node_allocator>::is_always_equal::value)); + allocator_traits<__node_allocator>::is_always_equal::value)) { + __move_assign(__t, integral_constant<bool, __node_traits::propagate_on_container_move_assignment::value>()); + return *this; + } - _LIBCPP_HIDE_FROM_ABI ~__tree(); + _LIBCPP_HIDE_FROM_ABI ~__tree() { + static_assert(is_copy_constructible<value_compare>::value, "Comparator must be copy-constructible."); + destroy(__root()); + } _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return iterator(__begin_node_); } _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return const_iterator(__begin_node_); } @@ -900,88 +920,70 @@ public: _NOEXCEPT_(__is_nothrow_swappable_v<value_compare>); #endif - template <class _Key, class... _Args> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_key_args(_Key const&, _Args&&... __args); - template <class _Key, class... _Args> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_hint_unique_key_args(const_iterator, _Key const&, _Args&&...); - - template <class... _Args> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_impl(_Args&&... __args); - - template <class... _Args> - _LIBCPP_HIDE_FROM_ABI iterator __emplace_hint_unique_impl(const_iterator __p, _Args&&... __args); - template <class... _Args> _LIBCPP_HIDE_FROM_ABI iterator __emplace_multi(_Args&&... __args); template <class... _Args> _LIBCPP_HIDE_FROM_ABI iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args); - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique(_Pp&& __x) { - return __emplace_unique_extract_key(std::forward<_Pp>(__x), __can_extract_key<_Pp, key_type>()); - } - - template <class _First, - class _Second, - __enable_if_t<__can_extract_map_key<_First, key_type, value_type>::value, int> = 0> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique(_First&& __f, _Second&& __s) { - return __emplace_unique_key_args(__f, std::forward<_First>(__f), std::forward<_Second>(__s)); - } - template <class... _Args> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique(_Args&&... __args) { - return __emplace_unique_impl(std::forward<_Args>(__args)...); - } - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) { - return __emplace_unique_impl(std::forward<_Pp>(__x)); - } - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) { - return __emplace_unique_key_args(__x, std::forward<_Pp>(__x)); - } - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) { - return __emplace_unique_key_args(__x.first, std::forward<_Pp>(__x)); - } - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI iterator __emplace_hint_unique(const_iterator __p, _Pp&& __x) { - return __emplace_hint_unique_extract_key(__p, std::forward<_Pp>(__x), __can_extract_key<_Pp, key_type>()); - } - - template <class _First, - class _Second, - __enable_if_t<__can_extract_map_key<_First, key_type, value_type>::value, int> = 0> - _LIBCPP_HIDE_FROM_ABI iterator __emplace_hint_unique(const_iterator __p, _First&& __f, _Second&& __s) { - return __emplace_hint_unique_key_args(__p, __f, std::forward<_First>(__f), std::forward<_Second>(__s)).first; + return std::__try_key_extraction<key_type>( + [this](const key_type& __key, _Args&&... __args2) { + auto [__parent, __child] = __find_equal(__key); + __node_pointer __r = static_cast<__node_pointer>(__child); + bool __inserted = false; + if (__child == nullptr) { + __node_holder __h = __construct_node(std::forward<_Args>(__args2)...); + __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); + __r = __h.release(); + __inserted = true; + } + return pair<iterator, bool>(iterator(__r), __inserted); + }, + [this](_Args&&... __args2) { + __node_holder __h = __construct_node(std::forward<_Args>(__args2)...); + auto [__parent, __child] = __find_equal(__h->__get_value()); + __node_pointer __r = static_cast<__node_pointer>(__child); + bool __inserted = false; + if (__child == nullptr) { + __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); + __r = __h.release(); + __inserted = true; + } + return pair<iterator, bool>(iterator(__r), __inserted); + }, + std::forward<_Args>(__args)...); } template <class... _Args> - _LIBCPP_HIDE_FROM_ABI iterator __emplace_hint_unique(const_iterator __p, _Args&&... __args) { - return __emplace_hint_unique_impl(__p, std::forward<_Args>(__args)...); - } - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI iterator - __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_fail_tag) { - return __emplace_hint_unique_impl(__p, std::forward<_Pp>(__x)); - } - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI iterator - __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_self_tag) { - return __emplace_hint_unique_key_args(__p, __x, std::forward<_Pp>(__x)).first; - } - - template <class _Pp> - _LIBCPP_HIDE_FROM_ABI iterator - __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_first_tag) { - return __emplace_hint_unique_key_args(__p, __x.first, std::forward<_Pp>(__x)).first; + _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_hint_unique(const_iterator __p, _Args&&... __args) { + return std::__try_key_extraction<key_type>( + [this, __p](const key_type& __key, _Args&&... __args2) { + __node_base_pointer __dummy; + auto [__parent, __child] = __find_equal(__p, __dummy, __key); + __node_pointer __r = static_cast<__node_pointer>(__child); + bool __inserted = false; + if (__child == nullptr) { + __node_holder __h = __construct_node(std::forward<_Args>(__args2)...); + __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); + __r = __h.release(); + __inserted = true; + } + return pair<iterator, bool>(iterator(__r), __inserted); + }, + [this, __p](_Args&&... __args2) { + __node_holder __h = __construct_node(std::forward<_Args>(__args2)...); + __node_base_pointer __dummy; + auto [__parent, __child] = __find_equal(__p, __dummy, __h->__get_value()); + __node_pointer __r = static_cast<__node_pointer>(__child); + if (__child == nullptr) { + __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); + __r = __h.release(); + } + return pair<iterator, bool>(iterator(__r), __child == nullptr); + }, + std::forward<_Args>(__args)...); } template <class _ValueT = _Tp, __enable_if_t<__is_tree_value_type_v<_ValueT>, int> = 0> @@ -1039,6 +1041,56 @@ public: _LIBCPP_HIDE_FROM_ABI iterator __node_insert_multi(__node_pointer __nd); _LIBCPP_HIDE_FROM_ABI iterator __node_insert_multi(const_iterator __p, __node_pointer __nd); + template <class _InIter, class _Sent> + _LIBCPP_HIDE_FROM_ABI void __insert_range_unique(_InIter __first, _Sent __last) { + if (__first == __last) + return; + + if (__root() == nullptr) { + __insert_node_at( + __end_node(), __end_node()->__left_, static_cast<__node_base_pointer>(__construct_node(*__first).release())); + ++__first; + } + + auto __max_node = static_cast<__node_pointer>(std::__tree_max(static_cast<__node_base_pointer>(__root()))); + + using __reference = decltype(*__first); + + for (; __first != __last; ++__first) { + std::__try_key_extraction<key_type>( + [this, &__max_node](const key_type& __key, __reference&& __val) { + if (value_comp()(__max_node->__get_value(), __key)) { // __key > __max_node + __node_holder __nd = __construct_node(std::forward<__reference>(__val)); + __insert_node_at(static_cast<__end_node_pointer>(__max_node), + __max_node->__right_, + static_cast<__node_base_pointer>(__nd.get())); + __max_node = __nd.release(); + } else { + auto [__parent, __child] = __find_equal(__key); + if (__child == nullptr) { + __node_holder __nd = __construct_node(std::forward<__reference>(__val)); + __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd.release())); + } + } + }, + [this, &__max_node](__reference&& __val) { + __node_holder __nd = __construct_node(std::forward<__reference>(__val)); + if (value_comp()(__max_node->__get_value(), __nd->__get_value())) { // __node > __max_node + __insert_node_at(static_cast<__end_node_pointer>(__max_node), + __max_node->__right_, + static_cast<__node_base_pointer>(__nd.get())); + __max_node = __nd.release(); + } else { + auto [__parent, __child] = __find_equal(__nd->__get_value()); + if (__child == nullptr) { + __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd.release())); + } + } + }, + *__first); + } + } + _LIBCPP_HIDE_FROM_ABI iterator __remove_node_pointer(__node_pointer) _NOEXCEPT; #if _LIBCPP_STD_VER >= 17 @@ -1074,8 +1126,7 @@ public: template <class _Key> _LIBCPP_HIDE_FROM_ABI iterator find(const _Key& __key) { - __end_node_pointer __parent; - __node_base_pointer __match = __find_equal(__parent, __key); + auto [__, __match] = __find_equal(__key); if (__match == nullptr) return end(); return iterator(static_cast<__node_pointer>(__match)); @@ -1083,8 +1134,7 @@ public: template <class _Key> _LIBCPP_HIDE_FROM_ABI const_iterator find(const _Key& __key) const { - __end_node_pointer __parent; - __node_base_pointer __match = __find_equal(__parent, __key); + auto [__, __match] = __find_equal(__key); if (__match == nullptr) return end(); return const_iterator(static_cast<__node_pointer>(__match)); @@ -1131,22 +1181,24 @@ public: template <class _Key> _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator> __equal_range_multi(const _Key& __k) const; - typedef __tree_node_destructor<__node_allocator> _Dp; - typedef unique_ptr<__node, _Dp> __node_holder; + using _Dp _LIBCPP_NODEBUG = __tree_node_destructor<__node_allocator>; + using __node_holder _LIBCPP_NODEBUG = unique_ptr<__node, _Dp>; _LIBCPP_HIDE_FROM_ABI __node_holder remove(const_iterator __p) _NOEXCEPT; // FIXME: Make this function const qualified. Unfortunately doing so // breaks existing code which uses non-const callable comparators. template <class _Key> - _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_equal(__end_node_pointer& __parent, const _Key& __v); + _LIBCPP_HIDE_FROM_ABI pair<__end_node_pointer, __node_base_pointer&> __find_equal(const _Key& __v); + template <class _Key> - _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_equal(__end_node_pointer& __parent, const _Key& __v) const { - return const_cast<__tree*>(this)->__find_equal(__parent, __v); + _LIBCPP_HIDE_FROM_ABI pair<__end_node_pointer, __node_base_pointer&> __find_equal(const _Key& __v) const { + return const_cast<__tree*>(this)->__find_equal(__v); } + template <class _Key> - _LIBCPP_HIDE_FROM_ABI __node_base_pointer& - __find_equal(const_iterator __hint, __end_node_pointer& __parent, __node_base_pointer& __dummy, const _Key& __v); + _LIBCPP_HIDE_FROM_ABI pair<__end_node_pointer, __node_base_pointer&> + __find_equal(const_iterator __hint, __node_base_pointer& __dummy, const _Key& __v); _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const __tree& __t) { __copy_assign_alloc(__t, integral_constant<bool, __node_traits::propagate_on_container_copy_assignment::value>()); @@ -1171,7 +1223,7 @@ private: _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node(_Args&&... __args); // TODO: Make this _LIBCPP_HIDE_FROM_ABI - _LIBCPP_HIDDEN void destroy(__node_pointer __nd) _NOEXCEPT; + _LIBCPP_HIDDEN void destroy(__node_pointer __nd) _NOEXCEPT { (__tree_deleter(__node_alloc_))(__nd); } _LIBCPP_HIDE_FROM_ABI void __move_assign(__tree& __t, false_type); _LIBCPP_HIDE_FROM_ABI void __move_assign(__tree& __t, true_type) _NOEXCEPT_( @@ -1340,25 +1392,6 @@ private: } }; -template <class _Tp, class _Compare, class _Allocator> -__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp) _NOEXCEPT_( - is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_copy_constructible<value_compare>::value) - : __size_(0), __value_comp_(__comp) { - __begin_node_ = __end_node(); -} - -template <class _Tp, class _Compare, class _Allocator> -__tree<_Tp, _Compare, _Allocator>::__tree(const allocator_type& __a) - : __begin_node_(), __node_alloc_(__node_allocator(__a)), __size_(0) { - __begin_node_ = __end_node(); -} - -template <class _Tp, class _Compare, class _Allocator> -__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp, const allocator_type& __a) - : __begin_node_(), __node_alloc_(__node_allocator(__a)), __size_(0), __value_comp_(__comp) { - __begin_node_ = __end_node(); -} - // Precondition: __size_ != 0 template <class _Tp, class _Compare, class _Allocator> typename __tree<_Tp, _Compare, _Allocator>::__node_pointer @@ -1425,8 +1458,8 @@ __tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=( template <class _Tp, class _Compare, class _Allocator> template <class _ForwardIterator> void __tree<_Tp, _Compare, _Allocator>::__assign_unique(_ForwardIterator __first, _ForwardIterator __last) { - typedef iterator_traits<_ForwardIterator> _ITraits; - typedef typename _ITraits::value_type _ItValueType; + using _ITraits = iterator_traits<_ForwardIterator>; + using _ItValueType = typename _ITraits::value_type; static_assert( is_same<_ItValueType, value_type>::value, "__assign_unique may only be called with the containers value type"); static_assert( @@ -1445,8 +1478,8 @@ void __tree<_Tp, _Compare, _Allocator>::__assign_unique(_ForwardIterator __first template <class _Tp, class _Compare, class _Allocator> template <class _InputIterator> void __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _InputIterator __last) { - typedef iterator_traits<_InputIterator> _ITraits; - typedef typename _ITraits::value_type _ItValueType; + using _ITraits = iterator_traits<_InputIterator>; + using _ItValueType = typename _ITraits::value_type; static_assert( is_same<_ItValueType, value_type>::value, "__assign_multi may only be called with the containers value_type"); if (__size_ != 0) { @@ -1556,27 +1589,6 @@ void __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) { } template <class _Tp, class _Compare, class _Allocator> -__tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t) - _NOEXCEPT_(is_nothrow_move_assignable<value_compare>::value && - ((__node_traits::propagate_on_container_move_assignment::value && - is_nothrow_move_assignable<__node_allocator>::value) || - allocator_traits<__node_allocator>::is_always_equal::value)) { - __move_assign(__t, integral_constant<bool, __node_traits::propagate_on_container_move_assignment::value>()); - return *this; -} - -template <class _Tp, class _Compare, class _Allocator> -__tree<_Tp, _Compare, _Allocator>::~__tree() { - static_assert(is_copy_constructible<value_compare>::value, "Comparator must be copy-constructible."); - destroy(__root()); -} - -template <class _Tp, class _Compare, class _Allocator> -void __tree<_Tp, _Compare, _Allocator>::destroy(__node_pointer __nd) _NOEXCEPT { - (__tree_deleter(__node_alloc_))(__nd); -} - -template <class _Tp, class _Compare, class _Allocator> void __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t) #if _LIBCPP_STD_VER <= 11 _NOEXCEPT_(__is_nothrow_swappable_v<value_compare> && @@ -1699,92 +1711,89 @@ typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer& __tree<_Tp, _Co return __find_leaf_low(__parent, __v); } -// Find place to insert if __v doesn't exist -// Set __parent to parent of null leaf -// Return reference to null leaf -// If __v exists, set parent to node of __v and return reference to node of __v +// Find __v +// If __v exists, return the parent of the node of __v and a reference to the pointer to the node of __v. +// If __v doesn't exist, return the parent of the null leaf and a reference to the pointer to the null leaf. template <class _Tp, class _Compare, class _Allocator> template <class _Key> -typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer& -__tree<_Tp, _Compare, _Allocator>::__find_equal(__end_node_pointer& __parent, const _Key& __v) { - __node_pointer __nd = __root(); - __node_base_pointer* __nd_ptr = __root_ptr(); - if (__nd != nullptr) { - while (true) { - if (value_comp()(__v, __nd->__get_value())) { - if (__nd->__left_ != nullptr) { - __nd_ptr = std::addressof(__nd->__left_); - __nd = static_cast<__node_pointer>(__nd->__left_); - } else { - __parent = static_cast<__end_node_pointer>(__nd); - return __parent->__left_; - } - } else if (value_comp()(__nd->__get_value(), __v)) { - if (__nd->__right_ != nullptr) { - __nd_ptr = std::addressof(__nd->__right_); - __nd = static_cast<__node_pointer>(__nd->__right_); - } else { - __parent = static_cast<__end_node_pointer>(__nd); - return __nd->__right_; - } - } else { - __parent = static_cast<__end_node_pointer>(__nd); - return *__nd_ptr; - } +_LIBCPP_HIDE_FROM_ABI pair<typename __tree<_Tp, _Compare, _Allocator>::__end_node_pointer, + typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&> +__tree<_Tp, _Compare, _Allocator>::__find_equal(const _Key& __v) { + using _Pair = pair<__end_node_pointer, __node_base_pointer&>; + + __node_pointer __nd = __root(); + + if (__nd == nullptr) { + auto __end = __end_node(); + return _Pair(__end, __end->__left_); + } + + __node_base_pointer* __node_ptr = __root_ptr(); + auto __comp = __lazy_synth_three_way_comparator<_Compare, _Key, value_type>(value_comp()); + + while (true) { + auto __comp_res = __comp(__v, __nd->__get_value()); + + if (__comp_res.__less()) { + if (__nd->__left_ == nullptr) + return _Pair(static_cast<__end_node_pointer>(__nd), __nd->__left_); + + __node_ptr = std::addressof(__nd->__left_); + __nd = static_cast<__node_pointer>(__nd->__left_); + } else if (__comp_res.__greater()) { + if (__nd->__right_ == nullptr) + return _Pair(static_cast<__end_node_pointer>(__nd), __nd->__right_); + + __node_ptr = std::addressof(__nd->__right_); + __nd = static_cast<__node_pointer>(__nd->__right_); + } else { + return _Pair(static_cast<__end_node_pointer>(__nd), *__node_ptr); } } - __parent = __end_node(); - return __parent->__left_; } -// Find place to insert if __v doesn't exist +// Find __v // First check prior to __hint. // Next check after __hint. // Next do O(log N) search. -// Set __parent to parent of null leaf -// Return reference to null leaf -// If __v exists, set parent to node of __v and return reference to node of __v +// If __v exists, return the parent of the node of __v and a reference to the pointer to the node of __v. +// If __v doesn't exist, return the parent of the null leaf and a reference to the pointer to the null leaf. template <class _Tp, class _Compare, class _Allocator> template <class _Key> -typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer& __tree<_Tp, _Compare, _Allocator>::__find_equal( - const_iterator __hint, __end_node_pointer& __parent, __node_base_pointer& __dummy, const _Key& __v) { - if (__hint == end() || value_comp()(__v, *__hint)) // check before - { +_LIBCPP_HIDE_FROM_ABI pair<typename __tree<_Tp, _Compare, _Allocator>::__end_node_pointer, + typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&> +__tree<_Tp, _Compare, _Allocator>::__find_equal(const_iterator __hint, __node_base_pointer& __dummy, const _Key& __v) { + using _Pair = pair<__end_node_pointer, __node_base_pointer&>; + + if (__hint == end() || value_comp()(__v, *__hint)) { // check before // __v < *__hint const_iterator __prior = __hint; if (__prior == begin() || value_comp()(*--__prior, __v)) { // *prev(__hint) < __v < *__hint - if (__hint.__ptr_->__left_ == nullptr) { - __parent = __hint.__ptr_; - return __parent->__left_; - } else { - __parent = __prior.__ptr_; - return static_cast<__node_base_pointer>(__prior.__ptr_)->__right_; - } + if (__hint.__ptr_->__left_ == nullptr) + return _Pair(__hint.__ptr_, __hint.__ptr_->__left_); + return _Pair(__prior.__ptr_, static_cast<__node_pointer>(__prior.__ptr_)->__right_); } // __v <= *prev(__hint) - return __find_equal(__parent, __v); - } else if (value_comp()(*__hint, __v)) // check after - { + return __find_equal(__v); + } + + if (value_comp()(*__hint, __v)) { // check after // *__hint < __v const_iterator __next = std::next(__hint); if (__next == end() || value_comp()(__v, *__next)) { // *__hint < __v < *std::next(__hint) - if (__hint.__get_np()->__right_ == nullptr) { - __parent = __hint.__ptr_; - return static_cast<__node_base_pointer>(__hint.__ptr_)->__right_; - } else { - __parent = __next.__ptr_; - return __parent->__left_; - } + if (__hint.__get_np()->__right_ == nullptr) + return _Pair(__hint.__ptr_, static_cast<__node_pointer>(__hint.__ptr_)->__right_); + return _Pair(__next.__ptr_, __next.__ptr_->__left_); } // *next(__hint) <= __v - return __find_equal(__parent, __v); + return __find_equal(__v); } + // else __v == *__hint - __parent = __hint.__ptr_; - __dummy = static_cast<__node_base_pointer>(__hint.__ptr_); - return __dummy; + __dummy = static_cast<__node_base_pointer>(__hint.__ptr_); + return _Pair(__hint.__ptr_, __dummy); } template <class _Tp, class _Compare, class _Allocator> @@ -1802,42 +1811,6 @@ void __tree<_Tp, _Compare, _Allocator>::__insert_node_at( } template <class _Tp, class _Compare, class _Allocator> -template <class _Key, class... _Args> -pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> -__tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args) { - __end_node_pointer __parent; - __node_base_pointer& __child = __find_equal(__parent, __k); - __node_pointer __r = static_cast<__node_pointer>(__child); - bool __inserted = false; - if (__child == nullptr) { - __node_holder __h = __construct_node(std::forward<_Args>(__args)...); - __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); - __r = __h.release(); - __inserted = true; - } - return pair<iterator, bool>(iterator(__r), __inserted); -} - -template <class _Tp, class _Compare, class _Allocator> -template <class _Key, class... _Args> -pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> -__tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args( - const_iterator __p, _Key const& __k, _Args&&... __args) { - __end_node_pointer __parent; - __node_base_pointer __dummy; - __node_base_pointer& __child = __find_equal(__p, __parent, __dummy, __k); - __node_pointer __r = static_cast<__node_pointer>(__child); - bool __inserted = false; - if (__child == nullptr) { - __node_holder __h = __construct_node(std::forward<_Args>(__args)...); - __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); - __r = __h.release(); - __inserted = true; - } - return pair<iterator, bool>(iterator(__r), __inserted); -} - -template <class _Tp, class _Compare, class _Allocator> template <class... _Args> typename __tree<_Tp, _Compare, _Allocator>::__node_holder __tree<_Tp, _Compare, _Allocator>::__construct_node(_Args&&... __args) { @@ -1850,39 +1823,6 @@ __tree<_Tp, _Compare, _Allocator>::__construct_node(_Args&&... __args) { template <class _Tp, class _Compare, class _Allocator> template <class... _Args> -pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> -__tree<_Tp, _Compare, _Allocator>::__emplace_unique_impl(_Args&&... __args) { - __node_holder __h = __construct_node(std::forward<_Args>(__args)...); - __end_node_pointer __parent; - __node_base_pointer& __child = __find_equal(__parent, __h->__get_value()); - __node_pointer __r = static_cast<__node_pointer>(__child); - bool __inserted = false; - if (__child == nullptr) { - __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); - __r = __h.release(); - __inserted = true; - } - return pair<iterator, bool>(iterator(__r), __inserted); -} - -template <class _Tp, class _Compare, class _Allocator> -template <class... _Args> -typename __tree<_Tp, _Compare, _Allocator>::iterator -__tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_impl(const_iterator __p, _Args&&... __args) { - __node_holder __h = __construct_node(std::forward<_Args>(__args)...); - __end_node_pointer __parent; - __node_base_pointer __dummy; - __node_base_pointer& __child = __find_equal(__p, __parent, __dummy, __h->__get_value()); - __node_pointer __r = static_cast<__node_pointer>(__child); - if (__child == nullptr) { - __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); - __r = __h.release(); - } - return iterator(__r); -} - -template <class _Tp, class _Compare, class _Allocator> -template <class... _Args> typename __tree<_Tp, _Compare, _Allocator>::iterator __tree<_Tp, _Compare, _Allocator>::__emplace_multi(_Args&&... __args) { __node_holder __h = __construct_node(std::forward<_Args>(__args)...); @@ -1906,10 +1846,9 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p, _Arg template <class _Tp, class _Compare, class _Allocator> pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> __tree<_Tp, _Compare, _Allocator>::__node_assign_unique(const value_type& __v, __node_pointer __nd) { - __end_node_pointer __parent; - __node_base_pointer& __child = __find_equal(__parent, __v); - __node_pointer __r = static_cast<__node_pointer>(__child); - bool __inserted = false; + auto [__parent, __child] = __find_equal(__v); + __node_pointer __r = static_cast<__node_pointer>(__child); + bool __inserted = false; if (__child == nullptr) { __assign_value(__nd->__get_value(), __v); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd)); @@ -1958,8 +1897,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(_NodeHandle&& __n return _InsertReturnType{end(), false, _NodeHandle()}; __node_pointer __ptr = __nh.__ptr_; - __end_node_pointer __parent; - __node_base_pointer& __child = __find_equal(__parent, __ptr->__get_value()); + auto [__parent, __child] = __find_equal(__ptr->__get_value()); if (__child != nullptr) return _InsertReturnType{iterator(static_cast<__node_pointer>(__child)), false, std::move(__nh)}; @@ -1976,10 +1914,9 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(const_iterator __ return end(); __node_pointer __ptr = __nh.__ptr_; - __end_node_pointer __parent; __node_base_pointer __dummy; - __node_base_pointer& __child = __find_equal(__hint, __parent, __dummy, __ptr->__get_value()); - __node_pointer __r = static_cast<__node_pointer>(__child); + auto [__parent, __child] = __find_equal(__hint, __dummy, __ptr->__get_value()); + __node_pointer __r = static_cast<__node_pointer>(__child); if (__child == nullptr) { __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr)); __r = __ptr; @@ -2012,8 +1949,7 @@ _LIBCPP_HIDE_FROM_ABI void __tree<_Tp, _Compare, _Allocator>::__node_handle_merg for (typename _Tree::iterator __i = __source.begin(); __i != __source.end();) { __node_pointer __src_ptr = __i.__get_np(); - __end_node_pointer __parent; - __node_base_pointer& __child = __find_equal(__parent, __src_ptr->__get_value()); + auto [__parent, __child] = __find_equal(__src_ptr->__get_value()); ++__i; if (__child != nullptr) continue; @@ -2113,10 +2049,12 @@ template <class _Key> typename __tree<_Tp, _Compare, _Allocator>::size_type __tree<_Tp, _Compare, _Allocator>::__count_unique(const _Key& __k) const { __node_pointer __rt = __root(); + auto __comp = __lazy_synth_three_way_comparator<value_compare, _Key, value_type>(value_comp()); while (__rt != nullptr) { - if (value_comp()(__k, __rt->__get_value())) { + auto __comp_res = __comp(__k, __rt->__get_value()); + if (__comp_res.__less()) { __rt = static_cast<__node_pointer>(__rt->__left_); - } else if (value_comp()(__rt->__get_value(), __k)) + } else if (__comp_res.__greater()) __rt = static_cast<__node_pointer>(__rt->__right_); else return 1; @@ -2130,11 +2068,13 @@ typename __tree<_Tp, _Compare, _Allocator>::size_type __tree<_Tp, _Compare, _Allocator>::__count_multi(const _Key& __k) const { __end_node_pointer __result = __end_node(); __node_pointer __rt = __root(); + auto __comp = __lazy_synth_three_way_comparator<value_compare, _Key, value_type>(value_comp()); while (__rt != nullptr) { - if (value_comp()(__k, __rt->__get_value())) { + auto __comp_res = __comp(__k, __rt->__get_value()); + if (__comp_res.__less()) { __result = static_cast<__end_node_pointer>(__rt); __rt = static_cast<__node_pointer>(__rt->__left_); - } else if (value_comp()(__rt->__get_value(), __k)) + } else if (__comp_res.__greater()) __rt = static_cast<__node_pointer>(__rt->__right_); else return std::distance( @@ -2204,14 +2144,16 @@ template <class _Tp, class _Compare, class _Allocator> template <class _Key> pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, typename __tree<_Tp, _Compare, _Allocator>::iterator> __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) { - typedef pair<iterator, iterator> _Pp; + using _Pp = pair<iterator, iterator>; __end_node_pointer __result = __end_node(); __node_pointer __rt = __root(); + auto __comp = __lazy_synth_three_way_comparator<value_compare, _Key, value_type>(value_comp()); while (__rt != nullptr) { - if (value_comp()(__k, __rt->__get_value())) { + auto __comp_res = __comp(__k, __rt->__get_value()); + if (__comp_res.__less()) { __result = static_cast<__end_node_pointer>(__rt); __rt = static_cast<__node_pointer>(__rt->__left_); - } else if (value_comp()(__rt->__get_value(), __k)) + } else if (__comp_res.__greater()) __rt = static_cast<__node_pointer>(__rt->__right_); else return _Pp(iterator(__rt), @@ -2226,14 +2168,16 @@ template <class _Key> pair<typename __tree<_Tp, _Compare, _Allocator>::const_iterator, typename __tree<_Tp, _Compare, _Allocator>::const_iterator> __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) const { - typedef pair<const_iterator, const_iterator> _Pp; + using _Pp = pair<const_iterator, const_iterator>; __end_node_pointer __result = __end_node(); __node_pointer __rt = __root(); + auto __comp = __lazy_synth_three_way_comparator<value_compare, _Key, value_type>(value_comp()); while (__rt != nullptr) { - if (value_comp()(__k, __rt->__get_value())) { + auto __comp_res = __comp(__k, __rt->__get_value()); + if (__comp_res.__less()) { __result = static_cast<__end_node_pointer>(__rt); __rt = static_cast<__node_pointer>(__rt->__left_); - } else if (value_comp()(__rt->__get_value(), __k)) + } else if (__comp_res.__greater()) __rt = static_cast<__node_pointer>(__rt->__right_); else return _Pp( @@ -2248,14 +2192,16 @@ template <class _Tp, class _Compare, class _Allocator> template <class _Key> pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, typename __tree<_Tp, _Compare, _Allocator>::iterator> __tree<_Tp, _Compare, _Allocator>::__equal_range_multi(const _Key& __k) { - typedef pair<iterator, iterator> _Pp; + using _Pp = pair<iterator, iterator>; __end_node_pointer __result = __end_node(); - __node_pointer __rt = __root(); + __node_pointer __rt = __root(); + auto __comp = __lazy_synth_three_way_comparator<value_compare, _Key, value_type>(value_comp()); while (__rt != nullptr) { - if (value_comp()(__k, __rt->__get_value())) { + auto __comp_res = __comp(__k, __rt->__get_value()); + if (__comp_res.__less()) { __result = static_cast<__end_node_pointer>(__rt); __rt = static_cast<__node_pointer>(__rt->__left_); - } else if (value_comp()(__rt->__get_value(), __k)) + } else if (__comp_res.__greater()) __rt = static_cast<__node_pointer>(__rt->__right_); else return _Pp(__lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), static_cast<__end_node_pointer>(__rt)), @@ -2269,14 +2215,16 @@ template <class _Key> pair<typename __tree<_Tp, _Compare, _Allocator>::const_iterator, typename __tree<_Tp, _Compare, _Allocator>::const_iterator> __tree<_Tp, _Compare, _Allocator>::__equal_range_multi(const _Key& __k) const { - typedef pair<const_iterator, const_iterator> _Pp; + using _Pp = pair<const_iterator, const_iterator>; __end_node_pointer __result = __end_node(); - __node_pointer __rt = __root(); + __node_pointer __rt = __root(); + auto __comp = __lazy_synth_three_way_comparator<value_compare, _Key, value_type>(value_comp()); while (__rt != nullptr) { - if (value_comp()(__k, __rt->__get_value())) { + auto __comp_res = __comp(__k, __rt->__get_value()); + if (__comp_res.__less()) { __result = static_cast<__end_node_pointer>(__rt); __rt = static_cast<__node_pointer>(__rt->__left_); - } else if (value_comp()(__rt->__get_value(), __k)) + } else if (__comp_res.__greater()) __rt = static_cast<__node_pointer>(__rt->__right_); else return _Pp(__lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), static_cast<__end_node_pointer>(__rt)), diff --git a/libcxx/include/__tuple/make_tuple_types.h b/libcxx/include/__tuple/make_tuple_types.h deleted file mode 100644 index 3c22ec85dc9c..000000000000 --- a/libcxx/include/__tuple/make_tuple_types.h +++ /dev/null @@ -1,77 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H -#define _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__fwd/array.h> -#include <__fwd/tuple.h> -#include <__tuple/tuple_element.h> -#include <__tuple/tuple_size.h> -#include <__tuple/tuple_types.h> -#include <__type_traits/copy_cvref.h> -#include <__type_traits/remove_cvref.h> -#include <__type_traits/remove_reference.h> -#include <__utility/integer_sequence.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#ifndef _LIBCPP_CXX03_LANG - -_LIBCPP_BEGIN_NAMESPACE_STD - -// __make_tuple_types<_Tuple<_Types...>, _Ep, _Sp>::type is a -// __tuple_types<_Types...> using only those _Types in the range [_Sp, _Ep). -// _Sp defaults to 0 and _Ep defaults to tuple_size<_Tuple>. If _Tuple is a -// lvalue_reference type, then __tuple_types<_Types&...> is the result. - -template <class _TupleTypes, class _TupleIndices> -struct __make_tuple_types_flat; - -template <template <class...> class _Tuple, class... _Types, size_t... _Idx> -struct __make_tuple_types_flat<_Tuple<_Types...>, __index_sequence<_Idx...>> { - // Specialization for pair, tuple, and __tuple_types - template <class _Tp> - using __apply_quals _LIBCPP_NODEBUG = __tuple_types<__copy_cvref_t<_Tp, __type_pack_element<_Idx, _Types...>>...>; -}; - -template <class _Vt, size_t _Np, size_t... _Idx> -struct __make_tuple_types_flat<array<_Vt, _Np>, __index_sequence<_Idx...>> { - template <size_t> - using __value_type _LIBCPP_NODEBUG = _Vt; - template <class _Tp> - using __apply_quals _LIBCPP_NODEBUG = __tuple_types<__copy_cvref_t<_Tp, __value_type<_Idx>>...>; -}; - -template <class _Tp> -struct __make_tuple_types { - using _RawTp _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>; - using _Maker _LIBCPP_NODEBUG = - __make_tuple_types_flat<_RawTp, __make_index_sequence<tuple_size<__libcpp_remove_reference_t<_Tp>>::value>>; - using type _LIBCPP_NODEBUG = typename _Maker::template __apply_quals<_Tp>; -}; - -template <class... _Types> -struct __make_tuple_types<tuple<_Types...>> { - using type _LIBCPP_NODEBUG = __tuple_types<_Types...>; -}; - -template <class... _Types> -struct __make_tuple_types<__tuple_types<_Types...>> { - using type _LIBCPP_NODEBUG = __tuple_types<_Types...>; -}; - -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP_CXX03_LANG - -#endif // _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H diff --git a/libcxx/include/__tuple/sfinae_helpers.h b/libcxx/include/__tuple/sfinae_helpers.h index f314381d0a48..f81048f4062b 100644 --- a/libcxx/include/__tuple/sfinae_helpers.h +++ b/libcxx/include/__tuple/sfinae_helpers.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD #ifndef _LIBCPP_CXX03_LANG -struct _LIBCPP_EXPORTED_FROM_ABI __check_tuple_constructor_fail { +struct __check_tuple_constructor_fail { static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_explicit_default() { return false; } static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_implicit_default() { return false; } template <class...> diff --git a/libcxx/include/__tuple/tuple_element.h b/libcxx/include/__tuple/tuple_element.h index 607ac3a453de..50a98079ccf8 100644 --- a/libcxx/include/__tuple/tuple_element.h +++ b/libcxx/include/__tuple/tuple_element.h @@ -11,7 +11,6 @@ #include <__config> #include <__cstddef/size_t.h> -#include <__tuple/tuple_types.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -37,21 +36,11 @@ struct tuple_element<_Ip, const volatile _Tp> { using type _LIBCPP_NODEBUG = const volatile typename tuple_element<_Ip, _Tp>::type; }; -#ifndef _LIBCPP_CXX03_LANG - -template <size_t _Ip, class... _Types> -struct tuple_element<_Ip, __tuple_types<_Types...> > { - static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range"); - using type _LIBCPP_NODEBUG = __type_pack_element<_Ip, _Types...>; -}; - # if _LIBCPP_STD_VER >= 14 template <size_t _Ip, class... _Tp> using tuple_element_t _LIBCPP_NODEBUG = typename tuple_element<_Ip, _Tp...>::type; # endif -#endif // _LIBCPP_CXX03_LANG - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TUPLE_TUPLE_ELEMENT_H diff --git a/libcxx/include/__tuple/tuple_like_ext.h b/libcxx/include/__tuple/tuple_like_ext.h index 45c0e65d62ff..5a6748a9cc79 100644 --- a/libcxx/include/__tuple/tuple_like_ext.h +++ b/libcxx/include/__tuple/tuple_like_ext.h @@ -14,7 +14,6 @@ #include <__fwd/array.h> #include <__fwd/pair.h> #include <__fwd/tuple.h> -#include <__tuple/tuple_types.h> #include <__type_traits/integral_constant.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -26,13 +25,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class _Tp> struct __tuple_like_ext : false_type {}; -template <class _Tp> -struct __tuple_like_ext<const _Tp> : public __tuple_like_ext<_Tp> {}; -template <class _Tp> -struct __tuple_like_ext<volatile _Tp> : public __tuple_like_ext<_Tp> {}; -template <class _Tp> -struct __tuple_like_ext<const volatile _Tp> : public __tuple_like_ext<_Tp> {}; - #ifndef _LIBCPP_CXX03_LANG template <class... _Tp> struct __tuple_like_ext<tuple<_Tp...> > : true_type {}; @@ -44,9 +36,6 @@ struct __tuple_like_ext<pair<_T1, _T2> > : true_type {}; template <class _Tp, size_t _Size> struct __tuple_like_ext<array<_Tp, _Size> > : true_type {}; -template <class... _Tp> -struct __tuple_like_ext<__tuple_types<_Tp...> > : true_type {}; - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H diff --git a/libcxx/include/__tuple/tuple_size.h b/libcxx/include/__tuple/tuple_size.h index 3308c000dc11..60f2a667a1ba 100644 --- a/libcxx/include/__tuple/tuple_size.h +++ b/libcxx/include/__tuple/tuple_size.h @@ -59,9 +59,6 @@ struct tuple_size<const volatile _Tp> : public tuple_size<_Tp> {}; template <class... _Tp> struct tuple_size<tuple<_Tp...> > : public integral_constant<size_t, sizeof...(_Tp)> {}; -template <class... _Tp> -struct tuple_size<__tuple_types<_Tp...> > : public integral_constant<size_t, sizeof...(_Tp)> {}; - # if _LIBCPP_STD_VER >= 17 template <class _Tp> inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; diff --git a/libcxx/include/__type_traits/can_extract_key.h b/libcxx/include/__type_traits/can_extract_key.h deleted file mode 100644 index b8359d070881..000000000000 --- a/libcxx/include/__type_traits/can_extract_key.h +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H -#define _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H - -#include <__config> -#include <__fwd/pair.h> -#include <__type_traits/conditional.h> -#include <__type_traits/integral_constant.h> -#include <__type_traits/is_same.h> -#include <__type_traits/remove_const.h> -#include <__type_traits/remove_const_ref.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_STD - -// These traits are used in __tree and __hash_table -struct __extract_key_fail_tag {}; -struct __extract_key_self_tag {}; -struct __extract_key_first_tag {}; - -template <class _ValTy, class _Key, class _RawValTy = __remove_const_ref_t<_ValTy> > -struct __can_extract_key - : __conditional_t<_IsSame<_RawValTy, _Key>::value, __extract_key_self_tag, __extract_key_fail_tag> {}; - -template <class _Pair, class _Key, class _First, class _Second> -struct __can_extract_key<_Pair, _Key, pair<_First, _Second> > - : __conditional_t<_IsSame<__remove_const_t<_First>, _Key>::value, __extract_key_first_tag, __extract_key_fail_tag> { -}; - -// __can_extract_map_key uses true_type/false_type instead of the tags. -// It returns true if _Key != _ContainerValueTy (the container is a map not a set) -// and _ValTy == _Key. -template <class _ValTy, class _Key, class _ContainerValueTy, class _RawValTy = __remove_const_ref_t<_ValTy> > -struct __can_extract_map_key : integral_constant<bool, _IsSame<_RawValTy, _Key>::value> {}; - -// This specialization returns __extract_key_fail_tag for non-map containers -// because _Key == _ContainerValueTy -template <class _ValTy, class _Key, class _RawValTy> -struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy> : false_type {}; - -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H diff --git a/libcxx/include/__type_traits/invoke.h b/libcxx/include/__type_traits/invoke.h index 24702b6d5b52..ba8202576593 100644 --- a/libcxx/include/__type_traits/invoke.h +++ b/libcxx/include/__type_traits/invoke.h @@ -62,6 +62,9 @@ // // template <class Func, class... Args> // using __invoke_result_t = invoke_result_t<Func, Args...>; +// +// template <class Ret, class Func, class... Args> +// struct __is_invocable_r : is_invocable_r<Ret, Func, Args...> {}; _LIBCPP_BEGIN_NAMESPACE_STD @@ -329,6 +332,9 @@ using __invoke_result_t _LIBCPP_NODEBUG = typename __invoke_result<_Func, _Args. #endif // __has_builtin(__builtin_invoke_r) +template <class _Ret, class _Func, class... _Args> +struct __is_invocable_r : integral_constant<bool, __is_invocable_r_v<_Ret, _Func, _Args...> > {}; + template <class _Ret, bool = is_void<_Ret>::value> struct __invoke_void_return_wrapper { template <class... _Args> diff --git a/libcxx/include/__type_traits/is_unqualified.h b/libcxx/include/__type_traits/is_unqualified.h new file mode 100644 index 000000000000..7970b3611601 --- /dev/null +++ b/libcxx/include/__type_traits/is_unqualified.h @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___TYPE_TRAITS_IS_UNQUALIFIED_H +#define _LIBCPP___TYPE_TRAITS_IS_UNQUALIFIED_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template <class _Tp> +inline const bool __is_unqualified_v = __is_same(_Tp, __remove_cvref(_Tp)); + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___TYPE_TRAITS_IS_UNQUALIFIED_H diff --git a/libcxx/include/__utility/default_three_way_comparator.h b/libcxx/include/__utility/default_three_way_comparator.h new file mode 100644 index 000000000000..ce423c6ce98e --- /dev/null +++ b/libcxx/include/__utility/default_three_way_comparator.h @@ -0,0 +1,50 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___UTILITY_DEFAULT_THREE_WAY_COMPARATOR_H +#define _LIBCPP___UTILITY_DEFAULT_THREE_WAY_COMPARATOR_H + +#include <__config> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_arithmetic.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +// This struct can be specialized to provide a three way comparator between _LHS and _RHS. +// The return value should be +// - less than zero if (lhs_val < rhs_val) +// - greater than zero if (rhs_val < lhs_val) +// - zero otherwise +template <class _LHS, class _RHS, class = void> +struct __default_three_way_comparator; + +template <class _Tp> +struct __default_three_way_comparator<_Tp, _Tp, __enable_if_t<is_arithmetic<_Tp>::value> > { + _LIBCPP_HIDE_FROM_ABI static int operator()(_Tp __lhs, _Tp __rhs) { + if (__lhs < __rhs) + return -1; + if (__lhs > __rhs) + return 1; + return 0; + } +}; + +template <class _LHS, class _RHS, bool = true> +inline const bool __has_default_three_way_comparator_v = false; + +template <class _LHS, class _RHS> +inline const bool + __has_default_three_way_comparator_v< _LHS, _RHS, sizeof(__default_three_way_comparator<_LHS, _RHS>) >= 0> = true; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___UTILITY_DEFAULT_THREE_WAY_COMPARATOR_H diff --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h index ade4b6685a11..c5bfa947058f 100644 --- a/libcxx/include/__utility/in_place.h +++ b/libcxx/include/__utility/in_place.h @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 17 -struct _LIBCPP_EXPORTED_FROM_ABI in_place_t { +struct in_place_t { explicit in_place_t() = default; }; inline constexpr in_place_t in_place{}; diff --git a/libcxx/include/__utility/lazy_synth_three_way_comparator.h b/libcxx/include/__utility/lazy_synth_three_way_comparator.h new file mode 100644 index 000000000000..ca98845f0419 --- /dev/null +++ b/libcxx/include/__utility/lazy_synth_three_way_comparator.h @@ -0,0 +1,90 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___UTILITY_LAZY_SYNTH_THREE_WAY_COMPARATOR_H +#define _LIBCPP___UTILITY_LAZY_SYNTH_THREE_WAY_COMPARATOR_H + +#include <__config> +#include <__type_traits/desugars_to.h> +#include <__type_traits/enable_if.h> +#include <__utility/default_three_way_comparator.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +// This file implements a __lazy_synth_three_way_comparator, which tries to build an efficient three way comparison from +// a binary comparator. That is done in multiple steps: +// 1) Check whether the comparator desugars to a less-than operator +// If that is the case, check whether there exists a specialization of `__default_three_way_comparator`, which +// can be specialized to implement a three way comparator for the specific types. +// 2) Fall back to doing a lazy less than/greater than comparison + +_LIBCPP_BEGIN_NAMESPACE_STD + +template <class _Comparator, class _LHS, class _RHS> +struct __lazy_compare_result { + const _Comparator& __comp_; + const _LHS& __lhs_; + const _RHS& __rhs_; + + _LIBCPP_HIDE_FROM_ABI + __lazy_compare_result(_LIBCPP_CTOR_LIFETIMEBOUND const _Comparator& __comp, + _LIBCPP_CTOR_LIFETIMEBOUND const _LHS& __lhs, + _LIBCPP_CTOR_LIFETIMEBOUND const _RHS& __rhs) + : __comp_(__comp), __lhs_(__lhs), __rhs_(__rhs) {} + + _LIBCPP_HIDE_FROM_ABI bool __less() const { return __comp_(__lhs_, __rhs_); } + _LIBCPP_HIDE_FROM_ABI bool __greater() const { return __comp_(__rhs_, __lhs_); } +}; + +// This class provides three way comparison between _LHS and _RHS as efficiently as possible. This can be specialized if +// a comparator only compares part of the object, potentially allowing an efficient three way comparison between the +// subobjects. The specialization should use the __lazy_synth_three_way_comparator for the subobjects to achieve this. +template <class _Comparator, class _LHS, class _RHS, class = void> +struct __lazy_synth_three_way_comparator { + const _Comparator& __comp_; + + _LIBCPP_HIDE_FROM_ABI __lazy_synth_three_way_comparator(_LIBCPP_CTOR_LIFETIMEBOUND const _Comparator& __comp) + : __comp_(__comp) {} + + _LIBCPP_HIDE_FROM_ABI __lazy_compare_result<_Comparator, _LHS, _RHS> + operator()(_LIBCPP_LIFETIMEBOUND const _LHS& __lhs, _LIBCPP_LIFETIMEBOUND const _RHS& __rhs) const { + return __lazy_compare_result<_Comparator, _LHS, _RHS>(__comp_, __lhs, __rhs); + } +}; + +struct __eager_compare_result { + int __res_; + + _LIBCPP_HIDE_FROM_ABI explicit __eager_compare_result(int __res) : __res_(__res) {} + + _LIBCPP_HIDE_FROM_ABI bool __less() const { return __res_ < 0; } + _LIBCPP_HIDE_FROM_ABI bool __greater() const { return __res_ > 0; } +}; + +template <class _Comparator, class _LHS, class _RHS> +struct __lazy_synth_three_way_comparator<_Comparator, + _LHS, + _RHS, + __enable_if_t<__desugars_to_v<__less_tag, _Comparator, _LHS, _RHS> && + __has_default_three_way_comparator_v<_LHS, _RHS> > > { + // This lifetimebound annotation is technically incorrect, but other specializations actually capture the lifetime of + // the comparator. + _LIBCPP_HIDE_FROM_ABI __lazy_synth_three_way_comparator(_LIBCPP_CTOR_LIFETIMEBOUND const _Comparator&) {} + + // Same comment as above. + _LIBCPP_HIDE_FROM_ABI static __eager_compare_result + operator()(_LIBCPP_LIFETIMEBOUND const _LHS& __lhs, _LIBCPP_LIFETIMEBOUND const _RHS& __rhs) { + return __eager_compare_result(__default_three_way_comparator<_LHS, _RHS>()(__lhs, __rhs)); + } +}; + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___UTILITY_LAZY_SYNTH_THREE_WAY_COMPARATOR_H diff --git a/libcxx/include/__utility/try_key_extraction.h b/libcxx/include/__utility/try_key_extraction.h new file mode 100644 index 000000000000..755c08214019 --- /dev/null +++ b/libcxx/include/__utility/try_key_extraction.h @@ -0,0 +1,114 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___UTILITY_TRY_EXTRACT_KEY_H +#define _LIBCPP___UTILITY_TRY_EXTRACT_KEY_H + +#include <__config> +#include <__fwd/pair.h> +#include <__fwd/tuple.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_same.h> +#include <__type_traits/remove_const.h> +#include <__type_traits/remove_const_ref.h> +#include <__utility/declval.h> +#include <__utility/forward.h> +#include <__utility/piecewise_construct.h> +#include <__utility/priority_tag.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template <class _KeyT, class _Ret, class _WithKey, class _WithoutKey, class... _Args> +_LIBCPP_HIDE_FROM_ABI _Ret +__try_key_extraction_impl(__priority_tag<0>, _WithKey, _WithoutKey __without_key, _Args&&... __args) { + return __without_key(std::forward<_Args>(__args)...); +} + +template <class _KeyT, + class _Ret, + class _WithKey, + class _WithoutKey, + class _Arg, + __enable_if_t<is_same<_KeyT, __remove_const_ref_t<_Arg> >::value, int> = 0> +_LIBCPP_HIDE_FROM_ABI _Ret +__try_key_extraction_impl(__priority_tag<1>, _WithKey __with_key, _WithoutKey, _Arg&& __arg) { + return __with_key(__arg, std::forward<_Arg>(__arg)); +} + +template <class _KeyT, + class _Ret, + class _WithKey, + class _WithoutKey, + class _Arg, + __enable_if_t<__is_pair_v<__remove_const_ref_t<_Arg> > && + is_same<__remove_const_t<typename __remove_const_ref_t<_Arg>::first_type>, _KeyT>::value, + int> = 0> +_LIBCPP_HIDE_FROM_ABI _Ret +__try_key_extraction_impl(__priority_tag<1>, _WithKey __with_key, _WithoutKey, _Arg&& __arg) { + return __with_key(__arg.first, std::forward<_Arg>(__arg)); +} + +template <class _KeyT, + class _Ret, + class _WithKey, + class _WithoutKey, + class _Arg1, + class _Arg2, + __enable_if_t<is_same<_KeyT, __remove_const_ref_t<_Arg1> >::value, int> = 0> +_LIBCPP_HIDE_FROM_ABI _Ret +__try_key_extraction_impl(__priority_tag<1>, _WithKey __with_key, _WithoutKey, _Arg1&& __arg1, _Arg2&& __arg2) { + return __with_key(__arg1, std::forward<_Arg1>(__arg1), std::forward<_Arg2>(__arg2)); +} + +#ifndef _LIBCPP_CXX03_LANG +template <class _KeyT, + class _Ret, + class _WithKey, + class _WithoutKey, + class _PiecewiseConstruct, + class _Tuple1, + class _Tuple2, + __enable_if_t<is_same<__remove_const_ref_t<_PiecewiseConstruct>, piecewise_construct_t>::value && + __is_tuple_v<_Tuple1> && tuple_size<_Tuple1>::value == 1 && + is_same<__remove_const_ref_t<typename tuple_element<0, _Tuple1>::type>, _KeyT>::value, + int> = 0> +_LIBCPP_HIDE_FROM_ABI _Ret __try_key_extraction_impl( + __priority_tag<1>, + _WithKey __with_key, + _WithoutKey, + _PiecewiseConstruct&& __pc, + _Tuple1&& __tuple1, + _Tuple2&& __tuple2) { + return __with_key( + std::get<0>(__tuple1), + std::forward<_PiecewiseConstruct>(__pc), + std::forward<_Tuple1>(__tuple1), + std::forward<_Tuple2>(__tuple2)); +} +#endif // _LIBCPP_CXX03_LANG + +// This function tries extracting the given _KeyT from _Args... +// If it succeeds to extract the key, it calls the `__with_key` function with the extracted key and all of the +// arguments. Otherwise it calls the `__without_key` function with all of the arguments. +// +// Both `__with_key` and `__without_key` must take all arguments by reference. +template <class _KeyT, class _WithKey, class _WithoutKey, class... _Args> +_LIBCPP_HIDE_FROM_ABI decltype(std::declval<_WithoutKey>()(std::declval<_Args>()...)) +__try_key_extraction(_WithKey __with_key, _WithoutKey __without_key, _Args&&... __args) { + using _Ret = decltype(__without_key(std::forward<_Args>(__args)...)); + return std::__try_key_extraction_impl<_KeyT, _Ret>( + __priority_tag<1>(), __with_key, __without_key, std::forward<_Args>(__args)...); +} + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___UTILITY_TRY_EXTRACT_KEY_H diff --git a/libcxx/include/__vector/vector_bool.h b/libcxx/include/__vector/vector_bool.h index bd7b28e517ad..7b8290676925 100644 --- a/libcxx/include/__vector/vector_bool.h +++ b/libcxx/include/__vector/vector_bool.h @@ -19,7 +19,7 @@ #include <__bit_reference> #include <__config> #include <__functional/unary_function.h> -#include <__fwd/bit_reference.h> // TODO: This is a workaround for https://github.com/llvm/llvm-project/issues/131814 +#include <__fwd/bit_reference.h> // TODO: This is a workaround for https://llvm.org/PR131814 #include <__fwd/functional.h> #include <__fwd/vector.h> #include <__iterator/distance.h> diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map index 46815eaffa8b..ae4fb7ec01c9 100644 --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -467,8 +467,6 @@ private: __table __table_; - typedef typename __table::__node_pointer __node_pointer; - typedef typename __table::__node_const_pointer __node_const_pointer; typedef typename __table::__node_traits __node_traits; typedef typename __table::__node_allocator __node_allocator; typedef typename __table::__node __node; @@ -693,7 +691,6 @@ private: __table __table_; - typedef typename __table::__node_traits __node_traits; typedef typename __table::__node_allocator __node_allocator; typedef typename __table::__node __node; typedef __hash_map_node_destructor<__node_allocator> _Dp; diff --git a/libcxx/include/fstream b/libcxx/include/fstream index 6d3f20fff688..04cebdedc31d 100644 --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -299,6 +299,16 @@ protected: int sync() override; void imbue(const locale& __loc) override; + _LIBCPP_HIDE_FROM_ABI_VIRTUAL streamsize xsputn(const char_type* __str, streamsize __len) override { + if (__always_noconv_ && __len >= (this->epptr() - this->pbase())) { + if (traits_type::eq_int_type(overflow(), traits_type::eof())) + return 0; + + return std::fwrite(__str, sizeof(char_type), __len, __file_); + } + return basic_streambuf<_CharT, _Traits>::xsputn(__str, __len); + } + private: char* __extbuf_; const char* __extbufnext_; diff --git a/libcxx/include/map b/libcxx/include/map index 9bd2282e77a3..f428c781e503 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -603,6 +603,7 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20 # include <__type_traits/remove_const.h> # include <__type_traits/type_identity.h> # include <__utility/forward.h> +# include <__utility/lazy_synth_three_way_comparator.h> # include <__utility/pair.h> # include <__utility/piecewise_construct.h> # include <__utility/swap.h> @@ -702,6 +703,50 @@ public: # endif }; +# if _LIBCPP_STD_VER >= 14 +template <class _MapValueT, class _Key, class _Compare> +struct __lazy_synth_three_way_comparator<__map_value_compare<_Key, _MapValueT, _Compare>, _MapValueT, _MapValueT> { + __lazy_synth_three_way_comparator<_Compare, _Key, _Key> __comp_; + + __lazy_synth_three_way_comparator( + _LIBCPP_CTOR_LIFETIMEBOUND const __map_value_compare<_Key, _MapValueT, _Compare>& __comp) + : __comp_(__comp.key_comp()) {} + + _LIBCPP_HIDE_FROM_ABI auto + operator()(_LIBCPP_LIFETIMEBOUND const _MapValueT& __lhs, _LIBCPP_LIFETIMEBOUND const _MapValueT& __rhs) const { + return __comp_(__lhs.first, __rhs.first); + } +}; + +template <class _MapValueT, class _Key, class _TransparentKey, class _Compare> +struct __lazy_synth_three_way_comparator<__map_value_compare<_Key, _MapValueT, _Compare>, _TransparentKey, _MapValueT> { + __lazy_synth_three_way_comparator<_Compare, _TransparentKey, _Key> __comp_; + + __lazy_synth_three_way_comparator( + _LIBCPP_CTOR_LIFETIMEBOUND const __map_value_compare<_Key, _MapValueT, _Compare>& __comp) + : __comp_(__comp.key_comp()) {} + + _LIBCPP_HIDE_FROM_ABI auto + operator()(_LIBCPP_LIFETIMEBOUND const _TransparentKey& __lhs, _LIBCPP_LIFETIMEBOUND const _MapValueT& __rhs) const { + return __comp_(__lhs, __rhs.first); + } +}; + +template <class _MapValueT, class _Key, class _TransparentKey, class _Compare> +struct __lazy_synth_three_way_comparator<__map_value_compare<_Key, _MapValueT, _Compare>, _MapValueT, _TransparentKey> { + __lazy_synth_three_way_comparator<_Compare, _Key, _TransparentKey> __comp_; + + __lazy_synth_three_way_comparator( + _LIBCPP_CTOR_LIFETIMEBOUND const __map_value_compare<_Key, _MapValueT, _Compare>& __comp) + : __comp_(__comp.key_comp()) {} + + _LIBCPP_HIDE_FROM_ABI auto + operator()(_LIBCPP_LIFETIMEBOUND const _MapValueT& __lhs, _LIBCPP_LIFETIMEBOUND const _TransparentKey& __rhs) const { + return __comp_(__lhs.first, __rhs); + } +}; +# endif // _LIBCPP_STD_VER >= 14 + template <class _Key, class _CP, class _Compare, bool __b> inline _LIBCPP_HIDE_FROM_ABI void swap(__map_value_compare<_Key, _CP, _Compare, __b>& __x, __map_value_compare<_Key, _CP, _Compare, __b>& __y) @@ -1055,7 +1100,7 @@ public: template <class... _Args> _LIBCPP_HIDE_FROM_ABI iterator emplace_hint(const_iterator __p, _Args&&... __args) { - return __tree_.__emplace_hint_unique(__p.__i_, std::forward<_Args>(__args)...); + return __tree_.__emplace_hint_unique(__p.__i_, std::forward<_Args>(__args)...).first; } template <class _Pp, __enable_if_t<is_constructible<value_type, _Pp>::value, int> = 0> @@ -1065,7 +1110,7 @@ public: template <class _Pp, __enable_if_t<is_constructible<value_type, _Pp>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __pos, _Pp&& __p) { - return __tree_.__emplace_hint_unique(__pos.__i_, std::forward<_Pp>(__p)); + return __tree_.__emplace_hint_unique(__pos.__i_, std::forward<_Pp>(__p)).first; } # endif // _LIBCPP_CXX03_LANG @@ -1073,7 +1118,7 @@ public: _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> insert(const value_type& __v) { return __tree_.__emplace_unique(__v); } _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, const value_type& __v) { - return __tree_.__emplace_hint_unique(__p.__i_, __v); + return __tree_.__emplace_hint_unique(__p.__i_, __v).first; } # ifndef _LIBCPP_CXX03_LANG @@ -1082,25 +1127,21 @@ public: } _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, value_type&& __v) { - return __tree_.__emplace_hint_unique(__p.__i_, std::move(__v)); + return __tree_.__emplace_hint_unique(__p.__i_, std::move(__v)).first; } _LIBCPP_HIDE_FROM_ABI void insert(initializer_list<value_type> __il) { insert(__il.begin(), __il.end()); } # endif template <class _InputIterator> - _LIBCPP_HIDE_FROM_ABI void insert(_InputIterator __f, _InputIterator __l) { - for (const_iterator __e = cend(); __f != __l; ++__f) - insert(__e.__i_, *__f); + _LIBCPP_HIDE_FROM_ABI void insert(_InputIterator __first, _InputIterator __last) { + __tree_.__insert_range_unique(__first, __last); } # if _LIBCPP_STD_VER >= 23 template <_ContainerCompatibleRange<value_type> _Range> _LIBCPP_HIDE_FROM_ABI void insert_range(_Range&& __range) { - const_iterator __end = cend(); - for (auto&& __element : __range) { - insert(__end.__i_, std::forward<decltype(__element)>(__element)); - } + __tree_.__insert_range_unique(ranges::begin(__range), ranges::end(__range)); } # endif @@ -1108,17 +1149,13 @@ public: template <class... _Args> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args) { - return __tree_.__emplace_unique_key_args( - __k, - std::piecewise_construct, - std::forward_as_tuple(__k), - std::forward_as_tuple(std::forward<_Args>(__args)...)); + return __tree_.__emplace_unique( + std::piecewise_construct, std::forward_as_tuple(__k), std::forward_as_tuple(std::forward<_Args>(__args)...)); } template <class... _Args> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args) { - return __tree_.__emplace_unique_key_args( - __k, + return __tree_.__emplace_unique( std::piecewise_construct, std::forward_as_tuple(std::move(__k)), std::forward_as_tuple(std::forward<_Args>(__args)...)); @@ -1127,9 +1164,8 @@ public: template <class... _Args> _LIBCPP_HIDE_FROM_ABI iterator try_emplace(const_iterator __h, const key_type& __k, _Args&&... __args) { return __tree_ - .__emplace_hint_unique_key_args( + .__emplace_hint_unique( __h.__i_, - __k, std::piecewise_construct, std::forward_as_tuple(__k), std::forward_as_tuple(std::forward<_Args>(__args)...)) @@ -1139,9 +1175,8 @@ public: template <class... _Args> _LIBCPP_HIDE_FROM_ABI iterator try_emplace(const_iterator __h, key_type&& __k, _Args&&... __args) { return __tree_ - .__emplace_hint_unique_key_args( + .__emplace_hint_unique( __h.__i_, - __k, std::piecewise_construct, std::forward_as_tuple(std::move(__k)), std::forward_as_tuple(std::forward<_Args>(__args)...)) @@ -1150,27 +1185,25 @@ public: template <class _Vp> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> insert_or_assign(const key_type& __k, _Vp&& __v) { - iterator __p = lower_bound(__k); - if (__p != end() && !key_comp()(__k, __p->first)) { - __p->second = std::forward<_Vp>(__v); - return std::make_pair(__p, false); - } - return std::make_pair(emplace_hint(__p, __k, std::forward<_Vp>(__v)), true); + auto __result = __tree_.__emplace_unique(__k, std::forward<_Vp>(__v)); + auto& [__iter, __inserted] = __result; + if (!__inserted) + __iter->second = std::forward<_Vp>(__v); + return __result; } template <class _Vp> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> insert_or_assign(key_type&& __k, _Vp&& __v) { - iterator __p = lower_bound(__k); - if (__p != end() && !key_comp()(__k, __p->first)) { - __p->second = std::forward<_Vp>(__v); - return std::make_pair(__p, false); - } - return std::make_pair(emplace_hint(__p, std::move(__k), std::forward<_Vp>(__v)), true); + auto __result = __tree_.__emplace_unique(std::move(__k), std::forward<_Vp>(__v)); + auto& [__iter, __inserted] = __result; + if (!__inserted) + __iter->second = std::forward<_Vp>(__v); + return __result; } template <class _Vp> _LIBCPP_HIDE_FROM_ABI iterator insert_or_assign(const_iterator __h, const key_type& __k, _Vp&& __v) { - auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args(__h.__i_, __k, __k, std::forward<_Vp>(__v)); + auto [__r, __inserted] = __tree_.__emplace_hint_unique(__h.__i_, __k, std::forward<_Vp>(__v)); if (!__inserted) __r->second = std::forward<_Vp>(__v); @@ -1180,8 +1213,7 @@ public: template <class _Vp> _LIBCPP_HIDE_FROM_ABI iterator insert_or_assign(const_iterator __h, key_type&& __k, _Vp&& __v) { - auto [__r, __inserted] = - __tree_.__emplace_hint_unique_key_args(__h.__i_, __k, std::move(__k), std::forward<_Vp>(__v)); + auto [__r, __inserted] = __tree_.__emplace_hint_unique(__h.__i_, std::move(__k), std::forward<_Vp>(__v)); if (!__inserted) __r->second = std::forward<_Vp>(__v); @@ -1398,20 +1430,15 @@ map<_Key, _Tp, _Compare, _Allocator>::map(map&& __m, const allocator_type& __a) template <class _Key, class _Tp, class _Compare, class _Allocator> _Tp& map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k) { - return __tree_ - .__emplace_unique_key_args(__k, std::piecewise_construct, std::forward_as_tuple(__k), std::forward_as_tuple()) + return __tree_.__emplace_unique(std::piecewise_construct, std::forward_as_tuple(__k), std::forward_as_tuple()) .first->second; } template <class _Key, class _Tp, class _Compare, class _Allocator> _Tp& map<_Key, _Tp, _Compare, _Allocator>::operator[](key_type&& __k) { - // TODO investigate this clang-tidy warning. - // NOLINTBEGIN(bugprone-use-after-move) return __tree_ - .__emplace_unique_key_args( - __k, std::piecewise_construct, std::forward_as_tuple(std::move(__k)), std::forward_as_tuple()) + .__emplace_unique(std::piecewise_construct, std::forward_as_tuple(std::move(__k)), std::forward_as_tuple()) .first->second; - // NOLINTEND(bugprone-use-after-move) } # else // _LIBCPP_CXX03_LANG @@ -1430,9 +1457,8 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node_with_key(const key_type& template <class _Key, class _Tp, class _Compare, class _Allocator> _Tp& map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k) { - __parent_pointer __parent; - __node_base_pointer& __child = __tree_.__find_equal(__parent, __k); - __node_pointer __r = static_cast<__node_pointer>(__child); + auto [__parent, __child] = __tree_.__find_equal(__k); + __node_pointer __r = static_cast<__node_pointer>(__child); if (__child == nullptr) { __node_holder __h = __construct_node_with_key(__k); __tree_.__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); @@ -1445,8 +1471,7 @@ _Tp& map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k) { template <class _Key, class _Tp, class _Compare, class _Allocator> _Tp& map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) { - __parent_pointer __parent; - __node_base_pointer& __child = __tree_.__find_equal(__parent, __k); + auto [_, __child] = __tree_.__find_equal(__k); if (__child == nullptr) std::__throw_out_of_range("map::at: key not found"); return static_cast<__node_pointer>(__child)->__get_value().second; @@ -1454,8 +1479,7 @@ _Tp& map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) { template <class _Key, class _Tp, class _Compare, class _Allocator> const _Tp& map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const { - __parent_pointer __parent; - __node_base_pointer __child = __tree_.__find_equal(__parent, __k); + auto [_, __child] = __tree_.__find_equal(__k); if (__child == nullptr) std::__throw_out_of_range("map::at: key not found"); return static_cast<__node_pointer>(__child)->__get_value().second; diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in index c431c0cb407f..63cf8e847751 100644 --- a/libcxx/include/module.modulemap.in +++ b/libcxx/include/module.modulemap.in @@ -70,7 +70,6 @@ module std_core [system] { module aligned_storage { header "__type_traits/aligned_storage.h" } module aligned_union { header "__type_traits/aligned_union.h" } module alignment_of { header "__type_traits/alignment_of.h" } - module can_extract_key { header "__type_traits/can_extract_key.h" } module common_reference { header "__type_traits/common_reference.h" } module common_type { header "__type_traits/common_type.h" @@ -336,6 +335,7 @@ module std_core [system] { header "__type_traits/is_union.h" export std_core.type_traits.integral_constant } + module is_unqualified { header "__type_traits/is_unqualified.h" } module is_unsigned { header "__type_traits/is_unsigned.h" export std_core.type_traits.integral_constant @@ -842,7 +842,7 @@ module std [system] { module stable_partition { header "__algorithm/stable_partition.h" } module stable_sort { header "__algorithm/stable_sort.h" - export std.memory.unique_temporary_buffer // TODO: Workaround for https://github.com/llvm/llvm-project/issues/120108 + export std.memory.unique_temporary_buffer // TODO: Workaround for https://llvm.org/PR120108 } module swap_ranges { header "__algorithm/swap_ranges.h" } module three_way_comp_ref_type { header "__algorithm/three_way_comp_ref_type.h" } @@ -1260,7 +1260,7 @@ module std [system] { module directory_entry { header "__filesystem/directory_entry.h" } module directory_iterator { header "__filesystem/directory_iterator.h" - // This is a workaround for https://github.com/llvm/llvm-project/issues/120108. + // This is a workaround for https://llvm.org/PR120108. export * } module directory_options { header "__filesystem/directory_options.h" } @@ -1637,7 +1637,7 @@ module std [system] { module allocation_guard { header "__memory/allocation_guard.h" } module allocator { header "__memory/allocator.h" - export * // TODO: Workaround for https://github.com/llvm/llvm-project/issues/120108 + export * // TODO: Workaround for https://llvm.org/PR120108 } module allocator_arg_t { header "__memory/allocator_arg_t.h" } module allocator_destructor { header "__memory/allocator_destructor.h" } @@ -1682,7 +1682,7 @@ module std [system] { header "__memory/unique_temporary_buffer.h" export std.memory.unique_ptr export std_core.type_traits.is_constant_evaluated - export * // TODO: Workaround for https://github.com/llvm/llvm-project/issues/120108 + export * // TODO: Workaround for https://llvm.org/PR120108 } module uses_allocator { header "__memory/uses_allocator.h" } module uses_allocator_construction { header "__memory/uses_allocator_construction.h" } @@ -1721,7 +1721,7 @@ module std [system] { module allocate { header "__new/allocate.h" export std.utility.element_count // used as part of the API - export * // TODO: Workaround for https://github.com/llvm/llvm-project/issues/120108 + export * // TODO: Workaround for https://llvm.org/PR120108 } module destroying_delete_t { header "__new/destroying_delete_t.h" } module exceptions { header "__new/exceptions.h" } @@ -2109,7 +2109,6 @@ module std [system] { module tuple { module find_index { header "__tuple/find_index.h" } module ignore { header "__tuple/ignore.h" } - module make_tuple_types { header "__tuple/make_tuple_types.h" } module sfinae_helpers { header "__tuple/sfinae_helpers.h" } module tuple_element { header "__tuple/tuple_element.h" } module tuple_like_ext { header "__tuple/tuple_like_ext.h" } @@ -2145,40 +2144,43 @@ module std [system] { } module utility { - module as_const { header "__utility/as_const.h" } - module as_lvalue { header "__utility/as_lvalue.h" } - module auto_cast { + module as_const { header "__utility/as_const.h" } + module as_lvalue { header "__utility/as_lvalue.h" } + module auto_cast { header "__utility/auto_cast.h" export std_core.type_traits.decay // the macro expansion uses that trait } - module cmp { header "__utility/cmp.h" } - module convert_to_integral { header "__utility/convert_to_integral.h" } - module element_count { header "__utility/element_count.h" } - module exception_guard { header "__utility/exception_guard.h" } - module exchange { header "__utility/exchange.h" } - module forward_like { header "__utility/forward_like.h" } - module in_place { + module cmp { header "__utility/cmp.h" } + module convert_to_integral { header "__utility/convert_to_integral.h" } + module default_three_way_comparator { header "__utility/default_three_way_comparator.h" } + module element_count { header "__utility/element_count.h" } + module exception_guard { header "__utility/exception_guard.h" } + module exchange { header "__utility/exchange.h" } + module forward_like { header "__utility/forward_like.h" } + module in_place { header "__utility/in_place.h" export std_core.type_traits.integral_constant } - module integer_sequence { header "__utility/integer_sequence.h" } - module is_pointer_in_range { header "__utility/is_pointer_in_range.h" } - module is_valid_range { header "__utility/is_valid_range.h" } - module move { header "__utility/move.h" } - module no_destroy { header "__utility/no_destroy.h" } - module pair { + module integer_sequence { header "__utility/integer_sequence.h" } + module is_pointer_in_range { header "__utility/is_pointer_in_range.h" } + module is_valid_range { header "__utility/is_valid_range.h" } + module lazy_synth_three_way_comparator { header "__utility/lazy_synth_three_way_comparator.h" } + module move { header "__utility/move.h" } + module no_destroy { header "__utility/no_destroy.h" } + module pair { header "__utility/pair.h" export std.utility.piecewise_construct } - module piecewise_construct { header "__utility/piecewise_construct.h" } - module priority_tag { header "__utility/priority_tag.h" } - module private_constructor_tag { header "__utility/private_constructor_tag.h" } - module rel_ops { header "__utility/rel_ops.h" } - module scope_guard { header "__utility/scope_guard.h" } - module small_buffer { header "__utility/small_buffer.h" } - module swap { header "__utility/swap.h" } - module to_underlying { header "__utility/to_underlying.h" } - module unreachable { header "__utility/unreachable.h" } + module piecewise_construct { header "__utility/piecewise_construct.h" } + module priority_tag { header "__utility/priority_tag.h" } + module private_constructor_tag { header "__utility/private_constructor_tag.h" } + module rel_ops { header "__utility/rel_ops.h" } + module scope_guard { header "__utility/scope_guard.h" } + module small_buffer { header "__utility/small_buffer.h" } + module swap { header "__utility/swap.h" } + module to_underlying { header "__utility/to_underlying.h" } + module try_key_extraction { header "__utility/try_key_extraction.h" } + module unreachable { header "__utility/unreachable.h" } header "utility" export * diff --git a/libcxx/include/mutex b/libcxx/include/mutex index 78d8c8a9bcc6..58474e0ca2b7 100644 --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -320,7 +320,7 @@ public: }; template <class _L0, class _L1> -_LIBCPP_HIDE_FROM_ABI int try_lock(_L0& __l0, _L1& __l1) { +_LIBCPP_NO_THREAD_SAFETY_ANALYSIS _LIBCPP_HIDE_FROM_ABI int try_lock(_L0& __l0, _L1& __l1) { unique_lock<_L0> __u0(__l0, try_to_lock_t()); if (__u0.owns_lock()) { if (__l1.try_lock()) { @@ -335,7 +335,7 @@ _LIBCPP_HIDE_FROM_ABI int try_lock(_L0& __l0, _L1& __l1) { # ifndef _LIBCPP_CXX03_LANG template <class _L0, class _L1, class _L2, class... _L3> -_LIBCPP_HIDE_FROM_ABI int try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) { +_LIBCPP_NO_THREAD_SAFETY_ANALYSIS _LIBCPP_HIDE_FROM_ABI int try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) { int __r = 0; unique_lock<_L0> __u0(__l0, try_to_lock); if (__u0.owns_lock()) { @@ -350,8 +350,11 @@ _LIBCPP_HIDE_FROM_ABI int try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3 # endif // _LIBCPP_CXX03_LANG +// We're using unique_lock to implement the functions, which thread annotations don't support. So we have to disable +// the analysis inside the function. template <class _L0, class _L1> -_LIBCPP_HIDE_FROM_ABI void lock(_L0& __l0, _L1& __l1) { +_LIBCPP_NO_THREAD_SAFETY_ANALYSIS _LIBCPP_HIDE_FROM_ABI void lock(_L0& __l0, _L1& __l1) + _LIBCPP_ACQUIRE_CAPABILITY(__l0, __l1) { while (true) { { unique_lock<_L0> __u0(__l0); @@ -375,7 +378,7 @@ _LIBCPP_HIDE_FROM_ABI void lock(_L0& __l0, _L1& __l1) { # ifndef _LIBCPP_CXX03_LANG template <class _L0, class _L1, class _L2, class... _L3> -void __lock_first(int __i, _L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) { +_LIBCPP_NO_THREAD_SAFETY_ANALYSIS void __lock_first(int __i, _L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) { while (true) { switch (__i) { case 0: { @@ -410,8 +413,14 @@ void __lock_first(int __i, _L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) { } } +// We're using unique_lock to implement the functions, which thread annotations don't support. So we have to disable +// the analysis inside the function. template <class _L0, class _L1, class _L2, class... _L3> -inline _LIBCPP_HIDE_FROM_ABI void lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) { +_LIBCPP_NO_THREAD_SAFETY_ANALYSIS inline _LIBCPP_HIDE_FROM_ABI void lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) +# if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 2101 + _LIBCPP_ACQUIRE_CAPABILITY(__l0, __l1, __l2, __l3...) +# endif +{ std::__lock_first(0, __l0, __l1, __l2, __l3...); } diff --git a/libcxx/include/set b/libcxx/include/set index 5190fc1f406b..6470894517fd 100644 --- a/libcxx/include/set +++ b/libcxx/include/set @@ -732,28 +732,24 @@ public: } template <class... _Args> _LIBCPP_HIDE_FROM_ABI iterator emplace_hint(const_iterator __p, _Args&&... __args) { - return __tree_.__emplace_hint_unique(__p, std::forward<_Args>(__args)...); + return __tree_.__emplace_hint_unique(__p, std::forward<_Args>(__args)...).first; } # endif // _LIBCPP_CXX03_LANG _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> insert(const value_type& __v) { return __tree_.__emplace_unique(__v); } _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, const value_type& __v) { - return __tree_.__emplace_hint_unique(__p, __v); + return __tree_.__emplace_hint_unique(__p, __v).first; } template <class _InputIterator> - _LIBCPP_HIDE_FROM_ABI void insert(_InputIterator __f, _InputIterator __l) { - for (const_iterator __e = cend(); __f != __l; ++__f) - __tree_.__emplace_hint_unique(__e, *__f); + _LIBCPP_HIDE_FROM_ABI void insert(_InputIterator __first, _InputIterator __last) { + __tree_.__insert_range_unique(__first, __last); } # if _LIBCPP_STD_VER >= 23 template <_ContainerCompatibleRange<value_type> _Range> _LIBCPP_HIDE_FROM_ABI void insert_range(_Range&& __range) { - const_iterator __end = cend(); - for (auto&& __element : __range) { - __tree_.__emplace_hint_unique(__end, std::forward<decltype(__element)>(__element)); - } + __tree_.__insert_range_unique(ranges::begin(__range), ranges::end(__range)); } # endif @@ -763,7 +759,7 @@ public: } _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, value_type&& __v) { - return __tree_.__emplace_hint_unique(__p, std::move(__v)); + return __tree_.__emplace_hint_unique(__p, std::move(__v)).first; } _LIBCPP_HIDE_FROM_ABI void insert(initializer_list<value_type> __il) { insert(__il.begin(), __il.end()); } diff --git a/libcxx/include/string b/libcxx/include/string index 1d197654b9fe..0abdfebcb863 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -639,13 +639,12 @@ basic_string<char32_t> operator""s( const char32_t *str, size_t len ); # include <__type_traits/remove_cvref.h> # include <__type_traits/void_t.h> # include <__utility/auto_cast.h> -# include <__utility/declval.h> +# include <__utility/default_three_way_comparator.h> # include <__utility/forward.h> # include <__utility/is_pointer_in_range.h> # include <__utility/move.h> # include <__utility/scope_guard.h> # include <__utility/swap.h> -# include <__utility/unreachable.h> # include <climits> # include <cstdio> // EOF # include <cstring> @@ -966,7 +965,7 @@ private: std::__wrap_iter<const_pointer>(__get_pointer() + size())); # else return const_iterator(__p); -# endif // _LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING +# endif // _LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING } public: @@ -2258,7 +2257,7 @@ private: (void)__new_mid; # if _LIBCPP_INSTRUMENTED_WITH_ASAN # if defined(__APPLE__) - // TODO: remove after addressing issue #96099 (https://github.com/llvm/llvm-project/issues/96099) + // TODO: remove after addressing issue #96099 (https://llvm.org/PR96099) if (!__is_long()) return; # endif @@ -2522,6 +2521,19 @@ _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t) # endif # undef _LIBCPP_DECLARE +template <class _CharT, class _Traits, class _Alloc> +struct __default_three_way_comparator<basic_string<_CharT, _Traits, _Alloc>, basic_string<_CharT, _Traits, _Alloc> > { + using __string_t _LIBCPP_NODEBUG = basic_string<_CharT, _Traits, _Alloc>; + + _LIBCPP_HIDE_FROM_ABI static int operator()(const __string_t& __lhs, const __string_t& __rhs) { + auto __min_len = std::min(__lhs.size(), __rhs.size()); + auto __ret = _Traits::compare(__lhs.data(), __rhs.data(), __min_len); + if (__ret == 0) + return __lhs.size() == __rhs.size() ? 0 : __lhs.size() < __rhs.size() ? -1 : 1; + return __ret; + } +}; + # if _LIBCPP_STD_VER >= 17 template <class _InputIterator, class _CharT = __iter_value_type<_InputIterator>, diff --git a/libcxx/include/string_view b/libcxx/include/string_view index 9a20bb6f4a0b..983e5852015e 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -460,7 +460,7 @@ public: _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view substr(size_type __pos = 0, size_type __n = npos) const { // Use the `__assume_valid` form of the constructor to avoid an unnecessary check. Any substring of a view is a // valid view. In particular, `size()` is known to be smaller than `numeric_limits<difference_type>::max()`, so the - // new size is also smaller. See also https://github.com/llvm/llvm-project/issues/91634. + // new size is also smaller. See also https://llvm.org/PR91634. return __pos > size() ? (__throw_out_of_range("string_view::substr"), basic_string_view()) : basic_string_view(__assume_valid(), data() + __pos, std::min(__n, size() - __pos)); } diff --git a/libcxx/include/tuple b/libcxx/include/tuple index 8cc061c70b89..b0d0c38b115a 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -232,7 +232,6 @@ template <class... Types> # include <__memory/uses_allocator.h> # include <__tuple/find_index.h> # include <__tuple/ignore.h> -# include <__tuple/make_tuple_types.h> # include <__tuple/tuple_element.h> # include <__tuple/tuple_like.h> # include <__tuple/tuple_like_ext.h> @@ -324,12 +323,6 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Ret __tuple_compare_three_way(const _Tp& __x, c # endif // _LIBCPP_STD_VER >= 20 # if _LIBCPP_STD_VER >= 23 -template <class> -inline constexpr bool __is_tuple_v = false; - -template <class... _Tp> -inline constexpr bool __is_tuple_v<tuple<_Tp...>> = true; - template <class _Tp> concept __tuple_like_no_tuple = __tuple_like<_Tp> && !__is_tuple_v<_Tp>; @@ -540,11 +533,10 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES template <class _Tuple> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_impl(__from_tuple, _Tuple&& __t) noexcept( - (__all<is_nothrow_constructible< - _Tp, - typename tuple_element<_Indx, typename __make_tuple_types<_Tuple>::type>::type>::value...>::value)) + (__all<is_nothrow_constructible<_Tp, __copy_cvref_t<_Tuple, __tuple_element_t<_Indx, __remove_cvref_t<_Tuple>>>>:: + value...>::value)) : __tuple_leaf<_Indx, _Tp>( - std::forward<typename tuple_element<_Indx, typename __make_tuple_types<_Tuple>::type>::type>( + std::forward<__copy_cvref_t<_Tuple, __tuple_element_t<_Indx, __remove_cvref_t<_Tuple>>>>( std::get<_Indx>(__t)))... {} template <class _Alloc, class _Tuple> @@ -553,9 +545,9 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES : __tuple_leaf<_Indx, _Tp>( __uses_alloc_ctor<_Tp, _Alloc, - typename tuple_element<_Indx, typename __make_tuple_types<_Tuple>::type>::type>(), + __copy_cvref_t<_Tuple, __tuple_element_t<_Indx, __remove_cvref_t<_Tuple>>>>(), __a, - std::forward<typename tuple_element<_Indx, typename __make_tuple_types<_Tuple>::type>::type>( + std::forward<__copy_cvref_t<_Tuple, __tuple_element_t<_Indx, __remove_cvref_t<_Tuple>>>>( std::get<_Indx>(__t)))... {} __tuple_impl(const __tuple_impl&) = default; @@ -1278,47 +1270,37 @@ operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y) { // tuple_cat -template <class _Tp, class _Up> -struct __tuple_cat_type; +template <class... _Tuples> +struct __tuple_cat_return_impl; -template <class... _Ttypes, class... _Utypes> -struct __tuple_cat_type<tuple<_Ttypes...>, __tuple_types<_Utypes...> > { - using type _LIBCPP_NODEBUG = tuple<_Ttypes..., _Utypes...>; +template <class _Tuple> +struct __tuple_cat_return_impl<_Tuple> { + using type _LIBCPP_NODEBUG = _Tuple; }; -template <class _ResultTuple, bool _Is_Tuple0TupleLike, class... _Tuples> -struct __tuple_cat_return_1 {}; +template <class... _Types0, template <class...> class _Tuple, class... _Types1, class... _Tuples> +struct __tuple_cat_return_impl<tuple<_Types0...>, _Tuple<_Types1...>, _Tuples...> + : __tuple_cat_return_impl<tuple<_Types0..., _Types1...>, _Tuples...> {}; -template <class... _Types, class _Tuple0> -struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0> { - using type _LIBCPP_NODEBUG = - typename __tuple_cat_type< tuple<_Types...>, - typename __make_tuple_types<__remove_cvref_t<_Tuple0> >::type >::type; -}; +template <class, class, class> +struct __tuple_cat_array; -template <class... _Types, class _Tuple0, class _Tuple1, class... _Tuples> -struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0, _Tuple1, _Tuples...> - : public __tuple_cat_return_1< - typename __tuple_cat_type< tuple<_Types...>, - typename __make_tuple_types<__remove_cvref_t<_Tuple0> >::type >::type, - __tuple_like_ext<__libcpp_remove_reference_t<_Tuple1> >::value, - _Tuple1, - _Tuples...> {}; +template <class... _Types, class _ValueT, size_t... _Indices> +struct __tuple_cat_array<tuple<_Types...>, _ValueT, __index_sequence<_Indices...>> { + template <size_t> + using __value_type _LIBCPP_NODEBUG = _ValueT; -template <class... _Tuples> -struct __tuple_cat_return; + using type _LIBCPP_NODEBUG = tuple<_Types..., __value_type<_Indices>...>; +}; -template <class _Tuple0, class... _Tuples> -struct __tuple_cat_return<_Tuple0, _Tuples...> - : public __tuple_cat_return_1<tuple<>, - __tuple_like_ext<__libcpp_remove_reference_t<_Tuple0> >::value, - _Tuple0, - _Tuples...> {}; +template <class... _Types, class _ValueT, size_t _Np, class... _Tuples> +struct __tuple_cat_return_impl<tuple<_Types...>, array<_ValueT, _Np>, _Tuples...> + : __tuple_cat_return_impl<typename __tuple_cat_array<tuple<_Types...>, _ValueT, __make_index_sequence<_Np>>::type, + _Tuples...> {}; -template <> -struct __tuple_cat_return<> { - using type _LIBCPP_NODEBUG = tuple<>; -}; +template <class... _Tuples> +using __tuple_cat_return_t _LIBCPP_NODEBUG = + typename __tuple_cat_return_impl<tuple<>, __remove_cvref_t<_Tuples>...>::type; inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 tuple<> tuple_cat() { return tuple<>(); } @@ -1387,11 +1369,15 @@ __tuple_cat_select_element_wise(_TupleSrc&& __src, __index_sequence<_Indices...> return _TupleDst(std::get<_Indices>(std::forward<_TupleSrc>(__src))...); } -template <class _Tuple0, class... _Tuples> -inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __tuple_cat_return<_Tuple0, _Tuples...>::type +template <class _Tuple0, + class... _Tuples, + __enable_if_t< + _And<__tuple_like_ext<__remove_cvref_t<_Tuple0>>, __tuple_like_ext<__remove_cvref_t<_Tuples>>...>::value, + int> = 0> +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_cat_return_t<_Tuple0, _Tuples...> tuple_cat(_Tuple0&& __t0, _Tuples&&... __tpls) { using _T0 _LIBCPP_NODEBUG = __libcpp_remove_reference_t<_Tuple0>; - using _TRet _LIBCPP_NODEBUG = typename __tuple_cat_return<_Tuple0, _Tuples...>::type; + using _TRet _LIBCPP_NODEBUG = __tuple_cat_return_t<_Tuple0, _Tuples...>; using _T0Indices _LIBCPP_NODEBUG = __make_index_sequence<tuple_size<_T0>::value>; using _TRetIndices _LIBCPP_NODEBUG = __make_index_sequence<tuple_size<_TRet>::value>; return std::__tuple_cat_select_element_wise<_TRet>( diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index a93495367496..a38e5e0f1b94 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -844,8 +844,8 @@ class __hash_map_iterator { public: typedef forward_iterator_tag iterator_category; - using value_type = typename _HashIterator::value_type; - typedef typename _NodeTypes::difference_type difference_type; + using value_type = typename _HashIterator::value_type; + using difference_type = ptrdiff_t; typedef value_type& reference; using pointer = typename _HashIterator::pointer; @@ -895,8 +895,8 @@ class __hash_map_const_iterator { public: typedef forward_iterator_tag iterator_category; - using value_type = typename _HashIterator::value_type; - typedef typename _NodeTypes::difference_type difference_type; + using value_type = typename _HashIterator::value_type; + using difference_type = ptrdiff_t; typedef const value_type& reference; using pointer = typename _HashIterator::pointer; @@ -972,9 +972,6 @@ private: __table __table_; - typedef typename __table::_NodeTypes _NodeTypes; - typedef typename __table::__node_pointer __node_pointer; - typedef typename __table::__node_const_pointer __node_const_pointer; typedef typename __table::__node_traits __node_traits; typedef typename __table::__node_allocator __node_allocator; typedef typename __table::__node __node; @@ -1172,14 +1169,13 @@ public: # if _LIBCPP_STD_VER >= 17 template <class... _Args> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args) { - return __table_.__emplace_unique_key_args( - __k, piecewise_construct, std::forward_as_tuple(__k), std::forward_as_tuple(std::forward<_Args>(__args)...)); + return __table_.__emplace_unique( + piecewise_construct, std::forward_as_tuple(__k), std::forward_as_tuple(std::forward<_Args>(__args)...)); } template <class... _Args> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args) { - return __table_.__emplace_unique_key_args( - __k, + return __table_.__emplace_unique( piecewise_construct, std::forward_as_tuple(std::move(__k)), std::forward_as_tuple(std::forward<_Args>(__args)...)); @@ -1197,7 +1193,7 @@ public: template <class _Vp> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> insert_or_assign(const key_type& __k, _Vp&& __v) { - pair<iterator, bool> __res = __table_.__emplace_unique_key_args(__k, __k, std::forward<_Vp>(__v)); + pair<iterator, bool> __res = __table_.__emplace_unique(__k, std::forward<_Vp>(__v)); if (!__res.second) { __res.first->second = std::forward<_Vp>(__v); } @@ -1206,7 +1202,7 @@ public: template <class _Vp> _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> insert_or_assign(key_type&& __k, _Vp&& __v) { - pair<iterator, bool> __res = __table_.__emplace_unique_key_args(__k, std::move(__k), std::forward<_Vp>(__v)); + pair<iterator, bool> __res = __table_.__emplace_unique(std::move(__k), std::forward<_Vp>(__v)); if (!__res.second) { __res.first->second = std::forward<_Vp>(__v); } @@ -1612,16 +1608,13 @@ inline void unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterato template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> _Tp& unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k) { - return __table_ - .__emplace_unique_key_args(__k, piecewise_construct, std::forward_as_tuple(__k), std::forward_as_tuple()) + return __table_.__emplace_unique(piecewise_construct, std::forward_as_tuple(__k), std::forward_as_tuple()) .first->second; } template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> _Tp& unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k) { - return __table_ - .__emplace_unique_key_args( - __k, piecewise_construct, std::forward_as_tuple(std::move(__k)), std::forward_as_tuple()) + return __table_.__emplace_unique(piecewise_construct, std::forward_as_tuple(std::move(__k)), std::forward_as_tuple()) .first->second; } # else // _LIBCPP_CXX03_LANG @@ -1747,12 +1740,8 @@ private: __table __table_; - typedef typename __table::_NodeTypes _NodeTypes; typedef typename __table::__node_traits __node_traits; - typedef typename __table::__node_allocator __node_allocator; typedef typename __table::__node __node; - typedef __hash_map_node_destructor<__node_allocator> _Dp; - typedef unique_ptr<__node, _Dp> __node_holder; typedef allocator_traits<allocator_type> __alloc_traits; static_assert(is_same<typename __node_traits::size_type, typename __alloc_traits::size_type>::value, "Allocator uses different size_type for different types"); diff --git a/libcxx/lib/abi/CMakeLists.txt b/libcxx/lib/abi/CMakeLists.txt index 7c08bd06c50b..8f277aad2dcd 100644 --- a/libcxx/lib/abi/CMakeLists.txt +++ b/libcxx/lib/abi/CMakeLists.txt @@ -16,6 +16,9 @@ function(cxx_abi_list_identifier result triple abi_library abi_version unstable elseif("${triple}" MATCHES "freebsd") # Ignore the major and minor versions of freebsd targets. string(REGEX REPLACE "freebsd[0-9]+\\.[0-9]+" "freebsd" triple "${triple}") + elseif("${triple}" MATCHES "aix") + # Ignore the V.R.M.F version string of aix targets. + string(REGEX REPLACE "aix[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+" "aix" triple "${triple}") endif() list(APPEND abi_properties "${triple}") list(APPEND abi_properties "${abi_library}") diff --git a/libcxx/src/algorithm.cpp b/libcxx/src/algorithm.cpp index d388fee5f99c..8157be6f7406 100644 --- a/libcxx/src/algorithm.cpp +++ b/libcxx/src/algorithm.cpp @@ -13,6 +13,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class Comp, class RandomAccessIterator> void __sort(RandomAccessIterator first, RandomAccessIterator last, Comp comp) { + if (first == last) // log(0) is undefined, so don't try computing the depth + return; + auto depth_limit = 2 * std::__bit_log2(static_cast<size_t>(last - first)); // Only use bitset partitioning for arithmetic types. We should also check diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index 903084da053a..b214ba1fd11c 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -152,7 +152,7 @@ static void __libcpp_contention_wait(__cxx_atomic_contention_t volatile* __conte __cxx_atomic_contention_t const volatile* __platform_state, __cxx_contention_t __old_value) { __cxx_atomic_fetch_add(__contention_state, __cxx_contention_t(1), memory_order_relaxed); - // https://github.com/llvm/llvm-project/issues/109290 + // https://llvm.org/PR109290 // There are no platform guarantees of a memory barrier in the platform wait implementation __cxx_atomic_thread_fence(memory_order_seq_cst); // We sleep as long as the monitored value hasn't changed. diff --git a/libcxx/src/experimental/tzdb.cpp b/libcxx/src/experimental/tzdb.cpp index ac5c62bb8190..9e3aae32a01a 100644 --- a/libcxx/src/experimental/tzdb.cpp +++ b/libcxx/src/experimental/tzdb.cpp @@ -766,7 +766,7 @@ void __init_tzdb(tzdb& __tzdb, __tz::__rules_storage_type& __rules) { // On Linux systems it seems /etc/timezone is deprecated and being phased out. // This file is used when /etc/localtime does not exist, or when it exists but // is not a symlink. For more information and links see - // https://github.com/llvm/llvm-project/issues/105634 + // https://llvm.org/PR105634 string __name = chrono::__current_zone_environment(); diff --git a/libcxx/test/benchmarks/containers/associative/associative_container_benchmarks.h b/libcxx/test/benchmarks/containers/associative/associative_container_benchmarks.h index 535a52f0a08a..b39569812640 100644 --- a/libcxx/test/benchmarks/containers/associative/associative_container_benchmarks.h +++ b/libcxx/test/benchmarks/containers/associative/associative_container_benchmarks.h @@ -259,6 +259,49 @@ void associative_container_benchmarks(std::string container) { } }); + if constexpr (is_map_like && !is_multi_key_container) { + bench("insert_or_assign(key, value) (already present)", [=](auto& st) { + const std::size_t size = st.range(0) ? st.range(0) : 1; + std::vector<Value> in = make_value_types(generate_unique_keys(size)); + Value to_insert = in[in.size() / 2]; // pick any existing value + std::vector<Container> c(BatchSize, Container(in.begin(), in.end())); + typename Container::iterator inserted[BatchSize]; + + while (st.KeepRunningBatch(BatchSize)) { + for (std::size_t i = 0; i != BatchSize; ++i) { + inserted[i] = + adapt_operations<Container>::get_iterator(c[i].insert_or_assign(to_insert.first, to_insert.second)); + benchmark::DoNotOptimize(inserted[i]); + benchmark::DoNotOptimize(c[i]); + benchmark::ClobberMemory(); + } + } + }); + + bench("insert_or_assign(key, value) (new value)", [=](auto& st) { + const std::size_t size = st.range(0); + std::vector<Value> in = make_value_types(generate_unique_keys(size + 1)); + Value to_insert = in.back(); + in.pop_back(); + std::vector<Container> c(BatchSize, Container(in.begin(), in.end())); + + while (st.KeepRunningBatch(BatchSize)) { + for (std::size_t i = 0; i != BatchSize; ++i) { + auto result = c[i].insert_or_assign(to_insert.first, to_insert.second); + benchmark::DoNotOptimize(result); + benchmark::DoNotOptimize(c[i]); + benchmark::ClobberMemory(); + } + + st.PauseTiming(); + for (std::size_t i = 0; i != BatchSize; ++i) { + c[i].erase(get_key(to_insert)); + } + st.ResumeTiming(); + } + }); + } + // The insert(hint, ...) methods are only relevant for ordered containers, and we lack // a good way to compute a hint for unordered ones. if constexpr (is_ordered_container) { diff --git a/libcxx/test/benchmarks/spec.gen.py b/libcxx/test/benchmarks/spec.gen.py new file mode 100644 index 000000000000..b4b31d4e3687 --- /dev/null +++ b/libcxx/test/benchmarks/spec.gen.py @@ -0,0 +1,78 @@ +# ===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ===----------------------------------------------------------------------===## + +# REQUIRES: enable-spec-benchmarks + +# RUN: mkdir -p %T +# RUN: echo "%{cxx}" > %T/cxx.subs +# RUN: echo "%{compile_flags}" > %T/compile_flags.subs +# RUN: echo "%{flags}" > %T/flags.subs +# RUN: echo "%{link_flags}" > %T/link_flags.subs +# RUN: echo "%{spec_dir}" > %T/spec_dir.subs +# RUN: %{python} %s %T +# END. + +import json +import pathlib +import sys + +test_dir = pathlib.Path(sys.argv[1]) +cxx = (test_dir / 'cxx.subs').open().read().strip() +compile_flags = (test_dir / 'compile_flags.subs').open().read().strip() +flags = (test_dir / 'flags.subs').open().read().strip() +link_flags = (test_dir / 'link_flags.subs').open().read().strip() +spec_dir = pathlib.Path((test_dir / 'spec_dir.subs').open().read().strip()) + +# Setup the configuration file +test_dir.mkdir(parents=True, exist_ok=True) +spec_config = test_dir / 'spec-config.cfg' +spec_config.write_text(f""" +default: + ignore_errors = 1 + iterations = 1 + label = spec-stdlib + log_line_width = 4096 + makeflags = --jobs=8 + mean_anyway = 1 + output_format = csv + preenv = 0 + reportable = 0 + tune = base + copies = 1 + threads = 1 + CC = cc -O3 + CXX = {cxx} {compile_flags} {flags} {link_flags} -Wno-error + CC_VERSION_OPTION = --version + CXX_VERSION_OPTION = --version + EXTRA_PORTABILITY = -DSPEC_NO_CXX17_SPECIAL_MATH_FUNCTIONS # because libc++ doesn't implement the special math functions yet +""") + +# Build the list of benchmarks. We take all intrate and fprate benchmarks that contain C++ and +# discard the ones that contain Fortran, since this test suite isn't set up to build Fortran code. +spec_benchmarks = set() +no_fortran = set() +with open(spec_dir / 'benchspec' / 'CPU' / 'intrate_any_cpp.bset', 'r') as f: + spec_benchmarks.update(json.load(f)['benchmarks']) +with open(spec_dir / 'benchspec' / 'CPU' / 'fprate_any_cpp.bset', 'r') as f: + spec_benchmarks.update(json.load(f)['benchmarks']) +with open(spec_dir / 'benchspec' / 'CPU' / 'no_fortran.bset', 'r') as f: + no_fortran.update(json.load(f)['benchmarks']) +spec_benchmarks &= no_fortran + +for benchmark in spec_benchmarks: + print(f'#--- {benchmark}.sh.test') + print(f'RUN: rm -rf %T') # clean up any previous (potentially incomplete) run + print(f'RUN: mkdir %T') + print(f'RUN: cp {spec_config} %T/spec-config.cfg') + print(f'RUN: %{{spec_dir}}/bin/runcpu --config %T/spec-config.cfg --size train --output-root %T --rebuild {benchmark}') + print(f'RUN: rm -rf %T/benchspec') # remove the temporary directory, which can become quite large + + # Parse the results into a LNT-compatible format. This also errors out if there are no CSV files, which + # means that the benchmark didn't run properly (the `runcpu` command above never reports a failure). + print(f'RUN: %{{libcxx-dir}}/utils/parse-spec-results %T/result/*.train.csv --output-format=lnt > %T/results.lnt') + print(f'RUN: cat %T/results.lnt') diff --git a/libcxx/test/benchmarks/streams/ofstream.bench.cpp b/libcxx/test/benchmarks/streams/ofstream.bench.cpp new file mode 100644 index 000000000000..60606a9d67e2 --- /dev/null +++ b/libcxx/test/benchmarks/streams/ofstream.bench.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <fstream> +#include <vector> + +#include <benchmark/benchmark.h> + +static void bm_write(benchmark::State& state) { + std::vector<char> buffer; + buffer.resize(16384); + + std::ofstream stream("/dev/null"); + + for (auto _ : state) + stream.write(buffer.data(), buffer.size()); +} +BENCHMARK(bm_write); + +BENCHMARK_MAIN(); diff --git a/libcxx/test/extensions/clang/clang_modules_include.gen.py b/libcxx/test/extensions/clang/clang_modules_include.gen.py index 379ac22c8f47..28661049d6e8 100644 --- a/libcxx/test/extensions/clang/clang_modules_include.gen.py +++ b/libcxx/test/extensions/clang/clang_modules_include.gen.py @@ -10,9 +10,32 @@ # This is important notably because the LLDB data formatters use # libc++ headers with modules enabled. -# RUN: %{python} %s %{libcxx-dir}/utils +# Older macOS SDKs were not properly modularized, which causes issues with localization. +# This feature should instead be based on the SDK version. +# UNSUPPORTED: stdlib=system && target={{.+}}-apple-macosx13{{.*}} + +# GCC doesn't support -fcxx-modules +# UNSUPPORTED: gcc + +# The Windows headers don't appear to be compatible with modules +# UNSUPPORTED: windows +# UNSUPPORTED: buildhost=windows + +# The Android headers don't appear to be compatible with modules yet +# UNSUPPORTED: LIBCXX-ANDROID-FIXME + +# TODO: Investigate this failure +# UNSUPPORTED: LIBCXX-FREEBSD-FIXME + +# TODO: Investigate why this doesn't work on Picolibc once the locale base API is refactored +# UNSUPPORTED: LIBCXX-PICOLIBC-FIXME + +# TODO: Fix seemingly circular inclusion or <wchar.h> on AIX +# UNSUPPORTED: LIBCXX-AIX-FIXME -# block Lit from interpreting a RUN/XFAIL/etc inside the generation script +# UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME + +# RUN: %{python} %s %{libcxx-dir}/utils # END. import sys @@ -29,31 +52,6 @@ for header in public_headers: //--- {header}.compile.pass.cpp // RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -// Older macOS SDKs were not properly modularized, which causes issues with localization. -// This feature should instead be based on the SDK version. -// UNSUPPORTED: stdlib=system && target={{{{.+}}}}-apple-macosx13{{{{.*}}}} - -// GCC doesn't support -fcxx-modules -// UNSUPPORTED: gcc - -// The Windows headers don't appear to be compatible with modules -// UNSUPPORTED: windows -// UNSUPPORTED: buildhost=windows - -// The Android headers don't appear to be compatible with modules yet -// UNSUPPORTED: LIBCXX-ANDROID-FIXME - -// TODO: Investigate this failure -// UNSUPPORTED: LIBCXX-FREEBSD-FIXME - -// TODO: Investigate why this doesn't work on Picolibc once the locale base API is refactored -// UNSUPPORTED: LIBCXX-PICOLIBC-FIXME - -// TODO: Fix seemingly circular inclusion or <wchar.h> on AIX -// UNSUPPORTED: LIBCXX-AIX-FIXME - -// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME - {lit_header_restrictions.get(header, '')} {lit_header_undeprecations.get(header, '')} @@ -68,30 +66,6 @@ print( // REQUIRES: clang-modules-build -// Older macOS SDKs were not properly modularized, which causes issues with localization. -// This feature should instead be based on the SDK version. -// UNSUPPORTED: stdlib=system && target={{{{.+}}}}-apple-macosx13{{{{.*}}}} - -// GCC doesn't support -fcxx-modules -// UNSUPPORTED: gcc - -// The Windows headers don't appear to be compatible with modules -// UNSUPPORTED: windows -// UNSUPPORTED: buildhost=windows - -// The Android headers don't appear to be compatible with modules yet -// UNSUPPORTED: LIBCXX-ANDROID-FIXME - -// TODO: Investigate this failure -// UNSUPPORTED: LIBCXX-FREEBSD-FIXME - -// TODO: Investigate why this doesn't work on Picolibc once the locale base API is refactored -// UNSUPPORTED: LIBCXX-PICOLIBC-FIXME - -// TODO: Fix seemingly circular inclusion or <wchar.h> on AIX -// UNSUPPORTED: LIBCXX-AIX-FIXME - @import std; - """ ) diff --git a/libcxx/test/extensions/clang/thread/thread.mutex/lock.verify.cpp b/libcxx/test/extensions/clang/thread/thread.mutex/lock.verify.cpp new file mode 100644 index 000000000000..51ffa6962ac8 --- /dev/null +++ b/libcxx/test/extensions/clang/thread/thread.mutex/lock.verify.cpp @@ -0,0 +1,47 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: no-threads + +// <mutex> + +// GCC doesn't have thread safety attributes +// UNSUPPORTED: gcc + +// ADDITIONAL_COMPILE_FLAGS: -Wthread-safety -Wno-comment + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +#include <mutex> + +#include "test_macros.h" + +std::mutex m0; +std::mutex m1; +std::mutex m2; +std::mutex m3; + +void f1() { + std::lock(m0, m1); +} // expected-warning {{mutex 'm0' is still held at the end of function}} \ + expected-warning {{mutex 'm1' is still held at the end of function}} + +#if TEST_STD_VER >= 11 && defined(TEST_CLANG_VER) && TEST_CLANG_VER >= 2101 +void f2() { + std::lock(m0, m1, m2); +} // expected-warning {{mutex 'm0' is still held at the end of function}} \ + expected-warning {{mutex 'm1' is still held at the end of function}} \ + expected-warning {{mutex 'm2' is still held at the end of function}} + +void f3() { + std::lock(m0, m1, m2, m3); +} // expected-warning {{mutex 'm0' is still held at the end of function}} \ + expected-warning {{mutex 'm1' is still held at the end of function}} \ + expected-warning {{mutex 'm2' is still held at the end of function}} \ + expected-warning {{mutex 'm3' is still held at the end of function}} +#endif diff --git a/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp b/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp index f756aacbc1cd..33b55c4bb195 100644 --- a/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp +++ b/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp @@ -10,14 +10,10 @@ // that we don't want to support and can't support with LSV enabled. // UNSUPPORTED: clang-modules-build -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // Sometimes C++'s <foo.h> headers get included within extern "C" contexts. This // is ill-formed (no diagnostic required), per [using.headers]p3, but we permit // it as an extension. -#include <__config> - extern "C" { #include <assert.h> // complex.h is not supported in extern "C". diff --git a/libcxx/test/extensions/posix/xopen_source.gen.py b/libcxx/test/extensions/posix/xopen_source.gen.py index d4a3651181ca..ec0d981d67b2 100644 --- a/libcxx/test/extensions/posix/xopen_source.gen.py +++ b/libcxx/test/extensions/posix/xopen_source.gen.py @@ -10,7 +10,19 @@ # We may not want to guarantee this forever, but since this works today and # it's something that users rely on, it makes sense to put a test on it. # -# https://github.com/llvm/llvm-project/issues/117630 +# https://llvm.org/PR117630 + +# Some parts of the code like <fstream> use non-standard functions in their implementation, +# and these functions are not provided when _XOPEN_SOURCE is set to older values. This +# breaks when building with modules even when we don't use the offending headers directly. +# UNSUPPORTED: clang-modules-build + +# The AIX localization support uses some functions as part of their headers that require a +# recent value of _XOPEN_SOURCE. +# UNSUPPORTED: LIBCXX-AIX-FIXME + +# This test fails on FreeBSD for an unknown reason. +# UNSUPPORTED: LIBCXX-FREEBSD-FIXME # RUN: %{python} %s %{libcxx-dir}/utils # END. @@ -33,19 +45,6 @@ for header in public_headers: print( f"""\ //--- {header}.xopen_source_{version}.compile.pass.cpp - -// Some parts of the code like <fstream> use non-standard functions in their implementation, -// and these functions are not provided when _XOPEN_SOURCE is set to older values. This -// breaks when building with modules even when we don't use the offending headers directly. -// UNSUPPORTED: clang-modules-build - -// The AIX localization support uses some functions as part of their headers that require a -// recent value of _XOPEN_SOURCE. -// UNSUPPORTED: LIBCXX-AIX-FIXME - -// This test fails on FreeBSD for an unknown reason. -// UNSUPPORTED: LIBCXX-FREEBSD-FIXME - {lit_header_restrictions.get(header, '')} {lit_header_undeprecations.get(header, '')} diff --git a/libcxx/test/libcxx-03/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp b/libcxx/test/libcxx-03/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp new file mode 100644 index 000000000000..4e51014f20b1 --- /dev/null +++ b/libcxx/test/libcxx-03/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp @@ -0,0 +1,51 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <algorithm> + +// template <class RandomAccessIterator> +// void +// random_shuffle(RandomAccessIterator first, RandomAccessIterator last); +// +// template <class RandomAccessIterator, class RandomNumberGenerator> +// void +// random_shuffle(RandomAccessIterator first, RandomAccessIterator last, +// RandomNumberGenerator& rand); + +// +// In C++17, random_shuffle has been removed. +// However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE +// is defined before including <algorithm>, then random_shuffle will be restored. + +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + +#include <algorithm> +#include <cstddef> +#include <vector> + +#include "test_macros.h" + +struct gen +{ + std::ptrdiff_t operator()(std::ptrdiff_t n) + { + return n-1; + } +}; + + +int main(int, char**) +{ + std::vector<int> v; + std::random_shuffle(v.begin(), v.end()); + gen r; + std::random_shuffle(v.begin(), v.end(), r); + + return 0; +} diff --git a/libcxx/test/libcxx-03/algorithms/bad_iterator_traits.verify.cpp b/libcxx/test/libcxx-03/algorithms/bad_iterator_traits.verify.cpp new file mode 100644 index 000000000000..a0b5b88bb9f0 --- /dev/null +++ b/libcxx/test/libcxx-03/algorithms/bad_iterator_traits.verify.cpp @@ -0,0 +1,61 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// std::sort + +#include <algorithm> +#include <iterator> +#include <type_traits> +#include <utility> + +struct BadIter { + struct Value { + friend bool operator==(const Value& x, const Value& y); + friend bool operator!=(const Value& x, const Value& y); + friend bool operator< (const Value& x, const Value& y); + friend bool operator<=(const Value& x, const Value& y); + friend bool operator> (const Value& x, const Value& y); + friend bool operator>=(const Value& x, const Value& y); + friend void swap(Value, Value); + }; + + using iterator_category = std::random_access_iterator_tag; + using value_type = Value; + using reference = Value&; + using difference_type = long; + using pointer = Value*; + + Value operator*() const; // Not `Value&`. + reference operator[](difference_type n) const; + + BadIter& operator++(); + BadIter& operator--(); + BadIter operator++(int); + BadIter operator--(int); + + BadIter& operator+=(difference_type n); + BadIter& operator-=(difference_type n); + friend BadIter operator+(BadIter x, difference_type n); + friend BadIter operator+(difference_type n, BadIter x); + friend BadIter operator-(BadIter x, difference_type n); + friend difference_type operator-(BadIter x, BadIter y); + + friend bool operator==(const BadIter& x, const BadIter& y); + friend bool operator!=(const BadIter& x, const BadIter& y); + friend bool operator< (const BadIter& x, const BadIter& y); + friend bool operator<=(const BadIter& x, const BadIter& y); + friend bool operator> (const BadIter& x, const BadIter& y); + friend bool operator>=(const BadIter& x, const BadIter& y); +}; + +// Verify that iterators with incorrect `iterator_traits` are rejected. This protects against potential undefined +// behavior when these iterators are passed to standard algorithms. +void test() { + std::sort(BadIter(), BadIter()); + //expected-error-re@*:* {{static assertion failed {{.*}}It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of dereferencing the iterator}} +} diff --git a/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp b/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp new file mode 100644 index 000000000000..292fcf356554 --- /dev/null +++ b/libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp @@ -0,0 +1,57 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <algorithm> + +// __half_positive divides an integer number by 2 as unsigned number for known types. +// It can be an important optimization for lower bound, for example. + +#include <__cxx03/__algorithm/half_positive.h> +#include <cassert> +#include <cstddef> +#include <limits> + +#include "test_macros.h" +#include "user_defined_integral.h" + +namespace { + +template <class IntType, class UnderlyingType = IntType> +TEST_CONSTEXPR bool test(IntType max_v = IntType(std::numeric_limits<UnderlyingType>::max())) { + return std::__half_positive(max_v) == max_v / 2; +} + +} // namespace + +int main(int, char**) +{ + { + assert(test<char>()); + assert(test<int>()); + assert(test<long>()); + assert((test<UserDefinedIntegral<int>, int>())); + assert(test<std::size_t>()); +#if !defined(TEST_HAS_NO_INT128) + assert(test<__int128_t>()); +#endif // !defined(TEST_HAS_NO_INT128) + } + +#if TEST_STD_VER >= 11 + { + static_assert(test<char>(), ""); + static_assert(test<int>(), ""); + static_assert(test<long>(), ""); + static_assert(test<std::size_t>(), ""); +#if !defined(TEST_HAS_NO_INT128) + static_assert(test<__int128_t>(), ""); +#endif // !defined(TEST_HAS_NO_INT128) + } +#endif // TEST_STD_VER >= 11 + + return 0; +} diff --git a/libcxx/test/libcxx-03/algorithms/pstl.libdispatch.chunk_partitions.pass.cpp b/libcxx/test/libcxx-03/algorithms/pstl.libdispatch.chunk_partitions.pass.cpp new file mode 100644 index 000000000000..b48ac02dd79c --- /dev/null +++ b/libcxx/test/libcxx-03/algorithms/pstl.libdispatch.chunk_partitions.pass.cpp @@ -0,0 +1,41 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <algorithm> + +// REQUIRES: libcpp-pstl-backend-libdispatch + +// __chunk_partitions __partition_chunks(ptrdiff_t); + +#include <__pstl/backends/libdispatch.h> +#include <cassert> +#include <cstddef> + +int main(int, char**) { + { + auto chunks = std::__pstl::__libdispatch::__partition_chunks(0); + assert(chunks.__chunk_count_ == 1); + assert(chunks.__first_chunk_size_ == 0); + assert(chunks.__chunk_size_ == 0); + } + + { + auto chunks = std::__pstl::__libdispatch::__partition_chunks(1); + assert(chunks.__chunk_count_ == 1); + assert(chunks.__first_chunk_size_ == 1); + assert(chunks.__chunk_size_ == 1); + } + + for (std::ptrdiff_t i = 2; i != 2ll << 20; ++i) { + auto chunks = std::__pstl::__libdispatch::__partition_chunks(i); + assert(chunks.__chunk_count_ >= 1); + assert(chunks.__chunk_count_ <= i); + assert((chunks.__chunk_count_ - 1) * chunks.__chunk_size_ + chunks.__first_chunk_size_ == i); + } + return 0; +} diff --git a/libcxx/test/libcxx-03/algorithms/robust_against_copying_comparators.pass.cpp b/libcxx/test/libcxx-03/algorithms/robust_against_copying_comparators.pass.cpp new file mode 100644 index 000000000000..256251686bb3 --- /dev/null +++ b/libcxx/test/libcxx-03/algorithms/robust_against_copying_comparators.pass.cpp @@ -0,0 +1,323 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <algorithm> + +#include <algorithm> +#include <cassert> +#include <compare> +#include <cstddef> +#include <deque> +#include <ranges> +#include <type_traits> +#include <vector> + +#include "test_macros.h" + +template <class T> +struct Less { + int* copies_; + TEST_CONSTEXPR explicit Less(int* copies) : copies_(copies) {} + TEST_CONSTEXPR_CXX14 Less(const Less& rhs) : copies_(rhs.copies_) { *copies_ += 1; } + TEST_CONSTEXPR_CXX14 Less& operator=(const Less&) = default; + TEST_CONSTEXPR bool operator()(T, T) const { return false; } +}; + +template <class T> +struct Equal { + int* copies_; + TEST_CONSTEXPR explicit Equal(int* copies) : copies_(copies) {} + TEST_CONSTEXPR_CXX14 Equal(const Equal& rhs) : copies_(rhs.copies_) { *copies_ += 1; } + TEST_CONSTEXPR_CXX14 Equal& operator=(const Equal&) = default; + TEST_CONSTEXPR bool operator()(T, T) const { return true; } +}; + +template <class T> +struct UnaryVoid { + int* copies_; + TEST_CONSTEXPR explicit UnaryVoid(int* copies) : copies_(copies) {} + TEST_CONSTEXPR_CXX14 UnaryVoid(const UnaryVoid& rhs) : copies_(rhs.copies_) { *copies_ += 1; } + TEST_CONSTEXPR_CXX14 UnaryVoid& operator=(const UnaryVoid&) = default; + TEST_CONSTEXPR_CXX14 void operator()(T) const {} +}; + +template <class T> +struct UnaryTrue { + int* copies_; + TEST_CONSTEXPR explicit UnaryTrue(int* copies) : copies_(copies) {} + TEST_CONSTEXPR_CXX14 UnaryTrue(const UnaryTrue& rhs) : copies_(rhs.copies_) { *copies_ += 1; } + TEST_CONSTEXPR_CXX14 UnaryTrue& operator=(const UnaryTrue&) = default; + TEST_CONSTEXPR bool operator()(T) const { return true; } +}; + +template <class T> +struct NullaryValue { + int* copies_; + TEST_CONSTEXPR explicit NullaryValue(int* copies) : copies_(copies) {} + TEST_CONSTEXPR_CXX14 NullaryValue(const NullaryValue& rhs) : copies_(rhs.copies_) { *copies_ += 1; } + TEST_CONSTEXPR_CXX14 NullaryValue& operator=(const NullaryValue&) = default; + TEST_CONSTEXPR T operator()() const { return 0; } +}; + +template <class T> +struct UnaryTransform { + int* copies_; + TEST_CONSTEXPR explicit UnaryTransform(int* copies) : copies_(copies) {} + TEST_CONSTEXPR_CXX14 UnaryTransform(const UnaryTransform& rhs) : copies_(rhs.copies_) { *copies_ += 1; } + TEST_CONSTEXPR_CXX14 UnaryTransform& operator=(const UnaryTransform&) = default; + TEST_CONSTEXPR T operator()(T) const { return 0; } +}; + +template <class T> +struct BinaryTransform { + int* copies_; + TEST_CONSTEXPR explicit BinaryTransform(int* copies) : copies_(copies) {} + TEST_CONSTEXPR_CXX14 BinaryTransform(const BinaryTransform& rhs) : copies_(rhs.copies_) { *copies_ += 1; } + TEST_CONSTEXPR_CXX14 BinaryTransform& operator=(const BinaryTransform&) = default; + TEST_CONSTEXPR T operator()(T, T) const { return 0; } +}; + +#if TEST_STD_VER > 17 +template <class T> +struct ThreeWay { + int* copies_; + constexpr explicit ThreeWay(int* copies) : copies_(copies) {} + constexpr ThreeWay(const ThreeWay& rhs) : copies_(rhs.copies_) { *copies_ += 1; } + constexpr ThreeWay& operator=(const ThreeWay&) = default; + constexpr std::strong_ordering operator()(T, T) const { return std::strong_ordering::equal; } +}; +#endif + +template <class T> +TEST_CONSTEXPR_CXX20 bool all_the_algorithms() { + T a[10] = {}; + T b[10] = {}; + T* first = a; + T* mid = a + 5; + T* last = a + 10; + T* first2 = b; + T* mid2 = b + 5; + T* last2 = b + 10; + T value = 0; + int count = 1; + + int copies = 0; + (void)std::adjacent_find(first, last, Equal<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER >= 11 + (void)std::all_of(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::any_of(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); +#endif + (void)std::binary_search(first, last, value, Less<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER > 17 + (void)std::clamp(value, value, value, Less<T>(&copies)); + assert(copies == 0); +#endif + (void)std::count_if(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::copy_if(first, last, first2, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::equal(first, last, first2, Equal<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER > 11 + (void)std::equal(first, last, first2, last2, Equal<T>(&copies)); + assert(copies == 0); +#endif + (void)std::equal_range(first, last, value, Less<T>(&copies)); + assert(copies == 0); + (void)std::find_end(first, last, first2, mid2, Equal<T>(&copies)); + assert(copies == 0); + (void)std::find_first_of(first, last, first2, last2, Equal<T>(&copies)); + assert(copies == 0); + (void)std::find_if(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::find_if_not(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::for_each(first, last, UnaryVoid<T>(&copies)); + assert(copies == 1); + copies = 0; +#if TEST_STD_VER > 14 + (void)std::for_each_n(first, count, UnaryVoid<T>(&copies)); + assert(copies == 0); +#endif + (void)std::generate(first, last, NullaryValue<T>(&copies)); + assert(copies == 0); + (void)std::generate_n(first, count, NullaryValue<T>(&copies)); + assert(copies == 0); + (void)std::includes(first, last, first2, last2, Less<T>(&copies)); + assert(copies == 0); + (void)std::is_heap(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::is_heap_until(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::is_partitioned(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::is_permutation(first, last, first2, Equal<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER > 11 + (void)std::is_permutation(first, last, first2, last2, Equal<T>(&copies)); + assert(copies == 0); +#endif + (void)std::is_sorted(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::is_sorted_until(first, last, Less<T>(&copies)); + assert(copies == 0); + if (!TEST_IS_CONSTANT_EVALUATED) { + (void)std::inplace_merge(first, mid, last, Less<T>(&copies)); + assert(copies == 0); + } + (void)std::lexicographical_compare(first, last, first2, last2, Less<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER > 17 + (void)std::lexicographical_compare_three_way(first, last, first2, last2, ThreeWay<T>(&copies)); + assert(copies == 0); +#endif + (void)std::lower_bound(first, last, value, Less<T>(&copies)); + assert(copies == 0); + (void)std::make_heap(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::max(value, value, Less<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER >= 11 + (void)std::max({value, value}, Less<T>(&copies)); + assert(copies == 0); +#endif + (void)std::max_element(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::merge(first, mid, mid, last, first2, Less<T>(&copies)); + assert(copies == 0); + (void)std::min(value, value, Less<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER >= 11 + (void)std::min({value, value}, Less<T>(&copies)); + assert(copies == 0); +#endif + (void)std::min_element(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::minmax(value, value, Less<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER >= 11 + (void)std::minmax({value, value}, Less<T>(&copies)); + assert(copies == 0); +#endif + (void)std::minmax_element(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::mismatch(first, last, first2, Equal<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER > 11 + (void)std::mismatch(first, last, first2, last2, Equal<T>(&copies)); + assert(copies == 0); +#endif + (void)std::next_permutation(first, last, Less<T>(&copies)); + assert(copies == 0); +#if TEST_STD_VER >= 11 + (void)std::none_of(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); +#endif + (void)std::nth_element(first, mid, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::partial_sort(first, mid, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::partial_sort_copy(first, last, first2, mid2, Less<T>(&copies)); + assert(copies == 0); + (void)std::partition(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::partition_copy(first, last, first2, last2, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::partition_point(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::pop_heap(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::prev_permutation(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::push_heap(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::remove_copy_if(first, last, first2, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::remove_if(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + (void)std::replace_copy_if(first, last, first2, UnaryTrue<T>(&copies), value); + assert(copies == 0); + (void)std::replace_if(first, last, UnaryTrue<T>(&copies), value); + assert(copies == 0); + (void)std::search(first, last, first2, mid2, Equal<T>(&copies)); + assert(copies == 0); + (void)std::search_n(first, last, count, value, Equal<T>(&copies)); + assert(copies == 0); + (void)std::set_difference(first, mid, mid, last, first2, Less<T>(&copies)); + assert(copies == 0); + (void)std::set_intersection(first, mid, mid, last, first2, Less<T>(&copies)); + assert(copies == 0); + (void)std::set_symmetric_difference(first, mid, mid, last, first2, Less<T>(&copies)); + assert(copies == 0); + (void)std::set_union(first, mid, mid, last, first2, Less<T>(&copies)); + assert(copies == 0); + (void)std::sort(first, first + 3, Less<T>(&copies)); + assert(copies == 0); + (void)std::sort(first, first + 4, Less<T>(&copies)); + assert(copies == 0); + (void)std::sort(first, first + 5, Less<T>(&copies)); + assert(copies == 0); + (void)std::sort(first, last, Less<T>(&copies)); + assert(copies == 0); + (void)std::sort_heap(first, last, Less<T>(&copies)); + assert(copies == 0); + if (!TEST_IS_CONSTANT_EVALUATED) { + (void)std::stable_partition(first, last, UnaryTrue<T>(&copies)); + assert(copies == 0); + } + if (!TEST_IS_CONSTANT_EVALUATED) { + (void)std::stable_sort(first, last, Less<T>(&copies)); + assert(copies == 0); + } + (void)std::transform(first, last, first2, UnaryTransform<T>(&copies)); + assert(copies == 0); + (void)std::transform(first, mid, mid, first2, BinaryTransform<T>(&copies)); + assert(copies == 0); + (void)std::unique(first, last, Equal<T>(&copies)); + assert(copies == 0); + (void)std::unique_copy(first, last, first2, Equal<T>(&copies)); + assert(copies == 0); + (void)std::upper_bound(first, last, value, Less<T>(&copies)); + assert(copies == 0); + + return true; +} + +bool test_segmented_iterator() { + int copies = 0; + std::deque<int> dq(10); + (void)std::for_each(dq.begin(), dq.end(), UnaryVoid<int>(&copies)); + assert(copies == 1); + copies = 0; + +#if TEST_STD_VER >= 20 + std::vector<std::vector<int>> vecs(3, std::vector<int>(10)); + auto v = std::views::join(vecs); + (void)std::for_each(v.begin(), v.end(), UnaryVoid<int>(&copies)); + assert(copies == 1); + copies = 0; +#endif + + return true; +} + +int main(int, char**) { + all_the_algorithms<void*>(); + all_the_algorithms<int>(); + assert(test_segmented_iterator()); +#if TEST_STD_VER > 17 + static_assert(all_the_algorithms<void*>()); + static_assert(all_the_algorithms<int>()); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp b/libcxx/test/libcxx-03/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp new file mode 100644 index 000000000000..03fef57ee259 --- /dev/null +++ b/libcxx/test/libcxx-03/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp @@ -0,0 +1,225 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Check that all STL classic algorithms can be instantiated with a C++20-hostile iterator + +// ADDITIONAL_COMPILE_FLAGS: -Wno-ambiguous-reversed-operator + +#include <algorithm> +#include <functional> +#include <iterator> +#include <random> + +#include "test_macros.h" + +template <class Sub, class Iterator> +struct IteratorAdaptorBase { + using OutTraits = std::iterator_traits<Iterator>; + using iterator_category = typename OutTraits::iterator_category; + using value_type = typename OutTraits::value_type; + using pointer = typename OutTraits::pointer; + using reference = typename OutTraits::reference; + using difference_type = typename OutTraits::difference_type; + + IteratorAdaptorBase() {} + IteratorAdaptorBase(Iterator) {} + + Sub& sub() { return static_cast<Sub&>(*this); } + const Sub& sub() const { return static_cast<Sub&>(*this); } + + const Iterator& base() const { return it_; } + + reference get() const { return *it_; } + reference operator*() const { return *it_; } + pointer operator->() const { return it_; } + reference operator[](difference_type) const { return *it_; } + + Sub& operator++() { return static_cast<Sub&>(*this); } + Sub& operator--() { return static_cast<Sub&>(*this); } + Sub operator++(int) { return static_cast<Sub&>(*this); } + Sub operator--(int) { return static_cast<Sub&>(*this); } + + Sub& operator+=(difference_type) { return static_cast<Sub&>(*this); } + Sub& operator-=(difference_type) { return static_cast<Sub&>(*this); } + bool operator==(Sub) const { return false; } + bool operator!=(Sub) const { return false; } + bool operator==(Iterator b) const { return *this == Sub(b); } + bool operator!=(Iterator b) const { return *this != Sub(b); } + + friend Sub operator+(Sub, difference_type) { return Sub(); } + friend Sub operator+(difference_type, Sub) { return Sub(); } + friend Sub operator-(Sub, difference_type) { return Sub(); } + friend difference_type operator-(Sub, Sub) { return 0; } + + friend bool operator<(Sub, Sub) { return false; } + friend bool operator>(Sub, Sub) { return false; } + friend bool operator<=(Sub, Sub) { return false; } + friend bool operator>=(Sub, Sub) { return false; } + + private: + Iterator it_; +}; + +template <typename It> +struct Cpp20HostileIterator + : IteratorAdaptorBase<Cpp20HostileIterator<It>, It> { + Cpp20HostileIterator() {} + Cpp20HostileIterator(It) {} +}; + +struct Pred { + bool operator()(int, int) const { return false; } + bool operator()(int) const { return false; } + int operator()() const { return 0; } +}; + +void test() { + Cpp20HostileIterator<int*> it; + Pred pred; + std::mt19937_64 rng; + + (void) std::adjacent_find(it, it); + (void) std::adjacent_find(it, it, pred); + (void) std::all_of(it, it, pred); + (void) std::any_of(it, it, pred); + (void) std::binary_search(it, it, 0); + (void) std::binary_search(it, it, 0, pred); + (void) std::copy_backward(it, it, it); + (void) std::copy_if(it, it, it, pred); + (void) std::copy_n(it, 0, it); + (void) std::copy(it, it, it); + (void) std::count_if(it, it, pred); + (void) std::count(it, it, 0); + (void) std::equal_range(it, it, 0); + (void) std::equal_range(it, it, 0, pred); + (void) std::equal(it, it, it); + (void) std::equal(it, it, it, pred); +#if TEST_STD_VER > 11 + (void) std::equal(it, it, it, it); + (void) std::equal(it, it, it, it, pred); +#endif + (void) std::fill_n(it, 0, 0); + (void) std::fill(it, it, 0); + (void) std::find_end(it, it, it, it); + (void) std::find_end(it, it, it, it, pred); + (void) std::find_first_of(it, it, it, it); + (void) std::find_first_of(it, it, it, it, pred); + (void) std::find_if_not(it, it, pred); + (void) std::find_if(it, it, pred); + (void) std::find(it, it, 0); +#if TEST_STD_VER > 14 + (void) std::for_each_n(it, 0, pred); +#endif + (void) std::for_each(it, it, pred); + (void) std::generate_n(it, 0, pred); + (void) std::generate(it, it, pred); + (void) std::includes(it, it, it, it); + (void) std::includes(it, it, it, it, pred); + (void) std::inplace_merge(it, it, it); + (void) std::inplace_merge(it, it, it, pred); + (void) std::is_heap_until(it, it); + (void) std::is_heap_until(it, it, pred); + (void) std::is_heap(it, it); + (void) std::is_heap(it, it, pred); + (void) std::is_partitioned(it, it, pred); + (void) std::is_permutation(it, it, it); + (void) std::is_permutation(it, it, it, pred); +#if TEST_STD_VER > 11 + (void) std::is_permutation(it, it, it, it); + (void) std::is_permutation(it, it, it, it, pred); +#endif + (void) std::is_sorted_until(it, it); + (void) std::is_sorted_until(it, it, pred); + (void) std::is_sorted(it, it); + (void) std::is_sorted(it, it, pred); + (void) std::lexicographical_compare(it, it, it, it); + (void) std::lexicographical_compare(it, it, it, it, pred); +#if TEST_STD_VER > 17 + (void)std::lexicographical_compare_three_way(it, it, it, it); + (void)std::lexicographical_compare_three_way(it, it, it, it, std::compare_three_way()); +#endif + (void) std::lower_bound(it, it, 0); + (void) std::lower_bound(it, it, 0, pred); + (void) std::make_heap(it, it); + (void) std::make_heap(it, it, pred); + (void) std::max_element(it, it); + (void) std::max_element(it, it, pred); + (void) std::merge(it, it, it, it, it); + (void) std::merge(it, it, it, it, it, pred); + (void) std::min_element(it, it); + (void) std::min_element(it, it, pred); + (void) std::minmax_element(it, it); + (void) std::minmax_element(it, it, pred); + (void) std::mismatch(it, it, it); + (void) std::mismatch(it, it, it, pred); + (void) std::move_backward(it, it, it); + (void) std::move(it, it, it); + (void) std::next_permutation(it, it); + (void) std::next_permutation(it, it, pred); + (void) std::none_of(it, it, pred); + (void) std::nth_element(it, it, it); + (void) std::nth_element(it, it, it, pred); + (void) std::partial_sort_copy(it, it, it, it); + (void) std::partial_sort_copy(it, it, it, it, pred); + (void) std::partial_sort(it, it, it); + (void) std::partial_sort(it, it, it, pred); + (void) std::partition_copy(it, it, it, it, pred); + (void) std::partition_point(it, it, pred); + (void) std::partition(it, it, pred); + (void) std::pop_heap(it, it); + (void) std::pop_heap(it, it, pred); + (void) std::prev_permutation(it, it); + (void) std::prev_permutation(it, it, pred); + (void) std::push_heap(it, it); + (void) std::push_heap(it, it, pred); + (void) std::remove_copy_if(it, it, it, pred); + (void) std::remove_copy(it, it, it, 0); + (void) std::remove_if(it, it, pred); + (void) std::remove(it, it, 0); + (void) std::replace_copy_if(it, it, it, pred, 0); + (void) std::replace_copy(it, it, it, 0, 0); + (void) std::replace_if(it, it, pred, 0); + (void) std::replace(it, it, 0, 0); + (void) std::reverse_copy(it, it, it); + (void) std::reverse(it, it); + (void) std::rotate_copy(it, it, it, it); + (void) std::rotate(it, it, it); +#if TEST_STD_VER > 14 + (void) std::sample(it, it, it, 0, rng); +#endif + (void) std::search(it, it, it, it); + (void) std::search(it, it, it, it, pred); +#if TEST_STD_VER > 14 + (void) std::search(it, it, std::default_searcher<Cpp20HostileIterator<int*>>(it, it)); +#endif + (void) std::set_difference(it, it, it, it, it); + (void) std::set_difference(it, it, it, it, it, pred); + (void) std::set_intersection(it, it, it, it, it); + (void) std::set_intersection(it, it, it, it, it, pred); + (void) std::set_symmetric_difference(it, it, it, it, it); + (void) std::set_symmetric_difference(it, it, it, it, it, pred); + (void) std::set_union(it, it, it, it, it); + (void) std::set_union(it, it, it, it, it, pred); +#if TEST_STD_VER > 17 + (void) std::shift_left(it, it, 0); + (void) std::shift_right(it, it, 0); +#endif + (void) std::shuffle(it, it, rng); + (void) std::sort_heap(it, it); + (void) std::sort_heap(it, it, pred); + (void) std::sort(it, it); + (void) std::sort(it, it, pred); + (void) std::stable_partition(it, it, pred); + (void) std::stable_sort(it, it); + (void) std::swap_ranges(it, it, it); + (void) std::transform(it, it, it, pred); + (void) std::transform(it, it, it, it, pred); + (void) std::unique_copy(it, it, it); + (void) std::unique(it, it); + (void) std::upper_bound(it, it, 0); +} diff --git a/libcxx/test/libcxx-03/algorithms/robust_against_using_non_transparent_comparators.pass.cpp b/libcxx/test/libcxx-03/algorithms/robust_against_using_non_transparent_comparators.pass.cpp new file mode 100644 index 000000000000..39870ebe7ff0 --- /dev/null +++ b/libcxx/test/libcxx-03/algorithms/robust_against_using_non_transparent_comparators.pass.cpp @@ -0,0 +1,80 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <algorithm> +#include <cassert> +#include <cstddef> +#include <iterator> + +#include "test_macros.h" + +template <class T> +struct Iterator { + using value_type = T; + using pointer = value_type*; + using difference_type = std::ptrdiff_t; + using iterator_category = std::forward_iterator_tag; + struct reference { + T* ptr_; + + reference(T* ptr) : ptr_(ptr) {} + + friend bool operator<(reference a, reference b) { return *a.ptr_ < *b.ptr_; } + friend bool operator<(reference a, value_type const& b) { return *a.ptr_ < b; } + friend bool operator<(value_type const& a, reference b) { return a < *b.ptr_; } + + operator T&() const; + }; + + Iterator& operator++() { + ptr_++; + return *this; + } + + Iterator operator++(int) { + Iterator tmp = *this; + ptr_++; + return tmp; + } + + friend bool operator==(Iterator const& a, Iterator const& b) { return a.ptr_ == b.ptr_; } + friend bool operator!=(Iterator const& a, Iterator const& b) { return !(a == b); } + + reference operator*() const { return reference(ptr_); } + + explicit Iterator(T* ptr) : ptr_(ptr) {} + Iterator() = default; + Iterator(Iterator const&) = default; + Iterator(Iterator&&) = default; + + Iterator& operator=(Iterator const&) = default; + Iterator& operator=(Iterator&&) = default; + +private: + T* ptr_; +}; + +int main(int, char**) { + int array[5] = {1, 2, 3, 4, 5}; + Iterator<int> first(array); + Iterator<int> middle(array + 3); + Iterator<int> last(array + 5); + (void)std::binary_search(first, last, 3); + (void)std::equal_range(first, last, 3); + (void)std::includes(first, last, first, last); + (void)std::is_sorted_until(first, last); + (void)std::is_sorted(first, last); + (void)std::lexicographical_compare(first, last, first, last); + (void)std::lower_bound(first, last, 3); + (void)std::max_element(first, last); + (void)std::min_element(first, last); + (void)std::minmax_element(first, last); + (void)std::upper_bound(first, last, 3); + + return 0; +} diff --git a/libcxx/test/libcxx-03/assertions/customize_verbose_abort.compile-time.pass.cpp b/libcxx/test/libcxx-03/assertions/customize_verbose_abort.compile-time.pass.cpp new file mode 100644 index 000000000000..69154c3f7eaf --- /dev/null +++ b/libcxx/test/libcxx-03/assertions/customize_verbose_abort.compile-time.pass.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// This compile-time customization requires cross-file macros, which doesn't work with modules. +// UNSUPPORTED: clang-modules-build + +// Make sure that we can customize the verbose termination function at compile-time by +// defining _LIBCPP_VERBOSE_ABORT ourselves. Note that this does not have any +// deployment target requirements. + +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_VERBOSE_ABORT(...)=my_abort(__VA_ARGS__) + +#include <cstdlib> + +void my_abort(char const*, ...) { + std::exit(EXIT_SUCCESS); +} + +int main(int, char**) { + _LIBCPP_VERBOSE_ABORT("%s", "message"); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/assertions/customize_verbose_abort.link-time.pass.cpp b/libcxx/test/libcxx-03/assertions/customize_verbose_abort.link-time.pass.cpp new file mode 100644 index 000000000000..390c6b6db190 --- /dev/null +++ b/libcxx/test/libcxx-03/assertions/customize_verbose_abort.link-time.pass.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Test that we can set a custom verbose termination function at link-time. + +// We flag uses of the verbose termination function in older dylibs at compile-time to avoid runtime +// failures when back-deploying. +// XFAIL: availability-verbose_abort-missing + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +#include <__verbose_abort> +#include <cstdlib> + +void std::__libcpp_verbose_abort(char const*, ...) _NOEXCEPT { std::exit(EXIT_SUCCESS); } + +int main(int, char**) { + std::__libcpp_verbose_abort("%s", "message"); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp b/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp new file mode 100644 index 000000000000..27169da5e1c4 --- /dev/null +++ b/libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp @@ -0,0 +1,26 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Test that the default verbose termination function aborts the program. +// XFAIL: availability-verbose_abort-missing + +#include <__cxx03/__verbose_abort> +#include <csignal> +#include <cstdlib> + +void signal_handler(int signal) { + if (signal == SIGABRT) + std::_Exit(EXIT_SUCCESS); + std::_Exit(EXIT_FAILURE); +} + +int main(int, char**) { + if (std::signal(SIGABRT, signal_handler) != SIG_ERR) + std::__libcpp_verbose_abort("%s", "foo"); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/assertions/modes/hardening_mode_incorrect_value.sh.cpp b/libcxx/test/libcxx-03/assertions/modes/hardening_mode_incorrect_value.sh.cpp new file mode 100644 index 000000000000..751ff7247445 --- /dev/null +++ b/libcxx/test/libcxx-03/assertions/modes/hardening_mode_incorrect_value.sh.cpp @@ -0,0 +1,26 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// This test verifies that setting the hardening mode to a value that's not part of the predefined constants triggers +// a compile-time error. + +// Modules build produces a different error ("Could not build module 'std'"). +// UNSUPPORTED: clang-modules-build +// REQUIRES: verify-support + +// Note that GCC doesn't support `-Wno-macro-redefined`. +// RUN: %{verify} -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=42 +// Make sure that common cases of misuse produce readable errors. We deliberately disallow setting the hardening mode as +// if it were a boolean flag. +// RUN: %{verify} -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=0 +// RUN: %{verify} -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=1 +// RUN: %{verify} -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE + +#include <cassert> + +// expected-error@*:* {{_LIBCPP_HARDENING_MODE must be set to one of the following values: _LIBCPP_HARDENING_MODE_NONE, _LIBCPP_HARDENING_MODE_FAST, _LIBCPP_HARDENING_MODE_EXTENSIVE, _LIBCPP_HARDENING_MODE_DEBUG}} diff --git a/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp b/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp new file mode 100644 index 000000000000..e79dee906ae6 --- /dev/null +++ b/libcxx/test/libcxx-03/assertions/modes/none.pass.cpp @@ -0,0 +1,30 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// This test checks that if no hardening mode is defined (i.e., in the unchecked mode), by default assertions aren't +// triggered. + +// REQUIRES: libcpp-hardening-mode=none + +#include <__cxx03/__assert> +#include <cassert> + +bool executed_condition = false; +bool f() { + executed_condition = true; + return false; +} + +int main(int, char**) { + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(true, "Should not fire"); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "Also should not fire"); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(f(), "Should not execute anything"); + assert(!executed_condition); // Really make sure we did not execute anything. + + return 0; +} diff --git a/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp b/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp new file mode 100644 index 000000000000..bbda6f11e4f6 --- /dev/null +++ b/libcxx/test/libcxx-03/assertions/single_expression.pass.cpp @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Make sure that `_LIBCPP_ASSERT` and `_LIBCPP_ASSUME` are each a single expression. +// This is useful so we can use them in places that require an expression, such as +// in a constructor initializer list. + +#include <__cxx03/__assert> +#include <cassert> + +void f() { + int i = (_LIBCPP_ASSERT(true, "message"), 3); + assert(i == 3); + return _LIBCPP_ASSERT(true, "message"); +} + +void g() { + int i = (_LIBCPP_ASSUME(true), 3); + assert(i == 3); + return _LIBCPP_ASSUME(true); +} + +int main(int, char**) { + f(); + g(); + return 0; +} diff --git a/libcxx/test/libcxx-03/atomics/atomics.order/memory_order.underlying_type.pass.cpp b/libcxx/test/libcxx-03/atomics/atomics.order/memory_order.underlying_type.pass.cpp new file mode 100644 index 000000000000..5379ef8787d5 --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/atomics.order/memory_order.underlying_type.pass.cpp @@ -0,0 +1,34 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// This test ensures that std::memory_order has the same size under all +// standard versions to make sure we're not breaking the ABI. This is +// relevant because std::memory_order is a scoped enumeration in C++20, +// but an unscoped enumeration pre-C++20. +// +// See PR40977 for details. + +#include <atomic> +#include <type_traits> + +#include "test_macros.h" + + +enum cpp17_memory_order { + cpp17_memory_order_relaxed, cpp17_memory_order_consume, cpp17_memory_order_acquire, + cpp17_memory_order_release, cpp17_memory_order_acq_rel, cpp17_memory_order_seq_cst +}; + +static_assert((std::is_same<std::underlying_type<cpp17_memory_order>::type, + std::underlying_type<std::memory_order>::type>::value), + "std::memory_order should have the same underlying type as a corresponding " + "unscoped enumeration would. Otherwise, our ABI changes from C++17 to C++20."); + +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx-03/atomics/atomics.syn/incompatible_with_stdatomic.verify.cpp b/libcxx/test/libcxx-03/atomics/atomics.syn/incompatible_with_stdatomic.verify.cpp new file mode 100644 index 000000000000..a788ea32dddc --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/atomics.syn/incompatible_with_stdatomic.verify.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: no-threads +// REQUIRES: c++03 || c++11 || c++14 || c++17 || c++20 + +// No diagnostic gets emitted when we build with modules. +// XFAIL: clang-modules-build + +// This test ensures that we issue a reasonable diagnostic when including <atomic> after +// <stdatomic.h> has been included. Before C++23, this otherwise leads to obscure errors +// because <atomic> may try to redefine things defined by <stdatomic.h>. + +// Ignore additional weird errors that happen when the two headers are mixed. +// ADDITIONAL_COMPILE_FLAGS: -Xclang -verify-ignore-unexpected=error -Xclang -verify-ignore-unexpected=warning + +#include <stdatomic.h> +#include <atomic> + +// expected-error@*:* {{<atomic> is incompatible with <stdatomic.h> before C++23.}} diff --git a/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp b/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp new file mode 100644 index 000000000000..320ef57dcb6f --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp @@ -0,0 +1,76 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +// <atomic> + +// template <class T> +// T* atomic_fetch_add(volatile atomic<T*>* obj, ptrdiff_t op) +// template <class T> +// T* atomic_fetch_add(atomic<T*>* obj, ptrdiff_t op); + +#include <atomic> + +void void_pointer() { + { + volatile std::atomic<void*> obj; + // expected-error@*:* {{incomplete type 'void' where a complete type is required}} + std::atomic_fetch_add(&obj, 0); + } + { + std::atomic<void*> obj; + // expected-error@*:* {{incomplete type 'void' where a complete type is required}} + std::atomic_fetch_add(&obj, 0); + } +} + +struct Incomplete; + +void pointer_to_incomplete_type() { + { + volatile std::atomic<Incomplete*> obj; + // expected-error@*:* {{incomplete type 'Incomplete' where a complete type is required}} + std::atomic_fetch_add(&obj, 0); + } + { + std::atomic<Incomplete*> obj; + // expected-error@*:* {{incomplete type 'Incomplete' where a complete type is required}} + std::atomic_fetch_add(&obj, 0); + } +} + +void function_pointer() { + { + volatile std::atomic<void (*)(int)> fun; + // expected-error-re@*:* {{static assertion failed due to requirement '!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}} + std::atomic_fetch_add(&fun, 0); + } + { + std::atomic<void (*)(int)> fun; + // expected-error-re@*:* {{static assertion failed due to requirement '!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}} + std::atomic_fetch_add(&fun, 0); + } +} + +struct S { + void fun(int); +}; + +void member_function_pointer() { + { + volatile std::atomic<void (S::*)(int)> fun; + // expected-error@*:* {{no matching function for call to 'atomic_fetch_add'}} + std::atomic_fetch_add(&fun, 0); + } + { + std::atomic<void (S::*)(int)> fun; + // expected-error@*:* {{no matching function for call to 'atomic_fetch_add'}} + std::atomic_fetch_add(&fun, 0); + } +} diff --git a/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp b/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp new file mode 100644 index 000000000000..bdd8089feb28 --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp @@ -0,0 +1,79 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +// <atomic> + +// template <class T> +// T* +// atomic_fetch_add_explicit(volatile atomic<T*>* obj, ptrdiff_t op, +// memory_order m); +// template <class T> +// T* +// atomic_fetch_add_explicit(atomic<T*>* obj, ptrdiff_t op, memory_order m); + +#include <atomic> + +void void_pointer() { + { + volatile std::atomic<void*> obj; + // expected-error@*:* {{incomplete type 'void' where a complete type is required}} + std::atomic_fetch_add_explicit(&obj, 0, std::memory_order_relaxed); + } + { + std::atomic<void*> obj; + // expected-error@*:* {{incomplete type 'void' where a complete type is required}} + std::atomic_fetch_add_explicit(&obj, 0, std::memory_order_relaxed); + } +} + +struct Incomplete; + +void pointer_to_incomplete_type() { + { + volatile std::atomic<Incomplete*> obj; + // expected-error@*:* {{incomplete type 'Incomplete' where a complete type is required}} + std::atomic_fetch_add_explicit(&obj, 0, std::memory_order_relaxed); + } + { + std::atomic<Incomplete*> obj; + // expected-error@*:* {{incomplete type 'Incomplete' where a complete type is required}} + std::atomic_fetch_add_explicit(&obj, 0, std::memory_order_relaxed); + } +} + +void function_pointer() { + { + volatile std::atomic<void (*)(int)> fun; + // expected-error-re@*:* {{static assertion failed due to requirement '!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}} + std::atomic_fetch_add_explicit(&fun, 0, std::memory_order_relaxed); + } + { + std::atomic<void (*)(int)> fun; + // expected-error-re@*:* {{static assertion failed due to requirement '!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}} + std::atomic_fetch_add_explicit(&fun, 0, std::memory_order_relaxed); + } +} + +struct S { + void fun(int); +}; + +void member_function_pointer() { + { + volatile std::atomic<void (S::*)(int)> fun; + // expected-error@*:* {{no matching function for call to 'atomic_fetch_add_explicit'}} + std::atomic_fetch_add_explicit(&fun, 0, std::memory_order_relaxed); + } + { + std::atomic<void (S::*)(int)> fun; + // expected-error@*:* {{no matching function for call to 'atomic_fetch_add_explicit'}} + std::atomic_fetch_add_explicit(&fun, 0, std::memory_order_relaxed); + } +} diff --git a/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp b/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp new file mode 100644 index 000000000000..2c9f89891d5b --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp @@ -0,0 +1,76 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +// <atomic> + +// template <class T> +// T* atomic_fetch_sub(volatile atomic<T*>* obj, ptrdiff_t op) +// template <class T> +// T* atomic_fetch_sub(atomic<T*>* obj, ptrdiff_t op); + +#include <atomic> + +void void_pointer() { + { + volatile std::atomic<void*> obj; + // expected-error@*:* {{incomplete type 'void' where a complete type is required}} + std::atomic_fetch_sub(&obj, 0); + } + { + std::atomic<void*> obj; + // expected-error@*:* {{incomplete type 'void' where a complete type is required}} + std::atomic_fetch_sub(&obj, 0); + } +} + +struct Incomplete; + +void pointer_to_incomplete_type() { + { + volatile std::atomic<Incomplete*> obj; + // expected-error@*:* {{incomplete type 'Incomplete' where a complete type is required}} + std::atomic_fetch_sub(&obj, 0); + } + { + std::atomic<Incomplete*> obj; + // expected-error@*:* {{incomplete type 'Incomplete' where a complete type is required}} + std::atomic_fetch_sub(&obj, 0); + } +} + +void function_pointer() { + { + volatile std::atomic<void (*)(int)> fun; + // expected-error-re@*:* {{static assertion failed due to requirement '!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}} + std::atomic_fetch_sub(&fun, 0); + } + { + std::atomic<void (*)(int)> fun; + // expected-error-re@*:* {{static assertion failed due to requirement '!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}} + std::atomic_fetch_sub(&fun, 0); + } +} + +struct S { + void fun(int); +}; + +void member_function_pointer() { + { + volatile std::atomic<void (S::*)(int)> fun; + // expected-error@*:* {{no matching function for call to 'atomic_fetch_sub'}} + std::atomic_fetch_sub(&fun, 0); + } + { + std::atomic<void (S::*)(int)> fun; + // expected-error@*:* {{no matching function for call to 'atomic_fetch_sub'}} + std::atomic_fetch_sub(&fun, 0); + } +} diff --git a/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp b/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp new file mode 100644 index 000000000000..88c42750b608 --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp @@ -0,0 +1,79 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +// <atomic> + +// template <class T> +// T* +// atomic_fetch_sub_explicit(volatile atomic<T*>* obj, ptrdiff_t op, +// memory_order m); +// template <class T> +// T* +// atomic_fetch_sub_explicit(atomic<T*>* obj, ptrdiff_t op, memory_order m); + +#include <atomic> + +void void_pointer() { + { + volatile std::atomic<void*> obj; + // expected-error@*:* {{incomplete type 'void' where a complete type is required}} + std::atomic_fetch_sub_explicit(&obj, 0, std::memory_order_relaxed); + } + { + std::atomic<void*> obj; + // expected-error@*:* {{incomplete type 'void' where a complete type is required}} + std::atomic_fetch_sub_explicit(&obj, 0, std::memory_order_relaxed); + } +} + +struct Incomplete; + +void pointer_to_incomplete_type() { + { + volatile std::atomic<Incomplete*> obj; + // expected-error@*:* {{incomplete type 'Incomplete' where a complete type is required}} + std::atomic_fetch_sub_explicit(&obj, 0, std::memory_order_relaxed); + } + { + std::atomic<Incomplete*> obj; + // expected-error@*:* {{incomplete type 'Incomplete' where a complete type is required}} + std::atomic_fetch_sub_explicit(&obj, 0, std::memory_order_relaxed); + } +} + +void function_pointer() { + { + volatile std::atomic<void (*)(int)> fun; + // expected-error-re@*:* {{static assertion failed due to requirement '!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}} + std::atomic_fetch_sub_explicit(&fun, 0, std::memory_order_relaxed); + } + { + std::atomic<void (*)(int)> fun; + // expected-error-re@*:* {{static assertion failed due to requirement '!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}} + std::atomic_fetch_sub_explicit(&fun, 0, std::memory_order_relaxed); + } +} + +struct S { + void fun(int); +}; + +void member_function_pointer() { + { + volatile std::atomic<void (S::*)(int)> fun; + // expected-error@*:* {{no matching function for call to 'atomic_fetch_sub_explicit'}} + std::atomic_fetch_sub_explicit(&fun, 0, std::memory_order_relaxed); + } + { + std::atomic<void (S::*)(int)> fun; + // expected-error@*:* {{no matching function for call to 'atomic_fetch_sub_explicit'}} + std::atomic_fetch_sub_explicit(&fun, 0, std::memory_order_relaxed); + } +} diff --git a/libcxx/test/libcxx-03/atomics/diagnose_invalid_memory_order.verify.cpp b/libcxx/test/libcxx-03/atomics/diagnose_invalid_memory_order.verify.cpp new file mode 100644 index 000000000000..1b0b945f3370 --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/diagnose_invalid_memory_order.verify.cpp @@ -0,0 +1,122 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: diagnose-if-support + +// <atomic> + +// Test that invalid memory order arguments are diagnosed where possible. + +#include <atomic> + +void f() { + std::atomic<int> x(42); + volatile std::atomic<int>& vx = x; + int val1 = 1; ((void)val1); + int val2 = 2; ((void)val2); + // load operations + { + x.load(std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + x.load(std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.load(std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.load(std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + // valid memory orders + x.load(std::memory_order_relaxed); + x.load(std::memory_order_consume); + x.load(std::memory_order_acquire); + x.load(std::memory_order_seq_cst); + } + { + std::atomic_load_explicit(&x, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_load_explicit(&x, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_load_explicit(&vx, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_load_explicit(&vx, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + // valid memory orders + std::atomic_load_explicit(&x, std::memory_order_relaxed); + std::atomic_load_explicit(&x, std::memory_order_consume); + std::atomic_load_explicit(&x, std::memory_order_acquire); + std::atomic_load_explicit(&x, std::memory_order_seq_cst); + } + // store operations + { + x.store(42, std::memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}} + x.store(42, std::memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}} + x.store(42, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.store(42, std::memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.store(42, std::memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.store(42, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + // valid memory orders + x.store(42, std::memory_order_relaxed); + x.store(42, std::memory_order_release); + x.store(42, std::memory_order_seq_cst); + } + { + std::atomic_store_explicit(&x, 42, std::memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_store_explicit(&x, 42, std::memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_store_explicit(&x, 42, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_store_explicit(&vx, 42, std::memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_store_explicit(&vx, 42, std::memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_store_explicit(&vx, 42, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + // valid memory orders + std::atomic_store_explicit(&x, 42, std::memory_order_relaxed); + std::atomic_store_explicit(&x, 42, std::memory_order_release); + std::atomic_store_explicit(&x, 42, std::memory_order_seq_cst); + } + // compare exchange weak + { + x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + // valid memory orders + x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_relaxed); + x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_consume); + x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_acquire); + x.compare_exchange_weak(val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst); + // Test that the cmpxchg overload with only one memory order argument + // does not generate any diagnostics. + x.compare_exchange_weak(val1, val2, std::memory_order_release); + } + { + std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_compare_exchange_weak_explicit(&vx, &val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_compare_exchange_weak_explicit(&vx, &val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + // valid memory orders + std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_relaxed); + std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_consume); + std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acquire); + std::atomic_compare_exchange_weak_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst); + } + // compare exchange strong + { + x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + vx.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + // valid memory orders + x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_relaxed); + x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_consume); + x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_acquire); + x.compare_exchange_strong(val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst); + // Test that the cmpxchg overload with only one memory order argument + // does not generate any diagnostics. + x.compare_exchange_strong(val1, val2, std::memory_order_release); + } + { + std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_compare_exchange_strong_explicit(&vx, &val1, val2, std::memory_order_seq_cst, std::memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} + std::atomic_compare_exchange_strong_explicit(&vx, &val1, val2, std::memory_order_seq_cst, std::memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} + // valid memory orders + std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_relaxed); + std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_consume); + std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_acquire); + std::atomic_compare_exchange_strong_explicit(&x, &val1, val2, std::memory_order_seq_cst, std::memory_order_seq_cst); + } +} diff --git a/libcxx/test/libcxx-03/atomics/stdatomic.h.syn/dont_hijack_header.compile.pass.cpp b/libcxx/test/libcxx-03/atomics/stdatomic.h.syn/dont_hijack_header.compile.pass.cpp new file mode 100644 index 000000000000..6df80daf9414 --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/stdatomic.h.syn/dont_hijack_header.compile.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: no-threads + +// This test ensures that we don't hijack the <stdatomic.h> header (e.g. by providing +// an empty header) even when compiling before C++23, since some users were using the +// Clang or platform provided header before libc++ added its own. + +// On GCC, the compiler-provided <stdatomic.h> is not C++ friendly, so including <stdatomic.h> +// doesn't work at all if we don't use the <stdatomic.h> provided by libc++ in C++23 and above. +// XFAIL: (c++11 || c++14 || c++17 || c++20) && gcc + +#include <stdatomic.h> + +void f() { + atomic_int i; // just make sure the header isn't empty + (void)i; +} diff --git a/libcxx/test/libcxx-03/atomics/stdatomic.h.syn/dont_hijack_header.cxx23.compile.pass.cpp b/libcxx/test/libcxx-03/atomics/stdatomic.h.syn/dont_hijack_header.cxx23.compile.pass.cpp new file mode 100644 index 000000000000..a8a99e6937f3 --- /dev/null +++ b/libcxx/test/libcxx-03/atomics/stdatomic.h.syn/dont_hijack_header.cxx23.compile.pass.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: no-threads + +// This test verifies that <stdatomic.h> DOES NOT redirect to <atomic> before C++23, +// since doing so is a breaking change. Several things can break when that happens, +// because the type of _Atomic(T) changes from _Atomic(T) to std::atomic<T>. +// +// For example, redeclarations can become invalid depending on whether they +// have been declared with <stdatomic.h> in scope or not. + +// REQUIRES: c++03 || c++11 || c++14 || c++17 || c++20 + +// On GCC, the compiler-provided <stdatomic.h> is not C++ friendly, so including <stdatomic.h> +// doesn't work at all if we don't use the <stdatomic.h> provided by libc++ in C++23 and above. +// XFAIL: (c++11 || c++14 || c++17 || c++20) && gcc + +#include <atomic> +#include <stdatomic.h> +#include <type_traits> + +static_assert(!std::is_same<_Atomic(int), std::atomic<int> >::value, ""); diff --git a/libcxx/test/libcxx-03/clang_tidy.gen.py b/libcxx/test/libcxx-03/clang_tidy.gen.py new file mode 100644 index 000000000000..5926f521e780 --- /dev/null +++ b/libcxx/test/libcxx-03/clang_tidy.gen.py @@ -0,0 +1,36 @@ +# ===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ===----------------------------------------------------------------------===## + +# Run our custom libc++ clang-tidy checks on all public headers. + +# REQUIRES: has-clang-tidy + +# The frozen headers should not be updated to the latest libc++ style, so don't test. +# UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME + +# The GCC compiler flags are not always compatible with clang-tidy. +# UNSUPPORTED: gcc + +# RUN: %{python} %s %{libcxx-dir}/utils +# END. + +import sys +sys.path.append(sys.argv[1]) +from libcxx.header_information import lit_header_restrictions, lit_header_undeprecations, public_headers + +for header in public_headers: + print(f"""\ +//--- {header}.sh.cpp +{lit_header_restrictions.get(header, '')} +{lit_header_undeprecations.get(header, '')} + +// TODO: run clang-tidy with modules enabled once they are supported +// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- -Wweak-vtables %{{compile_flags}} -fno-modules + +#include <{header}> +""") diff --git a/libcxx/test/libcxx-03/containers/associative/map/at.abort.pass.cpp b/libcxx/test/libcxx-03/containers/associative/map/at.abort.pass.cpp new file mode 100644 index 000000000000..d68ee5f52859 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/map/at.abort.pass.cpp @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <map> + +// class map + +// mapped_type& at(const key_type& k); + +// Make sure we abort() when exceptions are disabled and we fetch a key that +// is not in the map. + +// REQUIRES: no-exceptions + +#include <csignal> +#include <cstdlib> +#include <map> + +#include "test_macros.h" + +void exit_success(int) { std::_Exit(EXIT_SUCCESS); } + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::map<int, int> map; + map.at(1); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/containers/associative/map/at.const.abort.pass.cpp b/libcxx/test/libcxx-03/containers/associative/map/at.const.abort.pass.cpp new file mode 100644 index 000000000000..bbc8c7c4d726 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/map/at.const.abort.pass.cpp @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <map> + +// class map + +// const mapped_type& at(const key_type& k) const; + +// Make sure we abort() when exceptions are disabled and we fetch a key that +// is not in the map. + +// REQUIRES: no-exceptions + +#include <csignal> +#include <cstdlib> +#include <map> + +#include "test_macros.h" + +void exit_success(int) { std::_Exit(EXIT_SUCCESS); } + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::map<int, int> const map; + map.at(1); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/containers/associative/reference_comparator_abi.compile.pass.cpp b/libcxx/test/libcxx-03/containers/associative/reference_comparator_abi.compile.pass.cpp new file mode 100644 index 000000000000..6a26db95b088 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/reference_comparator_abi.compile.pass.cpp @@ -0,0 +1,57 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Pin down the ABI of associative containers with respect to their size and alignment +// when passed a comparator that is a reference. +// +// While it's not even clear that reference comparators are legal in containers, an +// unintended ABI break was discovered after implementing the new compressed pair +// mechanism based on [[no_unique_address]], and this is a regression test for that. +// If we decide to make reference comparators ill-formed, this test would become +// unnecessary. +// +// See https://llvm.org/PR118559 for more details. + +#include <set> +#include <map> + +#include "test_macros.h" + +struct TEST_ALIGNAS(16) Cmp { + bool operator()(int, int) const; +}; + +template <class Compare> +struct Set { + char b; + std::set<int, Compare> s; +}; + +template <class Compare> +struct Multiset { + char b; + std::multiset<int, Compare> s; +}; + +template <class Compare> +struct Map { + char b; + std::map<int, char, Compare> s; +}; + +template <class Compare> +struct Multimap { + char b; + std::multimap<int, char, Compare> s; +}; + +static_assert(sizeof(Set<Cmp&>) == sizeof(Set<bool (*)(int, int)>), ""); +static_assert(sizeof(Multiset<Cmp&>) == sizeof(Multiset<bool (*)(int, int)>), ""); + +static_assert(sizeof(Map<Cmp&>) == sizeof(Map<bool (*)(int, int)>), ""); +static_assert(sizeof(Multimap<Cmp&>) == sizeof(Multimap<bool (*)(int, int)>), ""); diff --git a/libcxx/test/libcxx-03/containers/associative/tree_balance_after_insert.pass.cpp b/libcxx/test/libcxx-03/containers/associative/tree_balance_after_insert.pass.cpp new file mode 100644 index 000000000000..c1e740616970 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/tree_balance_after_insert.pass.cpp @@ -0,0 +1,1610 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Not a portable test + +// Precondition: __root->__is_black_ == true +// template <class _NodePtr> +// void +// __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) + +#include <__cxx03/__tree> +#include <cassert> + +#include "test_macros.h" + +struct Node { + Node* __left_; + Node* __right_; + Node* __parent_; + bool __is_black_; + + Node* __parent_unsafe() const { return __parent_; } + void __set_parent(Node* x) { __parent_ = x; } + + Node() : __left_(), __right_(), __parent_(), __is_black_() {} +}; + +void test1() { + { + Node root; + Node a; + Node b; + Node c; + Node d; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = &a; + b.__right_ = 0; + b.__is_black_ = false; + + d.__parent_ = &c; + d.__left_ = 0; + d.__right_ = 0; + d.__is_black_ = false; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &c); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = 0; + b.__right_ = &a; + b.__is_black_ = false; + + d.__parent_ = &c; + d.__left_ = 0; + d.__right_ = 0; + d.__is_black_ = false; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &c); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == 0); + assert(b.__right_ == &a); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = 0; + b.__right_ = 0; + b.__is_black_ = false; + + d.__parent_ = &c; + d.__left_ = &a; + d.__right_ = 0; + d.__is_black_ = false; + + a.__parent_ = &d; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &c); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == &a); + assert(d.__right_ == 0); + assert(d.__is_black_ == true); + + assert(a.__parent_ == &d); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = 0; + b.__right_ = 0; + b.__is_black_ = false; + + d.__parent_ = &c; + d.__left_ = 0; + d.__right_ = &a; + d.__is_black_ = false; + + a.__parent_ = &d; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &c); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == &a); + assert(d.__is_black_ == true); + + assert(a.__parent_ == &d); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + Node h; + Node i; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = &a; + b.__right_ = &g; + b.__is_black_ = false; + + d.__parent_ = &c; + d.__left_ = &h; + d.__right_ = &i; + d.__is_black_ = false; + + a.__parent_ = &b; + a.__left_ = &e; + a.__right_ = &f; + a.__is_black_ = false; + + e.__parent_ = &a; + e.__is_black_ = true; + + f.__parent_ = &a; + f.__is_black_ = true; + + g.__parent_ = &b; + g.__is_black_ = true; + + h.__parent_ = &d; + h.__is_black_ = true; + + i.__parent_ = &d; + i.__is_black_ = true; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &c); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == &a); + assert(b.__right_ == &g); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == &h); + assert(d.__right_ == &i); + assert(d.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == &e); + assert(a.__right_ == &f); + assert(a.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + Node h; + Node i; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = &g; + b.__right_ = &a; + b.__is_black_ = false; + + d.__parent_ = &c; + d.__left_ = &h; + d.__right_ = &i; + d.__is_black_ = false; + + a.__parent_ = &b; + a.__left_ = &e; + a.__right_ = &f; + a.__is_black_ = false; + + e.__parent_ = &a; + e.__is_black_ = true; + + f.__parent_ = &a; + f.__is_black_ = true; + + g.__parent_ = &b; + g.__is_black_ = true; + + h.__parent_ = &d; + h.__is_black_ = true; + + i.__parent_ = &d; + i.__is_black_ = true; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &c); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == &g); + assert(b.__right_ == &a); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == &h); + assert(d.__right_ == &i); + assert(d.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == &e); + assert(a.__right_ == &f); + assert(a.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + Node h; + Node i; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = &g; + b.__right_ = &h; + b.__is_black_ = false; + + d.__parent_ = &c; + d.__left_ = &a; + d.__right_ = &i; + d.__is_black_ = false; + + a.__parent_ = &d; + a.__left_ = &e; + a.__right_ = &f; + a.__is_black_ = false; + + e.__parent_ = &a; + e.__is_black_ = true; + + f.__parent_ = &a; + f.__is_black_ = true; + + g.__parent_ = &b; + g.__is_black_ = true; + + h.__parent_ = &b; + h.__is_black_ = true; + + i.__parent_ = &d; + i.__is_black_ = true; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &c); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == &g); + assert(b.__right_ == &h); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == &a); + assert(d.__right_ == &i); + assert(d.__is_black_ == true); + + assert(a.__parent_ == &d); + assert(a.__left_ == &e); + assert(a.__right_ == &f); + assert(a.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + Node h; + Node i; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = &g; + b.__right_ = &h; + b.__is_black_ = false; + + d.__parent_ = &c; + d.__left_ = &i; + d.__right_ = &a; + d.__is_black_ = false; + + a.__parent_ = &d; + a.__left_ = &e; + a.__right_ = &f; + a.__is_black_ = false; + + e.__parent_ = &a; + e.__is_black_ = true; + + f.__parent_ = &a; + f.__is_black_ = true; + + g.__parent_ = &b; + g.__is_black_ = true; + + h.__parent_ = &b; + h.__is_black_ = true; + + i.__parent_ = &d; + i.__is_black_ = true; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &c); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == &g); + assert(b.__right_ == &h); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == &i); + assert(d.__right_ == &a); + assert(d.__is_black_ == true); + + assert(a.__parent_ == &d); + assert(a.__left_ == &e); + assert(a.__right_ == &f); + assert(a.__is_black_ == false); + } +} + +void test2() { + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &a; + c.__right_ = 0; + c.__is_black_ = true; + + a.__parent_ = &c; + a.__left_ = 0; + a.__right_ = &b; + a.__is_black_ = false; + + b.__parent_ = &a; + b.__left_ = 0; + b.__right_ = 0; + b.__is_black_ = false; + + std::__tree_balance_after_insert(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &b); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &a; + + a.__parent_ = &root; + a.__left_ = 0; + a.__right_ = &c; + a.__is_black_ = true; + + c.__parent_ = &a; + c.__left_ = &b; + c.__right_ = 0; + c.__is_black_ = false; + + b.__parent_ = &c; + b.__left_ = 0; + b.__right_ = 0; + b.__is_black_ = false; + + std::__tree_balance_after_insert(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &b); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &a; + c.__right_ = &g; + c.__is_black_ = true; + + a.__parent_ = &c; + a.__left_ = &d; + a.__right_ = &b; + a.__is_black_ = false; + + b.__parent_ = &a; + b.__left_ = &e; + b.__right_ = &f; + b.__is_black_ = false; + + d.__parent_ = &a; + d.__is_black_ = true; + + e.__parent_ = &b; + e.__is_black_ = true; + + f.__parent_ = &b; + f.__is_black_ = true; + + g.__parent_ = &c; + g.__is_black_ = true; + + std::__tree_balance_after_insert(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &b); + + assert(c.__parent_ == &b); + assert(c.__left_ == &f); + assert(c.__right_ == &g); + assert(c.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == &d); + assert(a.__right_ == &e); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &a); + assert(d.__is_black_ == true); + + assert(e.__parent_ == &a); + assert(e.__is_black_ == true); + + assert(f.__parent_ == &c); + assert(f.__is_black_ == true); + + assert(g.__parent_ == &c); + assert(g.__is_black_ == true); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + + root.__left_ = &a; + + a.__parent_ = &root; + a.__left_ = &d; + a.__right_ = &c; + a.__is_black_ = true; + + c.__parent_ = &a; + c.__left_ = &b; + c.__right_ = &g; + c.__is_black_ = false; + + b.__parent_ = &c; + b.__left_ = &e; + b.__right_ = &f; + b.__is_black_ = false; + + d.__parent_ = &a; + d.__is_black_ = true; + + e.__parent_ = &b; + e.__is_black_ = true; + + f.__parent_ = &b; + f.__is_black_ = true; + + g.__parent_ = &c; + g.__is_black_ = true; + + std::__tree_balance_after_insert(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &b); + + assert(c.__parent_ == &b); + assert(c.__left_ == &f); + assert(c.__right_ == &g); + assert(c.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == &d); + assert(a.__right_ == &e); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &a); + assert(d.__is_black_ == true); + + assert(e.__parent_ == &a); + assert(e.__is_black_ == true); + + assert(f.__parent_ == &c); + assert(f.__is_black_ == true); + + assert(g.__parent_ == &c); + assert(g.__is_black_ == true); + } +} + +void test3() { + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = 0; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = &a; + b.__right_ = 0; + b.__is_black_ = false; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &b); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &a; + + a.__parent_ = &root; + a.__left_ = 0; + a.__right_ = &b; + a.__is_black_ = true; + + b.__parent_ = &a; + b.__left_ = 0; + b.__right_ = &c; + b.__is_black_ = false; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = false; + + std::__tree_balance_after_insert(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &b); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + + root.__left_ = &c; + + c.__parent_ = &root; + c.__left_ = &b; + c.__right_ = &g; + c.__is_black_ = true; + + b.__parent_ = &c; + b.__left_ = &a; + b.__right_ = &f; + b.__is_black_ = false; + + a.__parent_ = &b; + a.__left_ = &d; + a.__right_ = &e; + a.__is_black_ = false; + + d.__parent_ = &a; + d.__is_black_ = true; + + e.__parent_ = &a; + e.__is_black_ = true; + + f.__parent_ = &b; + f.__is_black_ = true; + + g.__parent_ = &c; + g.__is_black_ = true; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &b); + + assert(c.__parent_ == &b); + assert(c.__left_ == &f); + assert(c.__right_ == &g); + assert(c.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == &d); + assert(a.__right_ == &e); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &a); + assert(d.__is_black_ == true); + + assert(e.__parent_ == &a); + assert(e.__is_black_ == true); + + assert(f.__parent_ == &c); + assert(f.__is_black_ == true); + + assert(g.__parent_ == &c); + assert(g.__is_black_ == true); + } + { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + + root.__left_ = &a; + + a.__parent_ = &root; + a.__left_ = &d; + a.__right_ = &b; + a.__is_black_ = true; + + b.__parent_ = &a; + b.__left_ = &e; + b.__right_ = &c; + b.__is_black_ = false; + + c.__parent_ = &b; + c.__left_ = &f; + c.__right_ = &g; + c.__is_black_ = false; + + d.__parent_ = &a; + d.__is_black_ = true; + + e.__parent_ = &b; + e.__is_black_ = true; + + f.__parent_ = &c; + f.__is_black_ = true; + + g.__parent_ = &c; + g.__is_black_ = true; + + std::__tree_balance_after_insert(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__left_ == &b); + + assert(c.__parent_ == &b); + assert(c.__left_ == &f); + assert(c.__right_ == &g); + assert(c.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == &d); + assert(a.__right_ == &e); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(d.__parent_ == &a); + assert(d.__is_black_ == true); + + assert(e.__parent_ == &a); + assert(e.__is_black_ == true); + + assert(f.__parent_ == &c); + assert(f.__is_black_ == true); + + assert(g.__parent_ == &c); + assert(g.__is_black_ == true); + } +} + +void test4() { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + Node h; + + root.__left_ = &a; + a.__parent_ = &root; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &a); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &root); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + a.__right_ = &b; + b.__parent_ = &a; + + std::__tree_balance_after_insert(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &a); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &root); + assert(a.__left_ == 0); + assert(a.__right_ == &b); + assert(a.__is_black_ == true); + + assert(b.__parent_ == &a); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == false); + + b.__right_ = &c; + c.__parent_ = &b; + + std::__tree_balance_after_insert(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + c.__right_ = &d; + d.__parent_ = &c; + + std::__tree_balance_after_insert(root.__left_, &d); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == false); + + d.__right_ = &e; + e.__parent_ = &d; + + std::__tree_balance_after_insert(root.__left_, &e); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &d); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + assert(d.__parent_ == &b); + assert(d.__left_ == &c); + assert(d.__right_ == &e); + assert(d.__is_black_ == true); + + assert(c.__parent_ == &d); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + assert(e.__parent_ == &d); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == false); + + e.__right_ = &f; + f.__parent_ = &e; + + std::__tree_balance_after_insert(root.__left_, &f); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &d); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + assert(d.__parent_ == &b); + assert(d.__left_ == &c); + assert(d.__right_ == &e); + assert(d.__is_black_ == false); + + assert(c.__parent_ == &d); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + assert(e.__parent_ == &d); + assert(e.__left_ == 0); + assert(e.__right_ == &f); + assert(e.__is_black_ == true); + + assert(f.__parent_ == &e); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == false); + + f.__right_ = &g; + g.__parent_ = &f; + + std::__tree_balance_after_insert(root.__left_, &g); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &d); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + assert(d.__parent_ == &b); + assert(d.__left_ == &c); + assert(d.__right_ == &f); + assert(d.__is_black_ == false); + + assert(c.__parent_ == &d); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + assert(f.__parent_ == &d); + assert(f.__left_ == &e); + assert(f.__right_ == &g); + assert(f.__is_black_ == true); + + assert(e.__parent_ == &f); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == false); + + assert(g.__parent_ == &f); + assert(g.__left_ == 0); + assert(g.__right_ == 0); + assert(g.__is_black_ == false); + + g.__right_ = &h; + h.__parent_ = &g; + + std::__tree_balance_after_insert(root.__left_, &h); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &d); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(d.__parent_ == &root); + assert(d.__left_ == &b); + assert(d.__right_ == &f); + assert(d.__is_black_ == true); + + assert(b.__parent_ == &d); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + assert(f.__parent_ == &d); + assert(f.__left_ == &e); + assert(f.__right_ == &g); + assert(f.__is_black_ == false); + + assert(e.__parent_ == &f); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == true); + + assert(g.__parent_ == &f); + assert(g.__left_ == 0); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == false); +} + +void test5() { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + Node h; + + root.__left_ = &h; + h.__parent_ = &root; + + std::__tree_balance_after_insert(root.__left_, &h); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &h); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(h.__parent_ == &root); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); + + h.__left_ = &g; + g.__parent_ = &h; + + std::__tree_balance_after_insert(root.__left_, &g); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &h); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(h.__parent_ == &root); + assert(h.__left_ == &g); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); + + assert(g.__parent_ == &h); + assert(g.__left_ == 0); + assert(g.__right_ == 0); + assert(g.__is_black_ == false); + + g.__left_ = &f; + f.__parent_ = &g; + + std::__tree_balance_after_insert(root.__left_, &f); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &g); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(g.__parent_ == &root); + assert(g.__left_ == &f); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(f.__parent_ == &g); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == false); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == false); + + f.__left_ = &e; + e.__parent_ = &f; + + std::__tree_balance_after_insert(root.__left_, &e); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &g); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(g.__parent_ == &root); + assert(g.__left_ == &f); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(f.__parent_ == &g); + assert(f.__left_ == &e); + assert(f.__right_ == 0); + assert(f.__is_black_ == true); + + assert(e.__parent_ == &f); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == false); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); + + e.__left_ = &d; + d.__parent_ = &e; + + std::__tree_balance_after_insert(root.__left_, &d); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &g); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(g.__parent_ == &root); + assert(g.__left_ == &e); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(e.__parent_ == &g); + assert(e.__left_ == &d); + assert(e.__right_ == &f); + assert(e.__is_black_ == true); + + assert(d.__parent_ == &e); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == false); + + assert(f.__parent_ == &e); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == false); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); + + d.__left_ = &c; + c.__parent_ = &d; + + std::__tree_balance_after_insert(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &g); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(g.__parent_ == &root); + assert(g.__left_ == &e); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(e.__parent_ == &g); + assert(e.__left_ == &d); + assert(e.__right_ == &f); + assert(e.__is_black_ == false); + + assert(d.__parent_ == &e); + assert(d.__left_ == &c); + assert(d.__right_ == 0); + assert(d.__is_black_ == true); + + assert(c.__parent_ == &d); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + assert(f.__parent_ == &e); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); + + c.__left_ = &b; + b.__parent_ = &c; + + std::__tree_balance_after_insert(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &g); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(g.__parent_ == &root); + assert(g.__left_ == &e); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(e.__parent_ == &g); + assert(e.__left_ == &c); + assert(e.__right_ == &f); + assert(e.__is_black_ == false); + + assert(c.__parent_ == &e); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == false); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == false); + + assert(f.__parent_ == &e); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); + + b.__left_ = &a; + a.__parent_ = &b; + + std::__tree_balance_after_insert(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &e); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(e.__parent_ == &root); + assert(e.__left_ == &c); + assert(e.__right_ == &g); + assert(e.__is_black_ == true); + + assert(c.__parent_ == &e); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == false); + + assert(b.__parent_ == &c); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == true); + + assert(g.__parent_ == &e); + assert(g.__left_ == &f); + assert(g.__right_ == &h); + assert(g.__is_black_ == false); + + assert(f.__parent_ == &g); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); +} + +int main(int, char**) { + test1(); + test2(); + test3(); + test4(); + test5(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/associative/tree_key_value_traits.pass.cpp b/libcxx/test/libcxx-03/containers/associative/tree_key_value_traits.pass.cpp new file mode 100644 index 000000000000..630f5c862140 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/tree_key_value_traits.pass.cpp @@ -0,0 +1,54 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <__cxx03/__tree> +#include <map> +#include <set> +#include <type_traits> + +#include "test_macros.h" +#include "min_allocator.h" + +void testKeyValueTrait() { + { + typedef int Tp; + typedef std::__tree_key_value_types<Tp> Traits; + static_assert((std::is_same<Traits::key_type, int>::value), ""); + static_assert((std::is_same<Traits::__container_value_type, Tp>::value), ""); + static_assert(Traits::__is_map == false, ""); + } + { + typedef std::pair<int, int> Tp; + typedef std::__tree_key_value_types<Tp> Traits; + static_assert((std::is_same<Traits::key_type, Tp>::value), ""); + static_assert((std::is_same<Traits::__container_value_type, Tp>::value), ""); + static_assert(Traits::__is_map == false, ""); + } + { + typedef std::pair<const int, int> Tp; + typedef std::__tree_key_value_types<Tp> Traits; + static_assert((std::is_same<Traits::key_type, Tp>::value), ""); + static_assert((std::is_same<Traits::__container_value_type, Tp>::value), ""); + static_assert(Traits::__is_map == false, ""); + } + { + typedef std::__value_type<int, int> Tp; + typedef std::__tree_key_value_types<Tp> Traits; + static_assert((std::is_same<Traits::key_type, int>::value), ""); + static_assert((std::is_same<Traits::mapped_type, int>::value), ""); + static_assert((std::is_same<Traits::__container_value_type, std::pair<const int, int> >::value), ""); + static_assert((std::is_same<Traits::__map_value_type, std::pair<const int, int> >::value), ""); + static_assert(Traits::__is_map == true, ""); + } +} + +int main(int, char**) { + testKeyValueTrait(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/associative/tree_left_rotate.pass.cpp b/libcxx/test/libcxx-03/containers/associative/tree_left_rotate.pass.cpp new file mode 100644 index 000000000000..67edca72b7b4 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/tree_left_rotate.pass.cpp @@ -0,0 +1,98 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Not a portable test + +// Precondition: __x->__right_ != nullptr +// template <class _NodePtr> +// void +// __tree_left_rotate(_NodePtr __x); + +#include <__cxx03/__tree> +#include <cassert> + +#include "test_macros.h" + +struct Node { + Node* __left_; + Node* __right_; + Node* __parent_; + + Node* __parent_unsafe() const { return __parent_; } + void __set_parent(Node* x) { __parent_ = x; } + + Node() : __left_(), __right_(), __parent_() {} +}; + +void test1() { + Node root; + Node x; + Node y; + root.__left_ = &x; + x.__left_ = 0; + x.__right_ = &y; + x.__parent_ = &root; + y.__left_ = 0; + y.__right_ = 0; + y.__parent_ = &x; + std::__tree_left_rotate(&x); + assert(root.__parent_ == 0); + assert(root.__left_ == &y); + assert(root.__right_ == 0); + assert(y.__parent_ == &root); + assert(y.__left_ == &x); + assert(y.__right_ == 0); + assert(x.__parent_ == &y); + assert(x.__left_ == 0); + assert(x.__right_ == 0); +} + +void test2() { + Node root; + Node x; + Node y; + Node a; + Node b; + Node c; + root.__left_ = &x; + x.__left_ = &a; + x.__right_ = &y; + x.__parent_ = &root; + y.__left_ = &b; + y.__right_ = &c; + y.__parent_ = &x; + a.__parent_ = &x; + b.__parent_ = &y; + c.__parent_ = &y; + std::__tree_left_rotate(&x); + assert(root.__parent_ == 0); + assert(root.__left_ == &y); + assert(root.__right_ == 0); + assert(y.__parent_ == &root); + assert(y.__left_ == &x); + assert(y.__right_ == &c); + assert(x.__parent_ == &y); + assert(x.__left_ == &a); + assert(x.__right_ == &b); + assert(a.__parent_ == &x); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(b.__parent_ == &x); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(c.__parent_ == &y); + assert(c.__left_ == 0); + assert(c.__right_ == 0); +} + +int main(int, char**) { + test1(); + test2(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/associative/tree_remove.pass.cpp b/libcxx/test/libcxx-03/containers/associative/tree_remove.pass.cpp new file mode 100644 index 000000000000..d4eae2c95763 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/tree_remove.pass.cpp @@ -0,0 +1,1644 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Not a portable test + +// Returns __tree_next(__z) +// template <class _NodePtr> +// void +// __tree_remove(_NodePtr __root, _NodePtr __z) + +#include <__cxx03/__tree> +#include <cassert> + +#include "test_macros.h" + +struct Node { + Node* __left_; + Node* __right_; + Node* __parent_; + bool __is_black_; + + Node* __parent_unsafe() const { return __parent_; } + void __set_parent(Node* x) { __parent_ = x; } + + Node() : __left_(), __right_(), __parent_(), __is_black_() {} +}; + +void test1() { + { + // Left + // Case 1 -> Case 2 -> x is red turned to black + Node root; + Node b; + Node c; + Node d; + Node e; + Node y; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &y; + b.__right_ = &d; + b.__is_black_ = true; + + y.__parent_ = &b; + y.__left_ = 0; + y.__right_ = 0; + y.__is_black_ = true; + + d.__parent_ = &b; + d.__left_ = &c; + d.__right_ = &e; + d.__is_black_ = false; + + c.__parent_ = &d; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = true; + + e.__parent_ = &d; + e.__left_ = 0; + e.__right_ = 0; + e.__is_black_ = true; + + std::__tree_remove(root.__left_, &y); + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &d); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(d.__parent_ == &root); + assert(d.__left_ == &b); + assert(d.__right_ == &e); + assert(d.__is_black_ == true); + + assert(b.__parent_ == &d); + assert(b.__left_ == 0); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + assert(e.__parent_ == &d); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == true); + } + { + // Right + // Case 1 -> Case 2 -> x is red turned to black + Node root; + Node b; + Node c; + Node d; + Node e; + Node y; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__right_ = &y; + b.__left_ = &d; + b.__is_black_ = true; + + y.__parent_ = &b; + y.__right_ = 0; + y.__left_ = 0; + y.__is_black_ = true; + + d.__parent_ = &b; + d.__right_ = &c; + d.__left_ = &e; + d.__is_black_ = false; + + c.__parent_ = &d; + c.__right_ = 0; + c.__left_ = 0; + c.__is_black_ = true; + + e.__parent_ = &d; + e.__right_ = 0; + e.__left_ = 0; + e.__is_black_ = true; + + std::__tree_remove(root.__left_, &y); + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &d); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(d.__parent_ == &root); + assert(d.__right_ == &b); + assert(d.__left_ == &e); + assert(d.__is_black_ == true); + + assert(b.__parent_ == &d); + assert(b.__right_ == 0); + assert(b.__left_ == &c); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__right_ == 0); + assert(c.__left_ == 0); + assert(c.__is_black_ == false); + + assert(e.__parent_ == &d); + assert(e.__right_ == 0); + assert(e.__left_ == 0); + assert(e.__is_black_ == true); + } + { + // Left + // Case 1 -> Case 3 -> Case 4 + Node root; + Node b; + Node c; + Node d; + Node e; + Node f; + Node y; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &y; + b.__right_ = &d; + b.__is_black_ = true; + + y.__parent_ = &b; + y.__left_ = 0; + y.__right_ = 0; + y.__is_black_ = true; + + d.__parent_ = &b; + d.__left_ = &c; + d.__right_ = &e; + d.__is_black_ = false; + + c.__parent_ = &d; + c.__left_ = &f; + c.__right_ = 0; + c.__is_black_ = true; + + e.__parent_ = &d; + e.__left_ = 0; + e.__right_ = 0; + e.__is_black_ = true; + + f.__parent_ = &c; + f.__left_ = 0; + f.__right_ = 0; + f.__is_black_ = false; + + std::__tree_remove(root.__left_, &y); + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &d); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(d.__parent_ == &root); + assert(d.__left_ == &f); + assert(d.__right_ == &e); + assert(d.__is_black_ == true); + + assert(f.__parent_ == &d); + assert(f.__left_ == &b); + assert(f.__right_ == &c); + assert(f.__is_black_ == false); + + assert(b.__parent_ == &f); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &f); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + assert(e.__parent_ == &d); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == true); + } + { + // Right + // Case 1 -> Case 3 -> Case 4 + Node root; + Node b; + Node c; + Node d; + Node e; + Node f; + Node y; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__right_ = &y; + b.__left_ = &d; + b.__is_black_ = true; + + y.__parent_ = &b; + y.__right_ = 0; + y.__left_ = 0; + y.__is_black_ = true; + + d.__parent_ = &b; + d.__right_ = &c; + d.__left_ = &e; + d.__is_black_ = false; + + c.__parent_ = &d; + c.__right_ = &f; + c.__left_ = 0; + c.__is_black_ = true; + + e.__parent_ = &d; + e.__right_ = 0; + e.__left_ = 0; + e.__is_black_ = true; + + f.__parent_ = &c; + f.__right_ = 0; + f.__left_ = 0; + f.__is_black_ = false; + + std::__tree_remove(root.__left_, &y); + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &d); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(d.__parent_ == &root); + assert(d.__right_ == &f); + assert(d.__left_ == &e); + assert(d.__is_black_ == true); + + assert(f.__parent_ == &d); + assert(f.__right_ == &b); + assert(f.__left_ == &c); + assert(f.__is_black_ == false); + + assert(b.__parent_ == &f); + assert(b.__right_ == 0); + assert(b.__left_ == 0); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &f); + assert(c.__right_ == 0); + assert(c.__left_ == 0); + assert(c.__is_black_ == true); + + assert(e.__parent_ == &d); + assert(e.__right_ == 0); + assert(e.__left_ == 0); + assert(e.__is_black_ == true); + } +} + +void test2() { + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = true; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = true; + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == 0); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = false; + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == 0); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = true; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = true; + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == 0); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = false; + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == 0); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = true; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = true; + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &c); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == &a); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = false; + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &c); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == &a); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = true; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = true; + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &c); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == &a); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &a); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &root); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = false; + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &c); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == &a); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &a); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &root); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = true; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = true; + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &a); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &root); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = false; + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &a); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &root); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = true; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = true; + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } + { + Node root; + Node a; + Node b; + Node c; + + root.__left_ = &b; + + b.__parent_ = &root; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = false; + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + } +} + +void test3() { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + Node h; + + root.__left_ = &e; + + e.__parent_ = &root; + e.__left_ = &c; + e.__right_ = &g; + e.__is_black_ = true; + + c.__parent_ = &e; + c.__left_ = &b; + c.__right_ = &d; + c.__is_black_ = false; + + g.__parent_ = &e; + g.__left_ = &f; + g.__right_ = &h; + g.__is_black_ = false; + + b.__parent_ = &c; + b.__left_ = &a; + b.__right_ = 0; + b.__is_black_ = true; + + d.__parent_ = &c; + d.__left_ = 0; + d.__right_ = 0; + d.__is_black_ = true; + + f.__parent_ = &g; + f.__left_ = 0; + f.__right_ = 0; + f.__is_black_ = true; + + h.__parent_ = &g; + h.__left_ = 0; + h.__right_ = 0; + h.__is_black_ = true; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = false; + + assert(std::__tree_invariant(root.__left_)); + + std::__tree_remove(root.__left_, &h); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &e); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(e.__parent_ == &root); + assert(e.__left_ == &c); + assert(e.__right_ == &g); + assert(e.__is_black_ == true); + + assert(c.__parent_ == &e); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == false); + + assert(g.__parent_ == &e); + assert(g.__left_ == &f); + assert(g.__right_ == 0); + assert(g.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == true); + + assert(f.__parent_ == &g); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == false); + + std::__tree_remove(root.__left_, &g); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &e); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(e.__parent_ == &root); + assert(e.__left_ == &c); + assert(e.__right_ == &f); + assert(e.__is_black_ == true); + + assert(c.__parent_ == &e); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == false); + + assert(b.__parent_ == &c); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == true); + + assert(f.__parent_ == &e); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == true); + + std::__tree_remove(root.__left_, &f); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &e); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(e.__parent_ == &c); + assert(e.__left_ == &d); + assert(e.__right_ == 0); + assert(e.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(d.__parent_ == &e); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == false); + + std::__tree_remove(root.__left_, &e); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &c); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(c.__parent_ == &root); + assert(c.__left_ == &b); + assert(c.__right_ == &d); + assert(c.__is_black_ == true); + + assert(b.__parent_ == &c); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + assert(d.__parent_ == &c); + assert(d.__left_ == 0); + assert(d.__right_ == 0); + assert(d.__is_black_ == true); + + std::__tree_remove(root.__left_, &d); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &b); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(b.__parent_ == &root); + assert(b.__left_ == &a); + assert(b.__right_ == 0); + assert(b.__is_black_ == true); + + assert(a.__parent_ == &b); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == false); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &a); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(a.__parent_ == &root); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(a.__is_black_ == true); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); +} + +void test4() { + Node root; + Node a; + Node b; + Node c; + Node d; + Node e; + Node f; + Node g; + Node h; + + root.__left_ = &d; + + d.__parent_ = &root; + d.__left_ = &b; + d.__right_ = &f; + d.__is_black_ = true; + + b.__parent_ = &d; + b.__left_ = &a; + b.__right_ = &c; + b.__is_black_ = false; + + f.__parent_ = &d; + f.__left_ = &e; + f.__right_ = &g; + f.__is_black_ = false; + + a.__parent_ = &b; + a.__left_ = 0; + a.__right_ = 0; + a.__is_black_ = true; + + c.__parent_ = &b; + c.__left_ = 0; + c.__right_ = 0; + c.__is_black_ = true; + + e.__parent_ = &f; + e.__left_ = 0; + e.__right_ = 0; + e.__is_black_ = true; + + g.__parent_ = &f; + g.__left_ = 0; + g.__right_ = &h; + g.__is_black_ = true; + + h.__parent_ = &g; + h.__left_ = 0; + h.__right_ = 0; + h.__is_black_ = false; + + assert(std::__tree_invariant(root.__left_)); + + std::__tree_remove(root.__left_, &a); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &d); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(d.__parent_ == &root); + assert(d.__left_ == &b); + assert(d.__right_ == &f); + assert(d.__is_black_ == true); + + assert(b.__parent_ == &d); + assert(b.__left_ == 0); + assert(b.__right_ == &c); + assert(b.__is_black_ == true); + + assert(f.__parent_ == &d); + assert(f.__left_ == &e); + assert(f.__right_ == &g); + assert(f.__is_black_ == false); + + assert(c.__parent_ == &b); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == false); + + assert(e.__parent_ == &f); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == true); + + assert(g.__parent_ == &f); + assert(g.__left_ == 0); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == false); + + std::__tree_remove(root.__left_, &b); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &d); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(d.__parent_ == &root); + assert(d.__left_ == &c); + assert(d.__right_ == &f); + assert(d.__is_black_ == true); + + assert(c.__parent_ == &d); + assert(c.__left_ == 0); + assert(c.__right_ == 0); + assert(c.__is_black_ == true); + + assert(f.__parent_ == &d); + assert(f.__left_ == &e); + assert(f.__right_ == &g); + assert(f.__is_black_ == false); + + assert(e.__parent_ == &f); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == true); + + assert(g.__parent_ == &f); + assert(g.__left_ == 0); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == false); + + std::__tree_remove(root.__left_, &c); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &f); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(f.__parent_ == &root); + assert(f.__left_ == &d); + assert(f.__right_ == &g); + assert(f.__is_black_ == true); + + assert(d.__parent_ == &f); + assert(d.__left_ == 0); + assert(d.__right_ == &e); + assert(d.__is_black_ == true); + + assert(g.__parent_ == &f); + assert(g.__left_ == 0); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(e.__parent_ == &d); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == false); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == false); + + std::__tree_remove(root.__left_, &d); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &f); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(f.__parent_ == &root); + assert(f.__left_ == &e); + assert(f.__right_ == &g); + assert(f.__is_black_ == true); + + assert(e.__parent_ == &f); + assert(e.__left_ == 0); + assert(e.__right_ == 0); + assert(e.__is_black_ == true); + + assert(g.__parent_ == &f); + assert(g.__left_ == 0); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == false); + + std::__tree_remove(root.__left_, &e); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &g); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(g.__parent_ == &root); + assert(g.__left_ == &f); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(f.__parent_ == &g); + assert(f.__left_ == 0); + assert(f.__right_ == 0); + assert(f.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); + + std::__tree_remove(root.__left_, &f); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &g); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(g.__parent_ == &root); + assert(g.__left_ == 0); + assert(g.__right_ == &h); + assert(g.__is_black_ == true); + + assert(h.__parent_ == &g); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == false); + + std::__tree_remove(root.__left_, &g); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == &h); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); + + assert(h.__parent_ == &root); + assert(h.__left_ == 0); + assert(h.__right_ == 0); + assert(h.__is_black_ == true); + + std::__tree_remove(root.__left_, &h); + + assert(std::__tree_invariant(root.__left_)); + + assert(root.__parent_ == 0); + assert(root.__left_ == 0); + assert(root.__right_ == 0); + assert(root.__is_black_ == false); +} + +int main(int, char**) { + test1(); + test2(); + test3(); + test4(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/associative/tree_right_rotate.pass.cpp b/libcxx/test/libcxx-03/containers/associative/tree_right_rotate.pass.cpp new file mode 100644 index 000000000000..19e9a8f46464 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/tree_right_rotate.pass.cpp @@ -0,0 +1,98 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Not a portable test + +// Precondition: __x->__left_ != nullptr +// template <class _NodePtr> +// void +// __tree_right_rotate(_NodePtr __x); + +#include <__cxx03/__tree> +#include <cassert> + +#include "test_macros.h" + +struct Node { + Node* __left_; + Node* __right_; + Node* __parent_; + + Node* __parent_unsafe() const { return __parent_; } + void __set_parent(Node* x) { __parent_ = x; } + + Node() : __left_(), __right_(), __parent_() {} +}; + +void test1() { + Node root; + Node x; + Node y; + root.__left_ = &x; + x.__left_ = &y; + x.__right_ = 0; + x.__parent_ = &root; + y.__left_ = 0; + y.__right_ = 0; + y.__parent_ = &x; + std::__tree_right_rotate(&x); + assert(root.__parent_ == 0); + assert(root.__left_ == &y); + assert(root.__right_ == 0); + assert(y.__parent_ == &root); + assert(y.__left_ == 0); + assert(y.__right_ == &x); + assert(x.__parent_ == &y); + assert(x.__left_ == 0); + assert(x.__right_ == 0); +} + +void test2() { + Node root; + Node x; + Node y; + Node a; + Node b; + Node c; + root.__left_ = &x; + x.__left_ = &y; + x.__right_ = &c; + x.__parent_ = &root; + y.__left_ = &a; + y.__right_ = &b; + y.__parent_ = &x; + a.__parent_ = &y; + b.__parent_ = &y; + c.__parent_ = &x; + std::__tree_right_rotate(&x); + assert(root.__parent_ == 0); + assert(root.__left_ == &y); + assert(root.__right_ == 0); + assert(y.__parent_ == &root); + assert(y.__left_ == &a); + assert(y.__right_ == &x); + assert(x.__parent_ == &y); + assert(x.__left_ == &b); + assert(x.__right_ == &c); + assert(a.__parent_ == &y); + assert(a.__left_ == 0); + assert(a.__right_ == 0); + assert(b.__parent_ == &x); + assert(b.__left_ == 0); + assert(b.__right_ == 0); + assert(c.__parent_ == &x); + assert(c.__left_ == 0); + assert(c.__right_ == 0); +} + +int main(int, char**) { + test1(); + test2(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/associative/unord.map/abi.compile.pass.cpp b/libcxx/test/libcxx-03/containers/associative/unord.map/abi.compile.pass.cpp new file mode 100644 index 000000000000..55d42a8d017e --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/unord.map/abi.compile.pass.cpp @@ -0,0 +1,141 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: libcpp-has-abi-fix-unordered-container-size-type, libcpp-abi-no-compressed-pair-padding + +// std::unique_ptr is used as an implementation detail of the unordered containers, so the layout of +// unordered containers changes when bounded unique_ptr is enabled. +// UNSUPPORTED: libcpp-has-abi-bounded-unique_ptr + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +#include <cstdint> +#include <unordered_map> + +#include "min_allocator.h" +#include "test_allocator.h" +#include "test_macros.h" + +template <class T> +class small_pointer { + std::uint16_t offset; +}; + +template <class T> +class small_iter_allocator { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::uint16_t; + using difference_type = std::int16_t; + + small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + small_iter_allocator(small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(small_iter_allocator, small_iter_allocator) { return true; } + friend bool operator!=(small_iter_allocator, small_iter_allocator) { return false; } +}; + +template <class T> +class final_small_iter_allocator final { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::uint16_t; + using difference_type = std::int16_t; + + final_small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + final_small_iter_allocator(final_small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(final_small_iter_allocator, final_small_iter_allocator) { return true; } + friend bool operator!=(final_small_iter_allocator, final_small_iter_allocator) { return false; } +}; + +template <class T, class Alloc> +using unordered_map_alloc = std::unordered_map<T, T, std::hash<T>, std::equal_to<T>, Alloc>; + +#if __SIZE_WIDTH__ == 64 + +static_assert(sizeof(unordered_map_alloc<int, std::allocator<std::pair<const int, int> > >) == 40, ""); +static_assert(sizeof(unordered_map_alloc<int, min_allocator<std::pair<const int, int> > >) == 40, ""); +static_assert(sizeof(unordered_map_alloc<int, test_allocator<std::pair<const int, int> > >) == 64, ""); +static_assert(sizeof(unordered_map_alloc<int, small_iter_allocator<std::pair<const int, int> > >) == 12, ""); +static_assert(sizeof(unordered_map_alloc<int, final_small_iter_allocator<std::pair<const int, int> > >) == 16, ""); + +static_assert(sizeof(unordered_map_alloc<char, std::allocator<std::pair<const char, char> > >) == 40, ""); +static_assert(sizeof(unordered_map_alloc<char, min_allocator<std::pair<const char, char> > >) == 40, ""); +static_assert(sizeof(unordered_map_alloc<char, test_allocator<std::pair<const char, char> > >) == 64, ""); +static_assert(sizeof(unordered_map_alloc<char, small_iter_allocator<std::pair<const char, char> > >) == 12, ""); +static_assert(sizeof(unordered_map_alloc<char, final_small_iter_allocator<std::pair<const char, char> > >) == 16, ""); + +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, std::allocator<std::pair<const int, int> > >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, min_allocator<std::pair<const int, int> > >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, test_allocator<std::pair<const int, int> > >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, small_iter_allocator<std::pair<const int, int> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, final_small_iter_allocator<std::pair<const int, int> > >) == 4, ""); + +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, std::allocator<std::pair<const char, char> > >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, min_allocator<std::pair<const char, char> > >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, test_allocator<std::pair<const char, char> > >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, small_iter_allocator<std::pair<const char, char> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, final_small_iter_allocator<std::pair<const char, char> > >) == 4, + ""); + +struct TEST_ALIGNAS(32) AlignedHash {}; +struct UnalignedEqualTo {}; + +// This part of the ABI has been broken between LLVM 19 and LLVM 20. +static_assert(sizeof(std::unordered_map<int, int, AlignedHash, UnalignedEqualTo>) == 64, ""); +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, AlignedHash, UnalignedEqualTo>) == 32, ""); + +#elif __SIZE_WIDTH__ == 32 + +static_assert(sizeof(unordered_map_alloc<int, std::allocator<std::pair<const int, int> > >) == 20, ""); +static_assert(sizeof(unordered_map_alloc<int, min_allocator<std::pair<const int, int> > >) == 20, ""); +static_assert(sizeof(unordered_map_alloc<int, test_allocator<std::pair<const int, int> > >) == 44, ""); +static_assert(sizeof(unordered_map_alloc<int, small_iter_allocator<std::pair<const int, int> > >) == 12, ""); +static_assert(sizeof(unordered_map_alloc<int, final_small_iter_allocator<std::pair<const int, int> > >) == 16, ""); + +static_assert(sizeof(unordered_map_alloc<char, std::allocator<std::pair<const char, char> > >) == 20, ""); +static_assert(sizeof(unordered_map_alloc<char, min_allocator<std::pair<const char, char> > >) == 20, ""); +static_assert(sizeof(unordered_map_alloc<char, test_allocator<std::pair<const char, char> > >) == 44, ""); +static_assert(sizeof(unordered_map_alloc<char, small_iter_allocator<std::pair<const char, char> > >) == 12, ""); +static_assert(sizeof(unordered_map_alloc<char, final_small_iter_allocator<std::pair<const char, char> > >) == 16, ""); + +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, std::allocator<std::pair<const int, int> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, min_allocator<std::pair<const int, int> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, test_allocator<std::pair<const int, int> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, small_iter_allocator<std::pair<const int, int> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<int, final_small_iter_allocator<std::pair<const int, int> > >) == 4, ""); + +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, std::allocator<std::pair<const char, char> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, min_allocator<std::pair<const char, char> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, test_allocator<std::pair<const char, char> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, small_iter_allocator<std::pair<const char, char> > >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_map_alloc<char, final_small_iter_allocator<std::pair<const char, char> > >) == 4, + ""); + +struct TEST_ALIGNAS(32) AlignedHash {}; +struct UnalignedEqualTo {}; + +static_assert(sizeof(std::unordered_map<int, int, AlignedHash, UnalignedEqualTo>) == 64); +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, AlignedHash, UnalignedEqualTo>) == 32); + +#else +# error std::size_t has an unexpected size +#endif diff --git a/libcxx/test/libcxx-03/containers/associative/unord.set/abi.compile.pass.cpp b/libcxx/test/libcxx-03/containers/associative/unord.set/abi.compile.pass.cpp new file mode 100644 index 000000000000..bee2012bbea2 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/associative/unord.set/abi.compile.pass.cpp @@ -0,0 +1,139 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: libcpp-has-abi-fix-unordered-container-size-type, libcpp-abi-no-compressed-pair-padding + +// std::unique_ptr is used as an implementation detail of the unordered containers, so the layout of +// unordered containers changes when bounded unique_ptr is enabled. +// UNSUPPORTED: libcpp-has-abi-bounded-unique_ptr + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +#include <cstdint> +#include <unordered_set> + +#include "min_allocator.h" +#include "test_allocator.h" +#include "test_macros.h" + +template <class T> +class small_pointer { + std::uint16_t offset; +}; + +template <class T> +class small_iter_allocator { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::uint16_t; + using difference_type = std::int16_t; + + small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + small_iter_allocator(small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(small_iter_allocator, small_iter_allocator) { return true; } + friend bool operator!=(small_iter_allocator, small_iter_allocator) { return false; } +}; + +template <class T> +class final_small_iter_allocator final { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::uint16_t; + using difference_type = std::int16_t; + + final_small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + final_small_iter_allocator(final_small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(final_small_iter_allocator, final_small_iter_allocator) { return true; } + friend bool operator!=(final_small_iter_allocator, final_small_iter_allocator) { return false; } +}; + +template <class T, class Alloc> +using unordered_set_alloc = std::unordered_set<T, std::hash<T>, std::equal_to<T>, Alloc>; + +#if __SIZE_WIDTH__ == 64 + +static_assert(sizeof(unordered_set_alloc<int, std::allocator<int> >) == 40, ""); +static_assert(sizeof(unordered_set_alloc<int, min_allocator<int> >) == 40, ""); +static_assert(sizeof(unordered_set_alloc<int, test_allocator<int> >) == 64, ""); +static_assert(sizeof(unordered_set_alloc<int, small_iter_allocator<int> >) == 12, ""); +static_assert(sizeof(unordered_set_alloc<int, final_small_iter_allocator<int> >) == 16, ""); + +static_assert(sizeof(unordered_set_alloc<char, std::allocator<char> >) == 40, ""); +static_assert(sizeof(unordered_set_alloc<char, min_allocator<char> >) == 40, ""); +static_assert(sizeof(unordered_set_alloc<char, test_allocator<char> >) == 64, ""); +static_assert(sizeof(unordered_set_alloc<char, small_iter_allocator<char> >) == 12, ""); +static_assert(sizeof(unordered_set_alloc<char, final_small_iter_allocator<char> >) == 16, ""); + +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, std::allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, min_allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, test_allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, small_iter_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, final_small_iter_allocator<int> >) == 4, ""); + +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, std::allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, min_allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, test_allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, small_iter_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, final_small_iter_allocator<char> >) == 4, ""); + +struct TEST_ALIGNAS(32) AlignedHash {}; +struct UnalignedEqualTo {}; + +// This part of the ABI has been broken between LLVM 19 and LLVM 20. +static_assert(sizeof(std::unordered_set<int, AlignedHash, UnalignedEqualTo>) == 64, ""); +static_assert(TEST_ALIGNOF(std::unordered_set<int, AlignedHash, UnalignedEqualTo>) == 32, ""); + +#elif __SIZE_WIDTH__ == 32 + +static_assert(sizeof(unordered_set_alloc<int, std::allocator<int> >) == 20, ""); +static_assert(sizeof(unordered_set_alloc<int, min_allocator<int> >) == 20, ""); +static_assert(sizeof(unordered_set_alloc<int, test_allocator<int> >) == 44, ""); +static_assert(sizeof(unordered_set_alloc<int, small_iter_allocator<int> >) == 12, ""); +static_assert(sizeof(unordered_set_alloc<int, final_small_iter_allocator<int> >) == 16, ""); + +static_assert(sizeof(unordered_set_alloc<char, std::allocator<char> >) == 20, ""); +static_assert(sizeof(unordered_set_alloc<char, min_allocator<char> >) == 20, ""); +static_assert(sizeof(unordered_set_alloc<char, test_allocator<char> >) == 44, ""); +static_assert(sizeof(unordered_set_alloc<char, small_iter_allocator<char> >) == 12, ""); +static_assert(sizeof(unordered_set_alloc<char, final_small_iter_allocator<char> >) == 16, ""); + +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, std::allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, min_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, test_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, small_iter_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<int, final_small_iter_allocator<int> >) == 4, ""); + +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, std::allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, min_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, test_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, small_iter_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(unordered_set_alloc<char, final_small_iter_allocator<char> >) == 4, ""); + +struct TEST_ALIGNAS(32) AlignedHash {}; +struct UnalignedEqualTo {}; + +static_assert(sizeof(std::unordered_set<int, AlignedHash, UnalignedEqualTo>) == 64); +static_assert(TEST_ALIGNOF(std::unordered_set<int, AlignedHash, UnalignedEqualTo>) == 32); + +#else +# error std::size_t has an unexpected size +#endif diff --git a/libcxx/test/libcxx-03/containers/sequences/array/triviality.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/array/triviality.pass.cpp new file mode 100644 index 000000000000..8b0f5a391eb3 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/array/triviality.pass.cpp @@ -0,0 +1,51 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Make sure std::array<T, N> is trivially copyable whenever T is trivially copyable. +// This is not technically mandated by the Standard, but libc++ has been providing +// this property. + +#include <array> +#include <type_traits> + +struct Empty {}; + +struct TrivialCopy { + int i; + double j; +}; + +struct NonTrivialCopy { + NonTrivialCopy(NonTrivialCopy const&) {} + NonTrivialCopy& operator=(NonTrivialCopy const&) { return *this; } +}; + +template <typename T> +void check_trivially_copyable() { + static_assert(std::is_trivially_copyable<std::array<T, 0> >::value, ""); + static_assert(std::is_trivially_copyable<std::array<T, 1> >::value, ""); + static_assert(std::is_trivially_copyable<std::array<T, 2> >::value, ""); + static_assert(std::is_trivially_copyable<std::array<T, 3> >::value, ""); +} + +int main(int, char**) { + check_trivially_copyable<int>(); + check_trivially_copyable<long>(); + check_trivially_copyable<double>(); + check_trivially_copyable<long double>(); + check_trivially_copyable<Empty>(); + check_trivially_copyable<TrivialCopy>(); + + // Check that std::array<T, 0> is still trivially copyable when T is not + static_assert(std::is_trivially_copyable<std::array<NonTrivialCopy, 0> >::value, ""); + static_assert(!std::is_trivially_copyable<std::array<NonTrivialCopy, 1> >::value, ""); + static_assert(!std::is_trivially_copyable<std::array<NonTrivialCopy, 2> >::value, ""); + static_assert(!std::is_trivially_copyable<std::array<NonTrivialCopy, 3> >::value, ""); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/sequences/deque/abi.compile.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/deque/abi.compile.pass.cpp new file mode 100644 index 000000000000..30586d8b2422 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/deque/abi.compile.pass.cpp @@ -0,0 +1,117 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: libcpp-abi-no-compressed-pair-padding + +#include <cstdint> +#include <deque> + +#include "min_allocator.h" +#include "test_allocator.h" +#include "test_macros.h" + +template <class T> +class small_pointer { + std::uint16_t offset; +}; + +template <class T> +class small_iter_allocator { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::uint16_t; + using difference_type = std::int16_t; + + small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + small_iter_allocator(small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(small_iter_allocator, small_iter_allocator) { return true; } + friend bool operator!=(small_iter_allocator, small_iter_allocator) { return false; } +}; + +template <class T> +class final_small_iter_allocator final { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::uint16_t; + using difference_type = std::int16_t; + + final_small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + final_small_iter_allocator(final_small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(final_small_iter_allocator, final_small_iter_allocator) { return true; } + friend bool operator!=(final_small_iter_allocator, final_small_iter_allocator) { return false; } +}; + +#if __SIZE_WIDTH__ == 64 + +static_assert(sizeof(std::deque<int>) == 48, ""); +static_assert(sizeof(std::deque<int, min_allocator<int> >) == 48, ""); +static_assert(sizeof(std::deque<int, test_allocator<int> >) == 80, ""); +static_assert(sizeof(std::deque<int, small_iter_allocator<int> >) == 12, ""); +static_assert(sizeof(std::deque<int, final_small_iter_allocator<int> >) == 16, ""); + +static_assert(sizeof(std::deque<char>) == 48, ""); +static_assert(sizeof(std::deque<char, min_allocator<char> >) == 48, ""); +static_assert(sizeof(std::deque<char, test_allocator<char> >) == 80, ""); +static_assert(sizeof(std::deque<char, small_iter_allocator<char> >) == 12, ""); +static_assert(sizeof(std::deque<char, final_small_iter_allocator<char> >) == 16, ""); + +static_assert(TEST_ALIGNOF(std::deque<int>) == 8, ""); +static_assert(TEST_ALIGNOF(std::deque<int, min_allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::deque<int, test_allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::deque<int, small_iter_allocator<int> >) == 2, ""); +static_assert(TEST_ALIGNOF(std::deque<int, final_small_iter_allocator<int> >) == 2, ""); + +static_assert(TEST_ALIGNOF(std::deque<char>) == 8, ""); +static_assert(TEST_ALIGNOF(std::deque<char, min_allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::deque<char, test_allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::deque<char, small_iter_allocator<char> >) == 2, ""); +static_assert(TEST_ALIGNOF(std::deque<char, final_small_iter_allocator<char> >) == 2, ""); + +#elif __SIZE_WIDTH__ == 32 + +static_assert(sizeof(std::deque<int>) == 24, ""); +static_assert(sizeof(std::deque<int, min_allocator<int> >) == 24, ""); +static_assert(sizeof(std::deque<int, test_allocator<int> >) == 48, ""); +static_assert(sizeof(std::deque<int, small_iter_allocator<int> >) == 12, ""); +static_assert(sizeof(std::deque<int, final_small_iter_allocator<int> >) == 16, ""); + +static_assert(sizeof(std::deque<char>) == 24, ""); +static_assert(sizeof(std::deque<char, min_allocator<char> >) == 24, ""); +static_assert(sizeof(std::deque<char, test_allocator<char> >) == 48, ""); +static_assert(sizeof(std::deque<char, small_iter_allocator<char> >) == 12, ""); +static_assert(sizeof(std::deque<char, final_small_iter_allocator<char> >) == 16, ""); + +static_assert(TEST_ALIGNOF(std::deque<int>) == 4, ""); +static_assert(TEST_ALIGNOF(std::deque<int, min_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::deque<int, test_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::deque<int, small_iter_allocator<int> >) == 2, ""); +static_assert(TEST_ALIGNOF(std::deque<int, final_small_iter_allocator<int> >) == 2, ""); + +static_assert(TEST_ALIGNOF(std::deque<char>) == 4, ""); +static_assert(TEST_ALIGNOF(std::deque<char, min_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::deque<char, test_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::deque<char, small_iter_allocator<char> >) == 2, ""); +static_assert(TEST_ALIGNOF(std::deque<char, final_small_iter_allocator<char> >) == 2, ""); + +#else +# error std::size_t has an unexpected size +#endif diff --git a/libcxx/test/libcxx-03/containers/sequences/deque/asan.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/deque/asan.pass.cpp new file mode 100644 index 000000000000..46ca62dda7b2 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/deque/asan.pass.cpp @@ -0,0 +1,68 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: asan + +// <deque> + +// reference operator[](size_type n); + +#include "asan_testing.h" +#include <deque> +#include <cassert> +#include <cstdlib> + +#include "min_allocator.h" +#include "test_iterators.h" +#include "test_macros.h" + +extern "C" void __sanitizer_set_death_callback(void (*callback)(void)); + +void do_exit() { exit(0); } + +int main(int, char**) { + { + typedef cpp17_input_iterator<int*> MyInputIter; + // Should not trigger ASan. + std::deque<int> v; + int i[] = {42}; + v.insert(v.begin(), MyInputIter(i), MyInputIter(i + 1)); + assert(v[0] == 42); + assert(is_double_ended_contiguous_container_asan_correct(v)); + } + { + typedef int T; + typedef std::deque<T, min_allocator<T> > C; + const T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; + C c(std::begin(t), std::end(t)); + assert(is_double_ended_contiguous_container_asan_correct(c)); + } + { + typedef char T; + typedef std::deque<T, safe_allocator<T> > C; + const T t[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; + C c(std::begin(t), std::end(t)); + c.pop_front(); + assert(is_double_ended_contiguous_container_asan_correct(c)); + } + __sanitizer_set_death_callback(do_exit); + { + typedef int T; + typedef std::deque<T> C; + const T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; + C c(std::begin(t), std::end(t)); + assert(is_double_ended_contiguous_container_asan_correct(c)); + T* ptr = &c[0]; + for (size_t i = 0; i < (8 + sizeof(T) - 1) / sizeof(T); ++i) + c.pop_front(); + *ptr = 1; + volatile T foo = c[c.size()]; // should trigger ASAN. Use volatile to prevent being optimized away. + assert(false); // if we got here, ASAN didn't trigger + ((void)foo); + } +} diff --git a/libcxx/test/libcxx-03/containers/sequences/deque/asan_caterpillar.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/deque/asan_caterpillar.pass.cpp new file mode 100644 index 000000000000..1701b89c72d8 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/deque/asan_caterpillar.pass.cpp @@ -0,0 +1,53 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <deque> + +// Regression test to error in deque::__annotate_from_to in deque, +// with origin in deque::__add_back_capacity. + +// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support. +// REQUIRES: has-unix-headers +// UNSUPPORTED: c++03, no-localization + +#include <deque> +#include <cstdio> +#include "check_assertion.h" + +void test1() { + std::deque<char> test; + char buff[100000]; + test.insert(test.begin(), buff, buff + 64000); + + for (int i = 0; i < 1100; i += 1) { + test.insert(test.begin(), buff, buff + 320); + test.erase(test.end() - 320, test.end()); + } + + test.insert(test.begin(), buff, buff + 32000); +} + +void test2() { + std::deque<char> test; + char buff[100000]; + test.insert(test.end(), buff, buff + 64000); + + for (int i = 0; i < 1100; i += 1) { + test.insert(test.end(), buff, buff + 320); + test.erase(test.begin(), test.begin() + 320); + } + + test.insert(test.end(), buff, buff + 32000); +} + +int main(int, char**) { + test1(); + test2(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/sequences/deque/segmented_iterator.compile.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/deque/segmented_iterator.compile.pass.cpp new file mode 100644 index 000000000000..7ae67d8d0252 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/deque/segmented_iterator.compile.pass.cpp @@ -0,0 +1,12 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <deque> + +using DequeIterator = typename std::deque<int>::iterator; +static_assert(std::__is_segmented_iterator<DequeIterator>::value, ""); diff --git a/libcxx/test/libcxx-03/containers/sequences/list/abi.compile.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/list/abi.compile.pass.cpp new file mode 100644 index 000000000000..a16ae1d52792 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/list/abi.compile.pass.cpp @@ -0,0 +1,87 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <cstdint> +#include <list> + +#include "min_allocator.h" +#include "test_allocator.h" +#include "test_macros.h" + +template <class T> +class small_pointer { + std::uint16_t offset; +}; + +template <class T> +class small_iter_allocator { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::int16_t; + using difference_type = std::int16_t; + + small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + small_iter_allocator(small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(small_iter_allocator, small_iter_allocator) { return true; } + friend bool operator!=(small_iter_allocator, small_iter_allocator) { return false; } +}; + +#if __SIZE_WIDTH__ == 64 + +static_assert(sizeof(std::list<int>) == 24, ""); +static_assert(sizeof(std::list<int, min_allocator<int> >) == 24, ""); +static_assert(sizeof(std::list<int, test_allocator<int> >) == 40, ""); +static_assert(sizeof(std::list<int, small_iter_allocator<int> >) == 6, ""); + +static_assert(sizeof(std::list<char>) == 24, ""); +static_assert(sizeof(std::list<char, min_allocator<char> >) == 24, ""); +static_assert(sizeof(std::list<char, test_allocator<char> >) == 40, ""); +static_assert(sizeof(std::list<char, small_iter_allocator<char> >) == 6, ""); + +static_assert(TEST_ALIGNOF(std::list<int>) == 8, ""); +static_assert(TEST_ALIGNOF(std::list<int, min_allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::list<int, test_allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::list<int, small_iter_allocator<int> >) == 2, ""); + +static_assert(TEST_ALIGNOF(std::list<char>) == 8, ""); +static_assert(TEST_ALIGNOF(std::list<char, min_allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::list<char, test_allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::list<char, small_iter_allocator<char> >) == 2, ""); + +#elif __SIZE_WIDTH__ == 32 + +static_assert(sizeof(std::list<int>) == 12, ""); +static_assert(sizeof(std::list<int, min_allocator<int> >) == 12, ""); +static_assert(sizeof(std::list<int, test_allocator<int> >) == 24, ""); +static_assert(sizeof(std::list<int, small_iter_allocator<int> >) == 6, ""); + +static_assert(sizeof(std::list<char>) == 12, ""); +static_assert(sizeof(std::list<char, min_allocator<char> >) == 12, ""); +static_assert(sizeof(std::list<char, test_allocator<char> >) == 24, ""); +static_assert(sizeof(std::list<char, small_iter_allocator<char> >) == 6, ""); + +static_assert(TEST_ALIGNOF(std::list<int>) == 4, ""); +static_assert(TEST_ALIGNOF(std::list<int, min_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::list<int, test_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::list<int, small_iter_allocator<int> >) == 2, ""); + +static_assert(TEST_ALIGNOF(std::list<char>) == 4, ""); +static_assert(TEST_ALIGNOF(std::list<char, min_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::list<char, test_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::list<char, small_iter_allocator<char> >) == 2, ""); + +#else +# error std::size_t has an unexpected size +#endif diff --git a/libcxx/test/libcxx-03/containers/sequences/vector.bool/abi.compile.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/vector.bool/abi.compile.pass.cpp new file mode 100644 index 000000000000..cc6b0d94e7da --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/vector.bool/abi.compile.pass.cpp @@ -0,0 +1,69 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: libcpp-abi-no-compressed-pair-padding + +#include <cstdint> +#include <vector> + +#include "min_allocator.h" +#include "test_allocator.h" +#include "test_macros.h" + +template <class T> +class small_pointer { + std::uint16_t offset; +}; + +template <class T> +class small_iter_allocator { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::int16_t; + using difference_type = std::int16_t; + + small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + small_iter_allocator(small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(small_iter_allocator, small_iter_allocator) { return true; } + friend bool operator!=(small_iter_allocator, small_iter_allocator) { return false; } +}; + +#if __SIZE_WIDTH__ == 64 + +static_assert(sizeof(std::vector<bool>) == 24, ""); +static_assert(sizeof(std::vector<bool, min_allocator<bool> >) == 24, ""); +static_assert(sizeof(std::vector<bool, test_allocator<bool> >) == 40, ""); +static_assert(sizeof(std::vector<bool, small_iter_allocator<bool> >) == 6, ""); + +static_assert(TEST_ALIGNOF(std::vector<bool>) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<bool, min_allocator<bool> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<bool, test_allocator<bool> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<bool, small_iter_allocator<bool> >) == 2, ""); + +#elif __SIZE_WIDTH__ == 32 + +static_assert(sizeof(std::vector<bool>) == 12, ""); +static_assert(sizeof(std::vector<bool, min_allocator<bool> >) == 12, ""); +static_assert(sizeof(std::vector<bool, test_allocator<bool> >) == 24, ""); +static_assert(sizeof(std::vector<bool, small_iter_allocator<bool> >) == 6, ""); + +static_assert(TEST_ALIGNOF(std::vector<bool>) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<bool, min_allocator<bool> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<bool, test_allocator<bool> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<bool, small_iter_allocator<bool> >) == 2, ""); + +#else +# error std::size_t has an unexpected size +#endif diff --git a/libcxx/test/libcxx-03/containers/sequences/vector/abi.compile.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/vector/abi.compile.pass.cpp new file mode 100644 index 000000000000..57684951c8e8 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/vector/abi.compile.pass.cpp @@ -0,0 +1,95 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <cstdint> +#include <vector> + +#include "min_allocator.h" +#include "test_allocator.h" +#include "test_macros.h" + +template <class T> +class small_pointer { +public: + using value_type = T; + using difference_type = std::int16_t; + using pointer = small_pointer; + using reference = T&; + using iterator_category = std::random_access_iterator_tag; + +private: + std::uint16_t offset; +}; + +template <class T> +class small_iter_allocator { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::int16_t; + using difference_type = std::int16_t; + + small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + small_iter_allocator(small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(small_iter_allocator, small_iter_allocator) { return true; } + friend bool operator!=(small_iter_allocator, small_iter_allocator) { return false; } +}; + +#if __SIZE_WIDTH__ == 64 + +static_assert(sizeof(std::vector<int>) == 24, ""); +static_assert(sizeof(std::vector<int, min_allocator<int> >) == 24, ""); +static_assert(sizeof(std::vector<int, test_allocator<int> >) == 40, ""); +static_assert(sizeof(std::vector<int, small_iter_allocator<int> >) == 6, ""); + +static_assert(sizeof(std::vector<char>) == 24, ""); +static_assert(sizeof(std::vector<char, min_allocator<char> >) == 24, ""); +static_assert(sizeof(std::vector<char, test_allocator<char> >) == 40, ""); +static_assert(sizeof(std::vector<char, small_iter_allocator<char> >) == 6, ""); + +static_assert(TEST_ALIGNOF(std::vector<int>) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<int, min_allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<int, test_allocator<int> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<int, small_iter_allocator<int> >) == 2, ""); + +static_assert(TEST_ALIGNOF(std::vector<char>) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<char, min_allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<char, test_allocator<char> >) == 8, ""); +static_assert(TEST_ALIGNOF(std::vector<char, small_iter_allocator<char> >) == 2, ""); + +#elif __SIZE_WIDTH__ == 32 + +static_assert(sizeof(std::vector<int>) == 12, ""); +static_assert(sizeof(std::vector<int, min_allocator<int> >) == 12, ""); +static_assert(sizeof(std::vector<int, test_allocator<int> >) == 24, ""); +static_assert(sizeof(std::vector<int, small_iter_allocator<int> >) == 6, ""); + +static_assert(sizeof(std::vector<char>) == 12, ""); +static_assert(sizeof(std::vector<char, min_allocator<char> >) == 12, ""); +static_assert(sizeof(std::vector<char, test_allocator<char> >) == 24, ""); +static_assert(sizeof(std::vector<char, small_iter_allocator<char> >) == 6, ""); + +static_assert(TEST_ALIGNOF(std::vector<int>) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<int, min_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<int, test_allocator<int> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<int, small_iter_allocator<int> >) == 2, ""); + +static_assert(TEST_ALIGNOF(std::vector<char>) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<char, min_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<char, test_allocator<char> >) == 4, ""); +static_assert(TEST_ALIGNOF(std::vector<char, small_iter_allocator<char> >) == 2, ""); + +#else +# error std::size_t has an unexpected size +#endif diff --git a/libcxx/test/libcxx-03/containers/sequences/vector/asan.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/vector/asan.pass.cpp new file mode 100644 index 000000000000..03d2b3e6ce9b --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/vector/asan.pass.cpp @@ -0,0 +1,76 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: asan + +// <vector> + +// reference operator[](size_type n); + +#include <vector> +#include <cassert> +#include <cstdlib> + +#include "asan_testing.h" +#include "min_allocator.h" +#include "test_iterators.h" +#include "test_macros.h" + +extern "C" void __sanitizer_set_death_callback(void (*callback)(void)); + +void do_exit() { exit(0); } + +int main(int, char**) { +#if TEST_STD_VER >= 11 + { + typedef int T; + typedef cpp17_input_iterator<T*> MyInputIter; + std::vector<T, min_allocator<T>> v; + v.reserve(1); + int i[] = {42}; + v.insert(v.begin(), MyInputIter(i), MyInputIter(i + 1)); + assert(v[0] == 42); + assert(is_contiguous_container_asan_correct(v)); + } + { + typedef char T; + typedef cpp17_input_iterator<T*> MyInputIter; + std::vector<T, unaligned_allocator<T>> v; + v.reserve(1); + char i[] = {'a', 'b'}; + v.insert(v.begin(), MyInputIter(i), MyInputIter(i + 2)); + assert(v[0] == 'a'); + assert(v[1] == 'b'); + assert(is_contiguous_container_asan_correct(v)); + } +#endif // TEST_STD_VER >= 11 + { + typedef cpp17_input_iterator<int*> MyInputIter; + // Sould not trigger ASan. + std::vector<int> v; + v.reserve(1); + int i[] = {42}; + v.insert(v.begin(), MyInputIter(i), MyInputIter(i + 1)); + assert(v[0] == 42); + assert(is_contiguous_container_asan_correct(v)); + } + + __sanitizer_set_death_callback(do_exit); + { + typedef int T; + typedef std::vector<T> C; + const T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; + C c(std::begin(t), std::end(t)); + c.reserve(2 * c.size()); + assert(is_contiguous_container_asan_correct(c)); + assert(!__sanitizer_verify_contiguous_container(c.data(), c.data() + 1, c.data() + c.capacity())); + volatile T foo = c[c.size()]; // should trigger ASAN. Use volatile to prevent being optimized away. + assert(false); // if we got here, ASAN didn't trigger + ((void)foo); + } +} diff --git a/libcxx/test/libcxx-03/containers/sequences/vector/asan_throw.pass.cpp b/libcxx/test/libcxx-03/containers/sequences/vector/asan_throw.pass.cpp new file mode 100644 index 000000000000..dcfa8029cfc0 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/vector/asan_throw.pass.cpp @@ -0,0 +1,233 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: no-exceptions +// Test asan vector annotations with a class that throws in a CTOR. + +#include <vector> +#include <cassert> + +#include "test_macros.h" +#include "asan_testing.h" + +class X { +public: + X(const X& x) { Init(x.a); } + X(char arg) { Init(arg); } + X() { Init(42); } + X& operator=(const X& x) { + Init(x.a); + return *this; + } + void Init(char arg) { + if (arg == 42) + throw 0; + if (arg == 66) + arg = 42; + a = arg; + } + char get() const { return a; } + void set(char arg) { a = arg; } + +private: + char a; +}; + +class ThrowOnCopy { +public: + ThrowOnCopy() : should_throw(false) {} + explicit ThrowOnCopy(bool xshould_throw) : should_throw(xshould_throw) {} + + ThrowOnCopy(ThrowOnCopy const& other) : should_throw(other.should_throw) { + if (should_throw) { + throw 0; + } + } + ThrowOnCopy& operator=(ThrowOnCopy const&) = default; + + bool should_throw; +}; + +void test_push_back() { + std::vector<X> v; + v.reserve(2); + v.push_back(X(2)); + assert(v.size() == 1); + try { + v.push_back(X(66)); + assert(0); + } catch (int e) { + assert(v.size() == 1); + } + assert(v.size() == 1); + assert(is_contiguous_container_asan_correct(v)); +} + +void test_emplace_back() { +#if TEST_STD_VER >= 11 + std::vector<X> v; + v.reserve(2); + v.push_back(X(2)); + assert(v.size() == 1); + try { + v.emplace_back(42); + assert(0); + } catch (int e) { + assert(v.size() == 1); + } + assert(v.size() == 1); + assert(is_contiguous_container_asan_correct(v)); +#endif +} + +void test_insert_range() { + std::vector<X> v; + v.reserve(4); + v.push_back(X(1)); + v.push_back(X(2)); + assert(v.size() == 2); + assert(v.capacity() >= 4); + try { + char a[2] = {21, 42}; + v.insert(v.end(), a, a + 2); + assert(0); + } catch (int e) { + assert(v.size() == 2); + } + assert(v.size() == 2); + assert(is_contiguous_container_asan_correct(v)); +} + +void test_insert() { + std::vector<X> v; + v.reserve(3); + v.insert(v.end(), X(1)); + v.insert(v.begin(), X(2)); + assert(v.size() == 2); + try { + v.insert(v.end(), X(66)); + assert(0); + } catch (int e) { + assert(v.size() == 2); + } + assert(v.size() == 2); + assert(is_contiguous_container_asan_correct(v)); +} + +void test_emplace() { +#if TEST_STD_VER >= 11 + std::vector<X> v; + v.reserve(3); + v.insert(v.end(), X(1)); + v.insert(v.begin(), X(2)); + assert(v.size() == 2); + try { + v.emplace(v.end(), 42); + assert(0); + } catch (int e) { + assert(v.size() == 2); + } + assert(v.size() == 2); + assert(is_contiguous_container_asan_correct(v)); +#endif +} + +void test_insert_range2() { + std::vector<X> v; + v.reserve(4); + v.insert(v.end(), X(1)); + v.insert(v.begin(), X(2)); + assert(v.size() == 2); + assert(v.capacity() >= 4); + try { + char a[2] = {10, 42}; + v.insert(v.begin(), a, a + 2); + assert(0); + } catch (int e) { + assert(v.size() <= 4); + assert(is_contiguous_container_asan_correct(v)); + return; + } + assert(0); +} + +void test_insert_n() { + std::vector<X> v; + v.reserve(10); + v.insert(v.end(), X(1)); + v.insert(v.begin(), X(2)); + assert(v.size() == 2); + try { + v.insert(v.begin(), 1, X(66)); + assert(0); + } catch (int e) { + assert(v.size() <= 3); + assert(is_contiguous_container_asan_correct(v)); + return; + } + assert(0); +} + +void test_insert_n2() { + std::vector<ThrowOnCopy> v(10); + v.reserve(100); + assert(v.size() == 10); + v[6].should_throw = true; + try { + v.insert(v.cbegin(), 5, ThrowOnCopy()); + assert(0); + } catch (int e) { + assert(v.size() == 11); + assert(is_contiguous_container_asan_correct(v)); + return; + } + assert(0); +} + +void test_resize() { + std::vector<X> v; + v.reserve(3); + v.push_back(X(0)); + try { + v.resize(3); + assert(0); + } catch (int e) { + assert(v.size() == 1); + } + assert(v.size() == 1); + assert(is_contiguous_container_asan_correct(v)); +} + +void test_resize_param() { + std::vector<X> v; + v.reserve(3); + v.push_back(X(0)); + try { + v.resize(3, X(66)); + assert(0); + } catch (int e) { + assert(v.size() == 1); + } + assert(v.size() == 1); + assert(is_contiguous_container_asan_correct(v)); +} + +int main(int, char**) { + test_push_back(); + test_emplace_back(); + test_insert_range(); + test_insert(); + test_emplace(); + test_insert_range2(); + test_insert_n(); + test_insert_n2(); + test_resize(); + test_resize_param(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/sequences/vector/invalid_allocator.verify.cpp b/libcxx/test/libcxx-03/containers/sequences/vector/invalid_allocator.verify.cpp new file mode 100644 index 000000000000..e2de7730f259 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/sequences/vector/invalid_allocator.verify.cpp @@ -0,0 +1,29 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Check that vector diagnoses an allocator which has to implement rebind with an appropriate error message + +#include <vector> + +class FooAllocator { +public: + using value_type = int; + FooAllocator() = default; + + int* allocate(int num_objects); + + void deallocate(int* ptr, int num_objects); + + bool operator==(const FooAllocator&) const { return true; } + bool operator!=(const FooAllocator&) const { return false; } +}; + +void func() { + std::vector<int, FooAllocator> + v; //expected-error-re@*:* {{static assertion failed {{.*}}This allocator has to implement rebind}} +} diff --git a/libcxx/test/libcxx-03/containers/unord/key_value_traits.pass.cpp b/libcxx/test/libcxx-03/containers/unord/key_value_traits.pass.cpp new file mode 100644 index 000000000000..a11788479106 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/unord/key_value_traits.pass.cpp @@ -0,0 +1,58 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <__cxx03/__hash_table> +#include <unordered_map> +#include <unordered_set> +#include <type_traits> + +#include "test_macros.h" +#include "min_allocator.h" + +void testKeyValueTrait() { + { + typedef int Tp; + typedef std::__hash_key_value_types<Tp> Traits; + static_assert((std::is_same<Traits::key_type, int>::value), ""); + static_assert((std::is_same<Traits::__node_value_type, Tp>::value), ""); + static_assert((std::is_same<Traits::__container_value_type, Tp>::value), ""); + static_assert(Traits::__is_map == false, ""); + } + { + typedef std::pair<int, int> Tp; + typedef std::__hash_key_value_types<Tp> Traits; + static_assert((std::is_same<Traits::key_type, Tp>::value), ""); + static_assert((std::is_same<Traits::__node_value_type, Tp>::value), ""); + static_assert((std::is_same<Traits::__container_value_type, Tp>::value), ""); + static_assert(Traits::__is_map == false, ""); + } + { + typedef std::pair<const int, int> Tp; + typedef std::__hash_key_value_types<Tp> Traits; + static_assert((std::is_same<Traits::key_type, Tp>::value), ""); + static_assert((std::is_same<Traits::__node_value_type, Tp>::value), ""); + static_assert((std::is_same<Traits::__container_value_type, Tp>::value), ""); + static_assert(Traits::__is_map == false, ""); + } + { + typedef std::__hash_value_type<int, int> Tp; + typedef std::__hash_key_value_types<Tp> Traits; + static_assert((std::is_same<Traits::key_type, int>::value), ""); + static_assert((std::is_same<Traits::mapped_type, int>::value), ""); + static_assert((std::is_same<Traits::__node_value_type, Tp>::value), ""); + static_assert((std::is_same<Traits::__container_value_type, std::pair<const int, int> >::value), ""); + static_assert((std::is_same<Traits::__map_value_type, std::pair<const int, int> >::value), ""); + static_assert(Traits::__is_map == true, ""); + } +} + +int main(int, char**) { + testKeyValueTrait(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/containers/unord/next_prime.pass.cpp b/libcxx/test/libcxx-03/containers/unord/next_prime.pass.cpp new file mode 100644 index 000000000000..3ca8d27d17a0 --- /dev/null +++ b/libcxx/test/libcxx-03/containers/unord/next_prime.pass.cpp @@ -0,0 +1,49 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// REQUIRES: long_tests + +// Not a portable test + +// <__hash_table> + +// size_t __next_prime(size_t n); + +// If n == 0, return 0, else return the lowest prime greater than or equal to n + +#include <__cxx03/__hash_table> +#include <cassert> +#include <cstddef> + +#include "test_macros.h" + +bool is_prime(std::size_t n) { + switch (n) { + case 0: + case 1: + return false; + } + for (std::size_t i = 2; i * i <= n; ++i) { + if (n % i == 0) + return false; + } + return true; +} + +int main(int, char**) { + assert(std::__next_prime(0) == 0); + for (std::size_t n = 1; n <= 100000; ++n) { + std::size_t p = std::__next_prime(n); + assert(p >= n); + for (std::size_t i = n; i < p; ++i) + assert(!is_prime(i)); + assert(is_prime(p)); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp b/libcxx/test/libcxx-03/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp new file mode 100644 index 000000000000..cad0bd8b304e --- /dev/null +++ b/libcxx/test/libcxx-03/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// template <class X> +// class auto_ptr; +// +// In C++17, auto_ptr has been removed. +// However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR +// is defined before including <memory>, then auto_ptr will be restored. + +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + +#include <memory> +#include <type_traits> + +#include "test_macros.h" + +int main(int, char**) +{ + std::auto_ptr<int> p; + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/address.cxx20.pass.cpp b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/address.cxx20.pass.cpp new file mode 100644 index 000000000000..d9a65eee4c13 --- /dev/null +++ b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/address.cxx20.pass.cpp @@ -0,0 +1,44 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// allocator: +// pointer address(reference x) const; +// const_pointer address(const_reference x) const; + +// Removed in C++20, deprecated in C++17. + +// REQUIRES: c++03 || c++11 || c++14 || c++17 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + +#include <memory> +#include <cassert> + +#include "test_macros.h" + +template <class T> +void test_address() { + T* tp = new T(); + const T* ctp = tp; + const std::allocator<T> a; + assert(a.address(*tp) == tp); + assert(a.address(*ctp) == tp); + delete tp; +} + +struct A { + void operator&() const {} +}; + +int main(int, char**) { + test_address<int>(); + test_address<A>(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/allocate.cxx20.pass.cpp b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/allocate.cxx20.pass.cpp new file mode 100644 index 000000000000..8fc6628ebfba --- /dev/null +++ b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/allocate.cxx20.pass.cpp @@ -0,0 +1,92 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// allocator: +// T* allocate(size_t n, const void* hint); + +// Removed in C++20, deprecated in C++17. + +// REQUIRES: c++03 || c++11 || c++14 || c++17 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + +#include <memory> +#include <cassert> +#include <cstddef> // for std::max_align_t + +#include "test_macros.h" +#include "count_new.h" + +#ifdef TEST_HAS_NO_ALIGNED_ALLOCATION +static const bool UsingAlignedNew = false; +#else +static const bool UsingAlignedNew = true; +#endif + +#ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__ +static const std::size_t MaxAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__; +#else +static const std::size_t MaxAligned = std::alignment_of<std::max_align_t>::value; +#endif + +static const std::size_t OverAligned = MaxAligned * 2; + +template <std::size_t Align> +struct TEST_ALIGNAS(Align) AlignedType { + char data; + static int constructed; + AlignedType() { ++constructed; } + AlignedType(AlignedType const&) { ++constructed; } + ~AlignedType() { --constructed; } +}; +template <std::size_t Align> +int AlignedType<Align>::constructed = 0; + +template <std::size_t Align> +void test_aligned() { + typedef AlignedType<Align> T; + T::constructed = 0; + globalMemCounter.reset(); + std::allocator<T> a; + const bool IsOverAlignedType = Align > MaxAligned; + const bool ExpectAligned = IsOverAlignedType && UsingAlignedNew; + { + globalMemCounter.last_new_size = 0; + globalMemCounter.last_new_align = 0; + T* ap2 = a.allocate(11, (const void*)5); + DoNotOptimize(ap2); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(globalMemCounter.checkNewCalledEq(1)); + assert(globalMemCounter.checkAlignedNewCalledEq(ExpectAligned)); + assert(globalMemCounter.checkLastNewSizeEq(11 * sizeof(T))); + assert(globalMemCounter.checkLastNewAlignEq(ExpectAligned ? Align : 0)); + assert(T::constructed == 0); + globalMemCounter.last_delete_align = 0; + a.deallocate(ap2, 11); + DoNotOptimize(ap2); + assert(globalMemCounter.checkOutstandingNewEq(0)); + assert(globalMemCounter.checkDeleteCalledEq(1)); + assert(globalMemCounter.checkAlignedDeleteCalledEq(ExpectAligned)); + assert(globalMemCounter.checkLastDeleteAlignEq(ExpectAligned ? Align : 0)); + assert(T::constructed == 0); + } +} + +int main(int, char**) { + test_aligned<1>(); + test_aligned<2>(); + test_aligned<4>(); + test_aligned<8>(); + test_aligned<16>(); + test_aligned<MaxAligned>(); + test_aligned<OverAligned>(); + test_aligned<OverAligned * 2>(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/construct.cxx20.pass.cpp b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/construct.cxx20.pass.cpp new file mode 100644 index 000000000000..9a37cf8af8e6 --- /dev/null +++ b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/construct.cxx20.pass.cpp @@ -0,0 +1,147 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// allocator: +// template <class... Args> void construct(pointer p, Args&&... args); + +// In C++20, parts of std::allocator<T> have been removed. +// In C++17, they were deprecated. +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS +// REQUIRES: c++03 || c++11 || c++14 || c++17 + +#include <memory> +#include <cassert> + +#include "test_macros.h" +#include "count_new.h" + +int A_constructed = 0; + +struct A { + int data; + A() { ++A_constructed; } + + A(const A&) { ++A_constructed; } + + explicit A(int) { ++A_constructed; } + A(int, int*) { ++A_constructed; } + + ~A() { --A_constructed; } +}; + +int move_only_constructed = 0; + +#if TEST_STD_VER >= 11 +class move_only { + move_only(const move_only&) = delete; + move_only& operator=(const move_only&) = delete; + +public: + move_only(move_only&&) { ++move_only_constructed; } + move_only& operator=(move_only&&) { return *this; } + + move_only() { ++move_only_constructed; } + ~move_only() { --move_only_constructed; } + +public: + int data; // unused other than to make sizeof(move_only) == sizeof(int). + // but public to suppress "-Wunused-private-field" +}; +#endif // TEST_STD_VER >= 11 + +int main(int, char**) { + globalMemCounter.reset(); + { + std::allocator<A> a; + assert(globalMemCounter.checkOutstandingNewEq(0)); + assert(A_constructed == 0); + + globalMemCounter.last_new_size = 0; + A* ap = a.allocate(3); + DoNotOptimize(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(globalMemCounter.checkLastNewSizeEq(3 * sizeof(int))); + assert(A_constructed == 0); + + a.construct(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(A_constructed == 1); + + a.destroy(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(A_constructed == 0); + + a.construct(ap, A()); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(A_constructed == 1); + + a.destroy(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(A_constructed == 0); + + a.construct(ap, 5); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(A_constructed == 1); + + a.destroy(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(A_constructed == 0); + + a.construct(ap, 5, (int*)0); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(A_constructed == 1); + + a.destroy(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(A_constructed == 0); + + a.deallocate(ap, 3); + DoNotOptimize(ap); + assert(globalMemCounter.checkOutstandingNewEq(0)); + assert(A_constructed == 0); + } +#if TEST_STD_VER >= 11 + { + std::allocator<move_only> a; + assert(globalMemCounter.checkOutstandingNewEq(0)); + assert(move_only_constructed == 0); + + globalMemCounter.last_new_size = 0; + move_only* ap = a.allocate(3); + DoNotOptimize(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(globalMemCounter.checkLastNewSizeEq(3 * sizeof(int))); + assert(move_only_constructed == 0); + + a.construct(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(move_only_constructed == 1); + + a.destroy(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(move_only_constructed == 0); + + a.construct(ap, move_only()); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(move_only_constructed == 1); + + a.destroy(ap); + assert(globalMemCounter.checkOutstandingNewEq(1)); + assert(move_only_constructed == 0); + + a.deallocate(ap, 3); + DoNotOptimize(ap); + assert(globalMemCounter.checkOutstandingNewEq(0)); + assert(move_only_constructed == 0); + } +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/max_size.cxx20.pass.cpp b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/max_size.cxx20.pass.cpp new file mode 100644 index 000000000000..92e3b919b0f7 --- /dev/null +++ b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator.members/max_size.cxx20.pass.cpp @@ -0,0 +1,34 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// allocator: +// size_type max_size() const throw(); + +// Removed in C++20, deprecated in C++17. + +// REQUIRES: c++03 || c++11 || c++14 || c++17 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + +#include <memory> +#include <limits> +#include <cstddef> +#include <cassert> + +#include "test_macros.h" + +int new_called = 0; + +int main(int, char**) { + const std::allocator<int> a; + std::size_t M = a.max_size(); + assert(M > 0xFFFF && M <= (std::numeric_limits<std::size_t>::max() / sizeof(int))); + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator_types.cxx20.pass.cpp b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator_types.cxx20.pass.cpp new file mode 100644 index 000000000000..e462e07d896c --- /dev/null +++ b/libcxx/test/libcxx-03/depr/depr.default.allocator/allocator_types.cxx20.pass.cpp @@ -0,0 +1,53 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// Check that the following types are provided regardless of the Standard when +// we request them from libc++. + +// template <class T> +// class allocator +// { +// public: +// typedef size_t size_type; +// typedef ptrdiff_t difference_type; +// typedef T* pointer; +// typedef const T* const_pointer; +// typedef typename add_lvalue_reference<T>::type reference; +// typedef typename add_lvalue_reference<const T>::type const_reference; +// +// template <class U> struct rebind {typedef allocator<U> other;}; +// ... +// }; + +// Removed in C++20, deprecated in C++17. + +// REQUIRES: c++03 || c++11 || c++14 || c++17 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + +#include <memory> +#include <type_traits> +#include <cstddef> + +template <class T> +void test() { + static_assert((std::is_same<typename std::allocator<T>::size_type, std::size_t>::value), ""); + static_assert((std::is_same<typename std::allocator<T>::difference_type, std::ptrdiff_t>::value), ""); + static_assert((std::is_same<typename std::allocator<T>::pointer, T*>::value), ""); + static_assert((std::is_same<typename std::allocator<T>::const_pointer, const T*>::value), ""); + static_assert((std::is_same<typename std::allocator<T>::reference, T&>::value), ""); + static_assert((std::is_same<typename std::allocator<T>::const_reference, const T&>::value), ""); + static_assert( + (std::is_same<typename std::allocator<T>::template rebind<int>::other, std::allocator<int> >::value), ""); +} + +int main(int, char**) { + test<char>(); + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp b/libcxx/test/libcxx-03/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp new file mode 100644 index 000000000000..d212f36bb1ab --- /dev/null +++ b/libcxx/test/libcxx-03/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp @@ -0,0 +1,68 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <functional> + + +// In C++17, the function adapters mem_fun/mem_fun_ref, etc have been removed. +// However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS +// is defined before including <functional>, then they will be restored. + +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + +#include <functional> +#include <cassert> +#include <type_traits> + +#include "test_macros.h" + +int identity(int v) { return v; } +int sum(int a, int b) { return a + b; } + +struct Foo { + int zero() { return 0; } + int zero_const() const { return 1; } + + int identity(int v) const { return v; } + int sum(int a, int b) const { return a + b; } +}; + +int main(int, char**) +{ + typedef std::pointer_to_unary_function<int, int> PUF; + typedef std::pointer_to_binary_function<int, int, int> PBF; + + static_assert( + (std::is_same<PUF, decltype((std::ptr_fun<int, int>(identity)))>::value), + ""); + static_assert( + (std::is_same<PBF, decltype((std::ptr_fun<int, int, int>(sum)))>::value), + ""); + + assert((std::ptr_fun<int, int>(identity)(4) == 4)); + assert((std::ptr_fun<int, int, int>(sum)(4, 5) == 9)); + + Foo f; + assert((std::mem_fn(&Foo::identity)(f, 5) == 5)); + assert((std::mem_fn(&Foo::sum)(f, 5, 6) == 11)); + + typedef std::mem_fun_ref_t<int, Foo> MFR; + typedef std::const_mem_fun_ref_t<int, Foo> CMFR; + + static_assert( + (std::is_same<MFR, decltype((std::mem_fun_ref(&Foo::zero)))>::value), ""); + static_assert((std::is_same<CMFR, decltype((std::mem_fun_ref( + &Foo::zero_const)))>::value), + ""); + + assert((std::mem_fun_ref(&Foo::zero)(f) == 0)); + assert((std::mem_fun_ref(&Foo::identity)(f, 5) == 5)); + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/exception.unexpected/get_unexpected.pass.cpp b/libcxx/test/libcxx-03/depr/exception.unexpected/get_unexpected.pass.cpp new file mode 100644 index 000000000000..e4533a01c5bf --- /dev/null +++ b/libcxx/test/libcxx-03/depr/exception.unexpected/get_unexpected.pass.cpp @@ -0,0 +1,44 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// test get_unexpected + +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS + +#include <exception> +#include <cassert> +#include <cstdlib> + +#include "test_macros.h" + +void f1() {} +void f2() {} + +void f3() +{ + std::exit(0); +} + +int main(int, char**) +{ + + std::unexpected_handler old = std::get_unexpected(); + // verify there is a previous unexpected handler + assert(old); + std::set_unexpected(f1); + assert(std::get_unexpected() == f1); + // verify f1 was replace with f2 + std::set_unexpected(f2); + assert(std::get_unexpected() == f2); + // verify calling original unexpected handler calls terminate + std::set_terminate(f3); + (*old)(); + assert(0); + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/exception.unexpected/set_unexpected.pass.cpp b/libcxx/test/libcxx-03/depr/exception.unexpected/set_unexpected.pass.cpp new file mode 100644 index 000000000000..f428790f6cc9 --- /dev/null +++ b/libcxx/test/libcxx-03/depr/exception.unexpected/set_unexpected.pass.cpp @@ -0,0 +1,40 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// test set_unexpected + +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS + +#include <exception> +#include <cassert> +#include <cstdlib> + +#include "test_macros.h" + +void f1() {} +void f2() {} + +void f3() +{ + std::exit(0); +} + +int main(int, char**) +{ + std::unexpected_handler old = std::set_unexpected(f1); + // verify there is a previous unexpected handler + assert(old); + // verify f1 was replace with f2 + assert(std::set_unexpected(f2) == f1); + // verify calling original unexpected handler calls terminate + std::set_terminate(f3); + (*old)(); + assert(0); + + return 0; +} diff --git a/libcxx/test/libcxx-03/depr/exception.unexpected/unexpected.pass.cpp b/libcxx/test/libcxx-03/depr/exception.unexpected/unexpected.pass.cpp new file mode 100644 index 000000000000..6ab1147b912e --- /dev/null +++ b/libcxx/test/libcxx-03/depr/exception.unexpected/unexpected.pass.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// test unexpected + +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS + +#include <exception> +#include <cstdlib> +#include <cassert> + +#include "test_macros.h" + +void fexit() +{ + std::exit(0); +} + +int main(int, char**) +{ + std::set_unexpected(fexit); + std::unexpected(); + assert(false); + + return 0; +} diff --git a/libcxx/test/libcxx-03/diagnostics/system_error_win_codes.pass.cpp b/libcxx/test/libcxx-03/diagnostics/system_error_win_codes.pass.cpp new file mode 100644 index 000000000000..799a5b5c0b08 --- /dev/null +++ b/libcxx/test/libcxx-03/diagnostics/system_error_win_codes.pass.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: windows + +// Validate that system_error on windows accepts Windows' System Error Codes (as +// used by win32 APIs and reported by GetLastError), and that they are properly +// translated to generic conditions. + +#include <windows.h> +#include <system_error> +#include <cassert> + +#include "test_macros.h" + +int main(int, char**) { + LIBCPP_ASSERT(std::error_code(ERROR_ACCESS_DENIED, std::system_category()) == std::errc::permission_denied); + LIBCPP_ASSERT(std::error_code(ERROR_PATH_NOT_FOUND, std::system_category()) == std::errc::no_such_file_or_directory); + return 0; +} diff --git a/libcxx/test/libcxx-03/input.output/file.streams/fstreams/filebuf/traits_mismatch.verify.cpp b/libcxx/test/libcxx-03/input.output/file.streams/fstreams/filebuf/traits_mismatch.verify.cpp new file mode 100644 index 000000000000..455c9979ae57 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/file.streams/fstreams/filebuf/traits_mismatch.verify.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <fstream> + +// template<class charT, class traits = char_traits<charT>> +// class basic_filebuf; +// +// The char type of the stream and the char_type of the traits have to match + +// UNSUPPORTED: no-wide-characters + +#include <fstream> + +std::basic_filebuf<char, std::char_traits<wchar_t> > f; +// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} +// expected-error@*:* 9 {{only virtual member functions can be marked 'override'}} diff --git a/libcxx/test/libcxx-03/input.output/file.streams/fstreams/fstream.close.pass.cpp b/libcxx/test/libcxx-03/input.output/file.streams/fstreams/fstream.close.pass.cpp new file mode 100644 index 000000000000..d77d5370f2c4 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/file.streams/fstreams/fstream.close.pass.cpp @@ -0,0 +1,38 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <fstream> + +// template <class charT, class traits = char_traits<charT> > +// class basic_fstream + +// close(); + +// Inspired by PR#38052 - std::fstream still good after closing and updating content + +#include <fstream> +#include <cassert> +#include "test_macros.h" +#include "platform_support.h" + +int main(int, char**) +{ + std::string temp = get_temp_file_name(); + + std::fstream ofs(temp, std::ios::out | std::ios::trunc); + ofs << "Hello, World!\n"; + assert( ofs.good()); + ofs.close(); + assert( ofs.good()); + ofs << "Hello, World!\n"; + assert(!ofs.good()); + + std::remove(temp.c_str()); + + return 0; +} diff --git a/libcxx/test/libcxx-03/input.output/file.streams/fstreams/traits_mismatch.verify.cpp b/libcxx/test/libcxx-03/input.output/file.streams/fstreams/traits_mismatch.verify.cpp new file mode 100644 index 000000000000..cc52cc119d50 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/file.streams/fstreams/traits_mismatch.verify.cpp @@ -0,0 +1,29 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <fstream> + +// template <class charT, class traits = char_traits<charT> > +// class basic_fstream + +// The char type of the stream and the char_type of the traits have to match + +// UNSUPPORTED: no-wide-characters + +#include <fstream> + +std::basic_fstream<char, std::char_traits<wchar_t> > f; +// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} +// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} + +// expected-error@*:* 11 {{only virtual member functions can be marked 'override'}} + +// FIXME: As of commit r324062 Clang incorrectly generates a diagnostic about mismatching +// exception specifications for types which are already invalid for one reason or another. +// For now we tolerate this diagnostic. +// expected-error@*:* 0-1 {{exception specification of overriding function is more lax than base version}} diff --git a/libcxx/test/libcxx-03/input.output/file.streams/lit.local.cfg b/libcxx/test/libcxx-03/input.output/file.streams/lit.local.cfg new file mode 100644 index 000000000000..ac628161afe7 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/file.streams/lit.local.cfg @@ -0,0 +1,7 @@ +# Load the same local configuration as the corresponding one in libcxx/test/std +import os + +inLibcxx = os.path.join("libcxx", "test", "libcxx-03") +inStd = os.path.join("libcxx", "test", "std") +localConfig = os.path.normpath(os.path.realpath(__file__)).replace(inLibcxx, inStd) +config.load_from_path(localConfig, lit_config) diff --git a/libcxx/test/libcxx-03/input.output/iostream.format/input.streams/traits_mismatch.verify.cpp b/libcxx/test/libcxx-03/input.output/iostream.format/input.streams/traits_mismatch.verify.cpp new file mode 100644 index 000000000000..a03aed123c03 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/iostream.format/input.streams/traits_mismatch.verify.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <istream> + +// template <class charT, class traits = char_traits<charT> > +// class basic_istream; + +// The char type of the stream and the char_type of the traits have to match + +// UNSUPPORTED: no-wide-characters + +#include <istream> +#include <string> + +struct test_istream + : public std::basic_istream<char, std::char_traits<wchar_t> > {}; + +// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} +// expected-error@*:* {{only virtual member functions can be marked 'override'}} diff --git a/libcxx/test/libcxx-03/input.output/iostream.format/lit.local.cfg b/libcxx/test/libcxx-03/input.output/iostream.format/lit.local.cfg new file mode 100644 index 000000000000..ac628161afe7 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/iostream.format/lit.local.cfg @@ -0,0 +1,7 @@ +# Load the same local configuration as the corresponding one in libcxx/test/std +import os + +inLibcxx = os.path.join("libcxx", "test", "libcxx-03") +inStd = os.path.join("libcxx", "test", "std") +localConfig = os.path.normpath(os.path.realpath(__file__)).replace(inLibcxx, inStd) +config.load_from_path(localConfig, lit_config) diff --git a/libcxx/test/libcxx-03/input.output/iostream.format/output.streams/traits_mismatch.verify.cpp b/libcxx/test/libcxx-03/input.output/iostream.format/output.streams/traits_mismatch.verify.cpp new file mode 100644 index 000000000000..9e7bc998eb91 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/iostream.format/output.streams/traits_mismatch.verify.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <ostream> + +// template <class charT, class traits = char_traits<charT> > +// class basic_ostream; + +// The char type of the stream and the char_type of the traits have to match + +// UNSUPPORTED: no-wide-characters + +#include <ostream> +#include <string> + +struct test_ostream + : public std::basic_ostream<char, std::char_traits<wchar_t> > {}; + +// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} +// expected-error@*:* {{only virtual member functions can be marked 'override'}} diff --git a/libcxx/test/libcxx-03/input.output/iostream.objects/lit.local.cfg b/libcxx/test/libcxx-03/input.output/iostream.objects/lit.local.cfg new file mode 100644 index 000000000000..ac628161afe7 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/iostream.objects/lit.local.cfg @@ -0,0 +1,7 @@ +# Load the same local configuration as the corresponding one in libcxx/test/std +import os + +inLibcxx = os.path.join("libcxx", "test", "libcxx-03") +inStd = os.path.join("libcxx", "test", "std") +localConfig = os.path.normpath(os.path.realpath(__file__)).replace(inLibcxx, inStd) +config.load_from_path(localConfig, lit_config) diff --git a/libcxx/test/libcxx-03/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp b/libcxx/test/libcxx-03/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp new file mode 100644 index 000000000000..c04250987e8e --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp @@ -0,0 +1,83 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// TODO(mordante) Investigate +// UNSUPPORTED: apple-clang + +// UNSUPPORTED: no-exceptions + +// The fix for issue 57964 requires an updated dylib due to explicit +// instantiations. That means Apple backdeployment targets remain broken. +// XFAIL using-built-library-before-llvm-19 + +// <ios> + +// class ios_base + +// ~ios_base() +// +// Destroying a constructed ios_base object that has not been +// initialized by basic_ios::init is undefined behaviour. This can +// happen in practice, make sure the undefined behaviour is handled +// gracefully. +// +// +// [ios.base.cons]/1 +// +// ios_base(); +// Effects: Each ios_base member has an indeterminate value after construction. +// The object's members shall be initialized by calling basic_ios::init before +// the object's first use or before it is destroyed, whichever comes first; +// otherwise the behavior is undefined. +// +// [basic.ios.cons]/2 +// +// basic_ios(); +// Effects: Leaves its member objects uninitialized. The object shall be +// initialized by calling basic_ios::init before its first use or before it is +// destroyed, whichever comes first; otherwise the behavior is undefined. +// +// ostream and friends have a basic_ios virtual base. +// [class.base.init]/13 +// In a non-delegating constructor, initialization proceeds in the +// following order: +// - First, and only for the constructor of the most derived class +// ([intro.object]), virtual base classes are initialized ... +// +// So in this example +// struct Foo : AlwaysThrows, std::ostream { +// Foo() : AlwaysThrows{}, std::ostream{nullptr} {} +// }; +// +// Here +// - the ios_base object is constructed +// - the AlwaysThrows object is constructed and throws an exception +// - the AlwaysThrows object is destrodyed +// - the ios_base object is destroyed +// +// The ios_base object is destroyed before it has been initialized and runs +// into undefined behavior. By using __loc_ as a sentinel we can avoid +// accessing uninitialized memory in the destructor. + +#include <ostream> + +struct AlwaysThrows { + AlwaysThrows() { throw 1; } +}; + +struct Foo : AlwaysThrows, std::ostream { + Foo() : AlwaysThrows(), std::ostream(nullptr) {} +}; + +int main(int, char**) { + try { + Foo foo; + } catch (...) { + }; + return 0; +} diff --git a/libcxx/test/libcxx-03/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp b/libcxx/test/libcxx-03/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp new file mode 100644 index 000000000000..8f0f5a6d78b1 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp @@ -0,0 +1,43 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <ios> + +// template <class charT, class traits> class basic_ios + +// void clear(iostate state); + +// Make sure that we abort() when exceptions are disabled and the exception +// flag is set for the iostate we pass to clear(). + +// REQUIRES: no-exceptions + +#include <csignal> +#include <cstdlib> +#include <ios> +#include <streambuf> + +#include "test_macros.h" + + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +struct testbuf : public std::streambuf {}; + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + + testbuf buf; + std::ios ios(&buf); + ios.exceptions(std::ios::badbit); + ios.clear(std::ios::badbit); + + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/input.output/iostreams.base/lit.local.cfg b/libcxx/test/libcxx-03/input.output/iostreams.base/lit.local.cfg new file mode 100644 index 000000000000..ac628161afe7 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/iostreams.base/lit.local.cfg @@ -0,0 +1,7 @@ +# Load the same local configuration as the corresponding one in libcxx/test/std +import os + +inLibcxx = os.path.join("libcxx", "test", "libcxx-03") +inStd = os.path.join("libcxx", "test", "std") +localConfig = os.path.normpath(os.path.realpath(__file__)).replace(inLibcxx, inStd) +config.load_from_path(localConfig, lit_config) diff --git a/libcxx/test/libcxx-03/input.output/stream.buffers/lit.local.cfg b/libcxx/test/libcxx-03/input.output/stream.buffers/lit.local.cfg new file mode 100644 index 000000000000..ac628161afe7 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/stream.buffers/lit.local.cfg @@ -0,0 +1,7 @@ +# Load the same local configuration as the corresponding one in libcxx/test/std +import os + +inLibcxx = os.path.join("libcxx", "test", "libcxx-03") +inStd = os.path.join("libcxx", "test", "std") +localConfig = os.path.normpath(os.path.realpath(__file__)).replace(inLibcxx, inStd) +config.load_from_path(localConfig, lit_config) diff --git a/libcxx/test/libcxx-03/input.output/string.streams/lit.local.cfg b/libcxx/test/libcxx-03/input.output/string.streams/lit.local.cfg new file mode 100644 index 000000000000..ac628161afe7 --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/string.streams/lit.local.cfg @@ -0,0 +1,7 @@ +# Load the same local configuration as the corresponding one in libcxx/test/std +import os + +inLibcxx = os.path.join("libcxx", "test", "libcxx-03") +inStd = os.path.join("libcxx", "test", "std") +localConfig = os.path.normpath(os.path.realpath(__file__)).replace(inLibcxx, inStd) +config.load_from_path(localConfig, lit_config) diff --git a/libcxx/test/libcxx-03/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp b/libcxx/test/libcxx-03/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp new file mode 100644 index 000000000000..2b6c3802a56b --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp @@ -0,0 +1,171 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <sstream> + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +// How the constructors of basic_stringbuf initialize the buffer pointers is +// not specified. For some constructors it's implementation defined whether the +// pointers are set to nullptr. Libc++'s implementation directly uses the SSO +// buffer of a std::string as the initial size. This test validates that +// behaviour. +// +// This behaviour is allowed by LWG2995. + +#include <sstream> +#include <cassert> + +#include "test_macros.h" +#include "min_allocator.h" + +template <class CharT> +struct test_buf : public std::basic_stringbuf<CharT> { + typedef std::basic_streambuf<CharT> base; + typedef typename base::char_type char_type; + typedef typename base::int_type int_type; + typedef typename base::traits_type traits_type; + + char_type* pbase() const { return base::pbase(); } + char_type* pptr() const { return base::pptr(); } + char_type* epptr() const { return base::epptr(); } + void gbump(int n) { base::gbump(n); } + + virtual int_type overflow(int_type c = traits_type::eof()) { return base::overflow(c); } + + test_buf() = default; + explicit test_buf(std::ios_base::openmode which) : std::basic_stringbuf<CharT>(which) {} + + explicit test_buf(const std::basic_string<CharT>& s) : std::basic_stringbuf<CharT>(s) {} +#if TEST_STD_VER >= 20 + explicit test_buf(const std::allocator<CharT>& a) : std::basic_stringbuf<CharT>(a) {} + test_buf(std::ios_base::openmode which, const std::allocator<CharT>& a) : std::basic_stringbuf<CharT>(which, a) {} + explicit test_buf(std::basic_string<CharT>&& s) + : std::basic_stringbuf<CharT>(std::forward<std::basic_string<CharT>>(s)) {} + + test_buf(const std::basic_string<CharT, std::char_traits<CharT>, min_allocator<CharT>>& s, + const std::allocator<CharT>& a) + : std::basic_stringbuf<CharT>(s, a) {} + test_buf(const std::basic_string<CharT, std::char_traits<CharT>, min_allocator<CharT>>& s, + std::ios_base::openmode which, + const std::allocator<CharT>& a) + : std::basic_stringbuf<CharT>(s, which, a) {} + test_buf(const std::basic_string<CharT, std::char_traits<CharT>, min_allocator<CharT>>& s) + : std::basic_stringbuf<CharT>(s) {} +#endif // TEST_STD_VER >= 20 + +#if TEST_STD_VER >= 26 + test_buf(std::basic_string_view<CharT> s) : std::basic_stringbuf<CharT>(s) {} + test_buf(std::basic_string_view<CharT> s, const std::allocator<CharT>& a) : std::basic_stringbuf<CharT>(s, a) {} + test_buf(std::basic_string_view<CharT> s, std::ios_base::openmode which, const std::allocator<CharT>& a) + : std::basic_stringbuf<CharT>(s, which, a) {} +#endif // TEST_STD_VER >= 26 +}; + +template <class CharT> +static void test() { + std::size_t size = std::basic_string<CharT>().capacity(); // SSO buffer size. + { + test_buf<CharT> b; + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); + } + { + test_buf<CharT> b(std::ios_base::out); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); + } + { + std::basic_string<CharT> s; + s.reserve(1024); + test_buf<CharT> b(s); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); // copy so uses size + } +#if TEST_STD_VER >= 20 + { + test_buf<CharT> b = test_buf<CharT>(std::allocator<CharT>()); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); + } + { + test_buf<CharT> b = test_buf<CharT>(std::ios_base::out, std::allocator<CharT>()); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); + } + { + std::basic_string<CharT> s; + s.reserve(1024); + std::size_t capacity = s.capacity(); + test_buf<CharT> b = test_buf<CharT>(std::move(s)); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() >= b.pbase() + capacity); // move so uses s.capacity() + } + { + std::basic_string<CharT, std::char_traits<CharT>, min_allocator<CharT>> s; + s.reserve(1024); + test_buf<CharT> b = test_buf<CharT>(s, std::allocator<CharT>()); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); // copy so uses size + } + { + std::basic_string<CharT, std::char_traits<CharT>, min_allocator<CharT>> s; + s.reserve(1024); + test_buf<CharT> b = test_buf<CharT>(s, std::ios_base::out, std::allocator<CharT>()); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); // copy so uses size + } + { + std::basic_string<CharT, std::char_traits<CharT>, min_allocator<CharT>> s; + s.reserve(1024); + test_buf<CharT> b = test_buf<CharT>(s); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); // copy so uses size + } +#endif // TEST_STD_VER >= 20 +#if TEST_STD_VER >= 26 + { + std::basic_string_view<CharT> s; + test_buf<CharT> b = test_buf<CharT>(s); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); + } + { + std::basic_string_view<CharT> s; + test_buf<CharT> b = test_buf<CharT>(s, std::allocator<CharT>()); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); + } + { + std::basic_string_view<CharT> s; + test_buf<CharT> b = test_buf<CharT>(s, std::ios_base::out, std::allocator<CharT>()); + assert(b.pbase() != nullptr); + assert(b.pptr() == b.pbase()); + assert(b.epptr() == b.pbase() + size); + } +#endif // TEST_STD_VER >= 26 +} + +int main(int, char**) { + test<char>(); +#ifndef TEST_HAS_NO_WIDE_CHARACTERS + test<wchar_t>(); +#endif + return 0; +} diff --git a/libcxx/test/libcxx-03/input.output/string.streams/traits_mismatch.verify.cpp b/libcxx/test/libcxx-03/input.output/string.streams/traits_mismatch.verify.cpp new file mode 100644 index 000000000000..36f3222c3a7a --- /dev/null +++ b/libcxx/test/libcxx-03/input.output/string.streams/traits_mismatch.verify.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <sstream> + +// template<class charT, class traits = char_traits<charT>, +// class Allocator = allocator<charT>> +// class basic_stringbuf; +// +// The char type of the stream and the char_type of the traits have to match + +// UNSUPPORTED: no-wide-characters + +#include <sstream> + +std::basic_stringbuf<char, std::char_traits<wchar_t> > sb; +// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} +// expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} + +// expected-error@*:* 5 {{only virtual member functions can be marked 'override'}} diff --git a/libcxx/test/libcxx-03/iterators/aliasing_iterator.pass.cpp b/libcxx/test/libcxx-03/iterators/aliasing_iterator.pass.cpp new file mode 100644 index 000000000000..d3bd7cc8618e --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/aliasing_iterator.pass.cpp @@ -0,0 +1,45 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// ADDITIONAL_COMPILE_FLAGS(clang): -Wprivate-header + +#include <__cxx03/__iterator/aliasing_iterator.h> +#include <cassert> + +struct NonTrivial { + int i_; + + NonTrivial(int i) : i_(i) {} + NonTrivial(const NonTrivial& other) : i_(other.i_) {} + + NonTrivial& operator=(const NonTrivial& other) { + i_ = other.i_; + return *this; + } + + ~NonTrivial() {} +}; + +int main(int, char**) { + { + NonTrivial arr[] = {1, 2, 3, 4}; + std::__aliasing_iterator<NonTrivial*, int> iter(arr); + + assert(*iter == 1); + assert(iter[0] == 1); + assert(iter[1] == 2); + ++iter; + assert(*iter == 2); + assert(iter[-1] == 1); + assert(iter.__base() == arr + 1); + assert(iter == iter); + assert(iter != (iter + 1)); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/iterators/bounded_iter/arithmetic.pass.cpp b/libcxx/test/libcxx-03/iterators/bounded_iter/arithmetic.pass.cpp new file mode 100644 index 000000000000..b4b6e7fa1940 --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/bounded_iter/arithmetic.pass.cpp @@ -0,0 +1,112 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// template <class _Iterator> +// struct __bounded_iter; +// +// Arithmetic operators + +#include <__cxx03/__iterator/bounded_iter.h> +#include <cstddef> + +#include "test_iterators.h" +#include "test_macros.h" + +template <class Iter> +TEST_CONSTEXPR_CXX14 bool tests() { + int array[] = {40, 41, 42, 43, 44}; + int* b = array + 0; + int* e = array + 5; + + // ++it + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b), Iter(b), Iter(e)); + std::__bounded_iter<Iter>& result = ++iter; + assert(&result == &iter); + assert(*iter == 41); + } + // it++ + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b), Iter(b), Iter(e)); + std::__bounded_iter<Iter> result = iter++; + assert(*result == 40); + assert(*iter == 41); + } + // --it + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b + 3), Iter(b), Iter(e)); + std::__bounded_iter<Iter>& result = --iter; + assert(&result == &iter); + assert(*iter == 42); + } + // it-- + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b + 3), Iter(b), Iter(e)); + std::__bounded_iter<Iter> result = iter--; + assert(*result == 43); + assert(*iter == 42); + } + // it += n + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b), Iter(b), Iter(e)); + std::__bounded_iter<Iter>& result = (iter += 3); + assert(&result == &iter); + assert(*iter == 43); + } + // it + n + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b), Iter(b), Iter(e)); + std::__bounded_iter<Iter> result = iter + 3; + assert(*iter == 40); + assert(*result == 43); + } + // n + it + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b), Iter(b), Iter(e)); + std::__bounded_iter<Iter> result = 3 + iter; + assert(*iter == 40); + assert(*result == 43); + } + // it -= n + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b + 3), Iter(b), Iter(e)); + std::__bounded_iter<Iter>& result = (iter -= 3); + assert(&result == &iter); + assert(*iter == 40); + } + // it - n + { + std::__bounded_iter<Iter> iter = std::__make_bounded_iter(Iter(b + 3), Iter(b), Iter(e)); + std::__bounded_iter<Iter> result = iter - 3; + assert(*iter == 43); + assert(*result == 40); + } + // it - it + { + std::__bounded_iter<Iter> iter1 = std::__make_bounded_iter(Iter(b), Iter(b), Iter(e)); + std::__bounded_iter<Iter> iter2 = std::__make_bounded_iter(Iter(e), Iter(b), Iter(e)); + std::ptrdiff_t result = iter2 - iter1; + assert(result == 5); + } + + return true; +} + +int main(int, char**) { + tests<int*>(); +#if TEST_STD_VER > 11 + static_assert(tests<int*>(), ""); +#endif + +#if TEST_STD_VER > 17 + tests<contiguous_iterator<int*> >(); + static_assert(tests<contiguous_iterator<int*> >(), ""); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/iterators/bounded_iter/comparison.pass.cpp b/libcxx/test/libcxx-03/iterators/bounded_iter/comparison.pass.cpp new file mode 100644 index 000000000000..490bfed54a15 --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/bounded_iter/comparison.pass.cpp @@ -0,0 +1,87 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// template <class _Iterator> +// struct __bounded_iter; +// +// Comparison operators + +#include <concepts> +#include <__cxx03/__iterator/bounded_iter.h> + +#include "test_iterators.h" +#include "test_macros.h" + +template <class Iter> +TEST_CONSTEXPR_CXX14 bool tests() { + int array[] = {0, 1, 2, 3, 4}; + int* b = array + 0; + int* e = array + 5; + std::__bounded_iter<Iter> const iter1 = std::__make_bounded_iter(Iter(b), Iter(b), Iter(e)); + std::__bounded_iter<Iter> const iter2 = std::__make_bounded_iter(Iter(e), Iter(b), Iter(e)); + + // operator== + { + assert(iter1 == iter1); + assert(!(iter1 == iter2)); + } + // operator!= + { + assert(iter1 != iter2); + assert(!(iter1 != iter1)); + } + // operator< + { + assert(iter1 < iter2); + assert(!(iter2 < iter1)); + assert(!(iter1 < iter1)); + } + // operator> + { + assert(iter2 > iter1); + assert(!(iter1 > iter2)); + assert(!(iter1 > iter1)); + } + // operator<= + { + assert(iter1 <= iter2); + assert(!(iter2 <= iter1)); + assert(iter1 <= iter1); + } + // operator>= + { + assert(iter2 >= iter1); + assert(!(iter1 >= iter2)); + assert(iter1 >= iter1); + } + +#if TEST_STD_VER >= 20 + // P1614 + std::same_as<std::strong_ordering> decltype(auto) r1 = iter1 <=> iter2; + assert(r1 == std::strong_ordering::less); +#endif + + return true; +} + +int main(int, char**) { + tests<int*>(); +#if TEST_STD_VER > 11 + static_assert(tests<int*>(), ""); +#endif + +#if TEST_STD_VER > 17 + tests<contiguous_iterator<int*>>(); + static_assert(tests<contiguous_iterator<int*>>()); + + tests<three_way_contiguous_iterator<int*>>(); + static_assert(tests<three_way_contiguous_iterator<int*>>()); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/iterators/bounded_iter/pointer_traits.pass.cpp b/libcxx/test/libcxx-03/iterators/bounded_iter/pointer_traits.pass.cpp new file mode 100644 index 000000000000..671e716d21e2 --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/bounded_iter/pointer_traits.pass.cpp @@ -0,0 +1,61 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// template <class _Iterator> +// struct __bounded_iter; +// +// std::pointer_traits specialization + +#include <__cxx03/__iterator/bounded_iter.h> +#include <cassert> +#include <cstddef> +#include <memory> +#include <type_traits> + +#include "test_iterators.h" +#include "test_macros.h" + +template <class Iter> +TEST_CONSTEXPR_CXX14 bool tests() { + using BoundedIter = std::__bounded_iter<Iter>; + using PointerTraits = std::pointer_traits<BoundedIter>; + using BasePointerTraits = std::pointer_traits<Iter>; + static_assert(std::is_same<typename PointerTraits::pointer, BoundedIter>::value, ""); + static_assert(std::is_same<typename PointerTraits::element_type, typename BasePointerTraits::element_type>::value, ""); + static_assert(std::is_same<typename PointerTraits::difference_type, typename BasePointerTraits::difference_type>::value, ""); + + { + int array[] = {0, 1, 2, 3, 4}; + int* b = array + 0; + int* e = array + 5; + std::__bounded_iter<Iter> const iter1 = std::__make_bounded_iter(Iter(b), Iter(b), Iter(e)); + std::__bounded_iter<Iter> const iter2 = std::__make_bounded_iter(Iter(e), Iter(b), Iter(e)); + assert(std::__to_address(iter1) == b); // in-bounds iterator + assert(std::__to_address(iter2) == e); // out-of-bounds iterator +#if TEST_STD_VER > 17 + assert(std::to_address(iter1) == b); // in-bounds iterator + assert(std::to_address(iter2) == e); // out-of-bounds iterator +#endif + } + + return true; +} + +int main(int, char**) { + tests<int*>(); +#if TEST_STD_VER > 11 + static_assert(tests<int*>(), ""); +#endif + +#if TEST_STD_VER > 17 + tests<contiguous_iterator<int*> >(); + static_assert(tests<contiguous_iterator<int*> >(), ""); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/iterators/bounded_iter/types.compile.pass.cpp b/libcxx/test/libcxx-03/iterators/bounded_iter/types.compile.pass.cpp new file mode 100644 index 000000000000..0d27dff0873b --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/bounded_iter/types.compile.pass.cpp @@ -0,0 +1,49 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// template <class _Iterator> +// struct __bounded_iter; +// +// Nested types + +#include <__cxx03/__iterator/bounded_iter.h> +#include <cstddef> +#include <iterator> +#include <type_traits> + +#include "test_macros.h" + +#if TEST_STD_VER > 17 +struct Iterator { + struct value_type {}; + using difference_type = int; + struct pointer {}; + using reference = value_type&; + struct iterator_category : std::random_access_iterator_tag {}; + using iterator_concept = std::contiguous_iterator_tag; +}; + +using BoundedIter1 = std::__bounded_iter<Iterator>; +static_assert(std::is_same<BoundedIter1::value_type, Iterator::value_type>::value, ""); +static_assert(std::is_same<BoundedIter1::difference_type, Iterator::difference_type>::value, ""); +static_assert(std::is_same<BoundedIter1::pointer, Iterator::pointer>::value, ""); +static_assert(std::is_same<BoundedIter1::reference, Iterator::reference>::value, ""); +static_assert(std::is_same<BoundedIter1::iterator_category, Iterator::iterator_category>::value, ""); +static_assert(std::is_same<BoundedIter1::iterator_concept, Iterator::iterator_concept>::value, ""); +#endif + + +using BoundedIter2 = std::__bounded_iter<int*>; +static_assert(std::is_same<BoundedIter2::value_type, int>::value, ""); +static_assert(std::is_same<BoundedIter2::difference_type, std::ptrdiff_t>::value, ""); +static_assert(std::is_same<BoundedIter2::pointer, int*>::value, ""); +static_assert(std::is_same<BoundedIter2::reference, int&>::value, ""); +static_assert(std::is_same<BoundedIter2::iterator_category, std::random_access_iterator_tag>::value, ""); +#if TEST_STD_VER > 17 +static_assert(std::is_same<BoundedIter2::iterator_concept, std::contiguous_iterator_tag>::value, ""); +#endif diff --git a/libcxx/test/libcxx-03/iterators/contiguous_iterators.conv.compile.pass.cpp b/libcxx/test/libcxx-03/iterators/contiguous_iterators.conv.compile.pass.cpp new file mode 100644 index 000000000000..4d3690953070 --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/contiguous_iterators.conv.compile.pass.cpp @@ -0,0 +1,65 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// <iterator> + +// __bounded_iter<_Iter> +// __static_bounded_iter<_Iter> +// __wrap_iter<_Iter> + +// Verify that libc++-wrapped iterators do not permit slicing conversion or construction. + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +#include <array> +#include <span> +#include <type_traits> +#include <vector> + +#include "test_macros.h" + +struct Base {}; +struct Derived : Base {}; + +template <class B, class D, bool = std::is_pointer<typename std::array<B, 1>::iterator>::value> +struct test_array_helper : std::true_type { + typedef typename std::array<B, 1>::iterator BaseIter; + typedef typename std::array<D, 1>::iterator DerivedIter; + typedef typename std::array<B, 1>::const_iterator BaseConstIter; + typedef typename std::array<D, 1>::const_iterator DerivedConstIter; + + static_assert(!std::is_convertible<DerivedIter, BaseIter>::value, ""); + static_assert(!std::is_convertible<DerivedIter, BaseConstIter>::value, ""); + static_assert(!std::is_convertible<DerivedConstIter, BaseConstIter>::value, ""); + static_assert(!std::is_constructible<BaseIter, DerivedIter>::value, ""); + static_assert(!std::is_constructible<BaseConstIter, DerivedIter>::value, ""); + static_assert(!std::is_constructible<BaseConstIter, DerivedConstIter>::value, ""); +}; + +template <class B, class D> +struct test_array_helper<B, D, true> : std::true_type {}; + +static_assert(test_array_helper<Base, Derived>::value, ""); + +static_assert(!std::is_convertible<std::vector<Derived>::iterator, std::vector<Base>::iterator>::value, ""); +static_assert(!std::is_convertible<std::vector<Derived>::iterator, std::vector<Base>::const_iterator>::value, ""); +static_assert(!std::is_convertible<std::vector<Derived>::const_iterator, std::vector<Base>::const_iterator>::value, ""); +static_assert(!std::is_constructible<std::vector<Base>::iterator, std::vector<Derived>::iterator>::value, ""); +static_assert(!std::is_constructible<std::vector<Base>::const_iterator, std::vector<Derived>::iterator>::value, ""); +static_assert(!std::is_constructible<std::vector<Base>::const_iterator, std::vector<Derived>::const_iterator>::value, + ""); + +#if TEST_STD_VER >= 20 +static_assert(!std::is_convertible_v<std::span<Derived>::iterator, std::span<Base>::iterator>); +static_assert(!std::is_convertible_v<std::span<Derived>::iterator, std::span<const Base>::iterator>); +static_assert(!std::is_convertible_v<std::span<const Derived>::iterator, std::span<Base>::iterator>); +static_assert(!std::is_constructible_v<std::span<Base>::iterator, std::span<Derived>::iterator>); +static_assert(!std::is_constructible_v<std::span<Base>::iterator, std::span<const Derived>::iterator>); +static_assert(!std::is_constructible_v<std::span<const Base>::iterator, std::span<const Derived>::iterator>); +#endif diff --git a/libcxx/test/libcxx-03/iterators/contiguous_iterators.pass.cpp b/libcxx/test/libcxx-03/iterators/contiguous_iterators.pass.cpp new file mode 100644 index 000000000000..f00ca4e87940 --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/contiguous_iterators.pass.cpp @@ -0,0 +1,265 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// <iterator> + +// __libcpp_is_contiguous_iterator<_Tp> + +// __libcpp_is_contiguous_iterator determines if an iterator is contiguous, +// either because it advertises itself as such (in C++20) or because it +// is a pointer type or a known trivial wrapper around a pointer type, +// such as __wrap_iter<T*>. +// + +#include <cassert> +#include <deque> +#include <initializer_list> +#include <iterator> +#include <string> +#include <vector> + +#include "test_macros.h" +#include "test_iterators.h" + +#if TEST_STD_VER >= 17 +#include <string_view> +#endif + +#if TEST_STD_VER >= 20 +#include <span> +#endif + +class T; // incomplete + +class my_input_iterator +{ + struct tag : std::input_iterator_tag {}; + typedef my_input_iterator Self; + int *state_; +public: + typedef tag iterator_category; + typedef int value_type; + typedef int difference_type; + typedef int* pointer; + typedef int& reference; + + my_input_iterator(); + reference operator*() const; + pointer operator->() const; + + Self& operator++(); + Self operator++(int); + friend bool operator==(const Self&, const Self&); + friend bool operator!=(const Self&, const Self&); +}; + +class my_random_access_iterator +{ + struct tag : std::random_access_iterator_tag {}; + typedef my_random_access_iterator Self; + int *state_; +public: + typedef tag iterator_category; + typedef int value_type; + typedef int difference_type; + typedef int* pointer; + typedef int& reference; + + my_random_access_iterator(); + reference operator*() const; + pointer operator->() const; + reference operator[](difference_type) const; + + Self& operator++(); + Self operator++(int); + Self& operator--(); + Self operator--(int); + friend Self& operator+=(Self&, difference_type); + friend Self& operator-=(Self&, difference_type); + friend Self operator+(Self, difference_type); + friend Self operator+(difference_type, Self); + friend Self operator-(Self, difference_type); + friend difference_type operator-(Self, Self); + friend bool operator==(const Self&, const Self&); + friend bool operator!=(const Self&, const Self&); + friend bool operator<(const Self&, const Self&); + friend bool operator>(const Self&, const Self&); + friend bool operator<=(const Self&, const Self&); + friend bool operator>=(const Self&, const Self&); +}; + +#if TEST_STD_VER >= 20 +class my_contiguous_iterator +{ + struct tag : std::contiguous_iterator_tag {}; + typedef my_contiguous_iterator Self; + int *state_; +public: + typedef tag iterator_category; + typedef int value_type; + typedef int difference_type; + typedef int* pointer; + typedef int& reference; + typedef int element_type; // enable to_address via pointer_traits + + my_contiguous_iterator(); + reference operator*() const; + pointer operator->() const; + reference operator[](difference_type) const; + + Self& operator++(); + Self operator++(int); + Self& operator--(); + Self operator--(int); + friend Self& operator+=(Self&, difference_type); + friend Self& operator-=(Self&, difference_type); + friend Self operator+(Self, difference_type); + friend Self operator+(difference_type, Self); + friend Self operator-(Self, difference_type); + friend difference_type operator-(Self, Self); + friend bool operator==(const Self&, const Self&); + friend bool operator!=(const Self&, const Self&); + friend bool operator<(const Self&, const Self&); + friend bool operator>(const Self&, const Self&); + friend bool operator<=(const Self&, const Self&); + friend bool operator>=(const Self&, const Self&); +}; +#endif + +struct fake_deque_iterator : std::deque<int>::iterator { + using element_type = int; +}; +static_assert(std::__has_random_access_iterator_category<fake_deque_iterator>::value, ""); +static_assert(!std::__libcpp_is_contiguous_iterator<fake_deque_iterator>::value, ""); + +#if TEST_STD_VER >= 20 +struct fake2_deque_iterator : std::deque<int>::iterator { + using iterator_concept = std::contiguous_iterator_tag; + using element_type = int; +}; +static_assert(std::__has_random_access_iterator_category<fake2_deque_iterator>::value, ""); +static_assert(std::__libcpp_is_contiguous_iterator<fake2_deque_iterator>::value, ""); +#endif + +int main(int, char**) +{ +// basic tests + static_assert(( std::__libcpp_is_contiguous_iterator<char *>::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<const char *>::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<int *>::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<int **>::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<T *>::value), ""); + + static_assert((!std::__libcpp_is_contiguous_iterator<my_input_iterator>::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<my_random_access_iterator>::value), ""); +#if TEST_STD_VER >= 20 + static_assert(( std::__libcpp_is_contiguous_iterator<my_contiguous_iterator>::value), ""); +#endif + + // move_iterator changes value category, which makes it pretty sketchy to use in optimized codepaths + static_assert((!std::__libcpp_is_contiguous_iterator<std::move_iterator<char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::move_iterator<const char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::move_iterator<int *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::move_iterator<T *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::move_iterator<my_random_access_iterator> >::value), ""); +#if TEST_STD_VER >= 20 + static_assert((!std::__libcpp_is_contiguous_iterator<std::move_iterator<my_contiguous_iterator> >::value), ""); +#endif + + static_assert((!std::__libcpp_is_contiguous_iterator<std::reverse_iterator<char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::reverse_iterator<const char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::reverse_iterator<int *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::reverse_iterator<T *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::reverse_iterator<my_random_access_iterator> >::value), ""); +#if TEST_STD_VER >= 20 + static_assert((!std::__libcpp_is_contiguous_iterator<std::reverse_iterator<my_contiguous_iterator> >::value), ""); +#endif + + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<char *> >::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<const char *> >::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<int *> >::value), ""); + + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<T *> >::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<std::__wrap_iter<T *> > >::value), ""); + + // Here my_random_access_iterator is standing in for some user's fancy pointer type, written pre-C++20. + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<my_random_access_iterator> >::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<std::__wrap_iter<my_random_access_iterator> > >::value), ""); + +#if TEST_STD_VER >= 20 + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<my_contiguous_iterator> >::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<std::__wrap_iter<my_contiguous_iterator> > >::value), ""); +#endif + +// iterators in the libc++ test suite + static_assert((!std::__libcpp_is_contiguous_iterator<cpp17_output_iterator <char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<cpp17_input_iterator <char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<forward_iterator <char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<bidirectional_iterator<char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<random_access_iterator<char *> >::value), ""); +#if TEST_STD_VER >= 20 + static_assert(( std::__libcpp_is_contiguous_iterator<contiguous_iterator <char *> >::value), ""); +#endif + static_assert((!std::__libcpp_is_contiguous_iterator<ThrowingIterator <char *> >::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<NonThrowingIterator <char *> >::value), ""); + +// +// iterators from libc++'s containers +// + +// vector + static_assert(( std::__libcpp_is_contiguous_iterator<std::vector<int>::iterator> ::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::vector<int>::const_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::vector<int>::reverse_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::vector<int>::const_reverse_iterator> ::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::__wrap_iter<std::vector<int>::iterator> >::value), ""); + +// string + static_assert(( std::__libcpp_is_contiguous_iterator<std::string::iterator> ::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::string::const_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::string::reverse_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::string::const_reverse_iterator>::value), ""); +#ifndef TEST_HAS_NO_WIDE_CHARACTERS + static_assert(( std::__libcpp_is_contiguous_iterator<std::wstring::iterator> ::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::wstring::const_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::wstring::reverse_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::wstring::const_reverse_iterator>::value), ""); +#endif + +// deque is random-access but not contiguous + static_assert((!std::__libcpp_is_contiguous_iterator<std::deque<int>::iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::deque<int>::const_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::deque<int>::reverse_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::deque<int>::const_reverse_iterator> ::value), ""); + +// vector<bool> is random-access but not contiguous + static_assert((!std::__libcpp_is_contiguous_iterator<std::vector<bool>::iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::vector<bool>::const_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::vector<bool>::reverse_iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::vector<bool>::const_reverse_iterator> ::value), ""); + +#if TEST_STD_VER >= 11 + static_assert(( std::__libcpp_is_contiguous_iterator<std::initializer_list<int>::iterator> ::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::initializer_list<int>::const_iterator>::value), ""); +#endif + +#if TEST_STD_VER >= 17 + static_assert(( std::__libcpp_is_contiguous_iterator<std::string_view::iterator> ::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::string_view::const_iterator>::value), ""); +#endif + +#if TEST_STD_VER >= 20 + static_assert(( std::__libcpp_is_contiguous_iterator<std::span< int>::iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::span< int>::reverse_iterator>::value), ""); + static_assert(( std::__libcpp_is_contiguous_iterator<std::span<const int>::iterator> ::value), ""); + static_assert((!std::__libcpp_is_contiguous_iterator<std::span<const int>::reverse_iterator>::value), ""); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/iterators/contiguous_iterators.verify.cpp b/libcxx/test/libcxx-03/iterators/contiguous_iterators.verify.cpp new file mode 100644 index 000000000000..c1605c27a9fc --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/contiguous_iterators.verify.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// <iterator> + +// __bounded_iter<_Iter> + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +// Verify that __bounded_iter does not accept non-contiguous iterators as determined by __libcpp_is_contiguous_iterator. +// static_assert should be used, see https://llvm.org/PR115002. +// __wrap_iter cannot be so handled because it may directly wrap user-defined fancy pointers in libc++'s vector. + +#include <deque> +#include <vector> +#include <array> + +// expected-error-re@*:* {{static assertion failed due to requirement {{.*}}Only contiguous iterators can be adapted by __bounded_iter.}} +std::__bounded_iter<std::deque<int>::iterator> bounded_iter; +// expected-error-re@*:* {{static assertion failed due to requirement {{.*}}Only contiguous iterators can be adapted by __static_bounded_iter.}} +std::__static_bounded_iter<std::deque<int>::iterator, 42> statically_bounded_iter; diff --git a/libcxx/test/libcxx-03/iterators/iterator.primitives/iterator.operations/prev.verify.cpp b/libcxx/test/libcxx-03/iterators/iterator.primitives/iterator.operations/prev.verify.cpp new file mode 100644 index 000000000000..da0a336815a5 --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/iterator.primitives/iterator.operations/prev.verify.cpp @@ -0,0 +1,19 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// std::prev + +#include <iterator> +#include "test_iterators.h" + +void test() { + int arr[] = {1, 2}; + cpp17_input_iterator<int*> it(&arr[0]); + it = std::prev(it); + // expected-error-re@*:* {{static assertion failed due to requirement {{.*}}: Attempt to prev(it) with a non-bidirectional iterator}} +} diff --git a/libcxx/test/libcxx-03/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/get_container.pass.cpp b/libcxx/test/libcxx-03/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/get_container.pass.cpp new file mode 100644 index 000000000000..9f45848e9d3f --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/get_container.pass.cpp @@ -0,0 +1,37 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <iterator> + +// back_insert_iterator + +// _Container* __get_container(); // constexpr in C++20 + +#include <iterator> +#include <vector> + +#include "test_macros.h" +#include "nasty_containers.h" +#include "test_constexpr_container.h" + +template <class C> +TEST_CONSTEXPR_CXX20 bool test(C c) { + const std::back_insert_iterator<C> i(c); + assert(i.__get_container() == std::addressof(c)); + return true; +} + +int main(int, char**) { + test(std::vector<int>()); + test(nasty_vector<int>()); +#if TEST_STD_VER >= 20 + test(ConstexprFixedCapacityDeque<int, 10>()); + static_assert(test(ConstexprFixedCapacityDeque<int, 10>())); +#endif + return 0; +} diff --git a/libcxx/test/libcxx-03/iterators/unwrap_iter.pass.cpp b/libcxx/test/libcxx-03/iterators/unwrap_iter.pass.cpp new file mode 100644 index 000000000000..8ef2be2b0107 --- /dev/null +++ b/libcxx/test/libcxx-03/iterators/unwrap_iter.pass.cpp @@ -0,0 +1,59 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// check that std::__unwrap_iter() returns the correct type + +#include <algorithm> +#include <cassert> +#include <string> +#include <type_traits> + +#include "test_iterators.h" +#include "test_macros.h" + +template <class Iter> +using UnwrapT = decltype(std::__unwrap_iter(std::declval<Iter>())); + +template <class Iter> +using rev_iter = std::reverse_iterator<Iter>; + +template <class Iter> +using rev_rev_iter = rev_iter<rev_iter<Iter> >; + +static_assert(std::is_same<UnwrapT<int*>, int*>::value, ""); +static_assert(std::is_same<UnwrapT<std::__wrap_iter<int*> >, int*>::value, ""); +static_assert(std::is_same<UnwrapT<rev_iter<int*> >, std::reverse_iterator<int*> >::value, ""); +static_assert(std::is_same<UnwrapT<rev_rev_iter<int*> >, int*>::value, ""); +static_assert(std::is_same<UnwrapT<rev_rev_iter<std::__wrap_iter<int*> > >, int*>::value, ""); +static_assert(std::is_same<UnwrapT<rev_rev_iter<rev_iter<std::__wrap_iter<int*> > > >, rev_iter<std::__wrap_iter<int*> > >::value, ""); + +static_assert(std::is_same<UnwrapT<random_access_iterator<int*> >, random_access_iterator<int*> >::value, ""); +static_assert(std::is_same<UnwrapT<rev_iter<random_access_iterator<int*> > >, rev_iter<random_access_iterator<int*> > >::value, ""); +static_assert(std::is_same<UnwrapT<rev_rev_iter<random_access_iterator<int*> > >, random_access_iterator<int*> >::value, ""); +static_assert(std::is_same<UnwrapT<rev_rev_iter<rev_iter<random_access_iterator<int*> > > >, rev_iter<random_access_iterator<int*> > >::value, ""); + +TEST_CONSTEXPR_CXX20 bool test() { + std::string str = "Banane"; + using Iter = std::string::iterator; + + assert(std::__unwrap_iter(str.begin()) == str.data()); + assert(std::__unwrap_iter(str.end()) == str.data() + str.size()); + assert(std::__unwrap_iter(rev_rev_iter<Iter>(rev_iter<Iter>(str.begin()))) == str.data()); + assert(std::__unwrap_iter(rev_rev_iter<Iter>(rev_iter<Iter>(str.end()))) == str.data() + str.size()); + + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER > 17 + static_assert(test()); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx-03/language.support/support.dynamic/libcpp_deallocate.sh.cpp new file mode 100644 index 000000000000..7ead65caf9fd --- /dev/null +++ b/libcxx/test/libcxx-03/language.support/support.dynamic/libcpp_deallocate.sh.cpp @@ -0,0 +1,255 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Test libc++'s implementation of align_val_t, and the relevant new/delete +// overloads in all dialects when -faligned-allocation is present. + +// Libc++ when built for z/OS doesn't contain the aligned allocation functions, +// nor does the dynamic library shipped with z/OS. +// XFAIL: target={{.+}}-zos{{.*}} + +// XFAIL: sanitizer-new-delete && !hwasan + +// TODO: Investigate this failure +// UNSUPPORTED: ubsan + +// GCC doesn't support the aligned-allocation flags. +// XFAIL: gcc + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +// RUN: %{build} -faligned-allocation -fsized-deallocation +// RUN: %{run} +// RUN: %{build} -faligned-allocation -fno-sized-deallocation -DNO_SIZE +// RUN: %{run} +// RUN: %{build} -fno-aligned-allocation -fsized-deallocation -DNO_ALIGN +// RUN: %{run} +// RUN: %{build} -fno-aligned-allocation -fno-sized-deallocation -DNO_ALIGN -DNO_SIZE +// RUN: %{run} + +#include <cassert> +#include <cstdlib> +#include <new> + +#include "test_macros.h" + +TEST_DIAGNOSTIC_PUSH +TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header") +#include <__memory/aligned_alloc.h> +TEST_DIAGNOSTIC_POP + +struct alloc_stats { + alloc_stats() { reset(); } + + int aligned_sized_called; + int aligned_called; + int sized_called; + int plain_called; + int last_size; + int last_align; + + void reset() { + aligned_sized_called = aligned_called = sized_called = plain_called = 0; + last_align = last_size = -1; + } + + bool expect_plain() const { + assert(aligned_sized_called == 0); + assert(aligned_called == 0); + assert(sized_called == 0); + assert(last_size == -1); + assert(last_align == -1); + return plain_called == 1; + } + + bool expect_size(int n) const { + assert(plain_called == 0); + assert(aligned_sized_called == 0); + assert(aligned_called == 0); + assert(last_size == n); + assert(last_align == -1); + return sized_called == 1; + } + + bool expect_align(int a) const { + assert(plain_called == 0); + assert(aligned_sized_called == 0); + assert(sized_called == 0); + assert(last_size == -1); + assert(last_align == a); + return aligned_called == 1; + } + + bool expect_size_align(int n, int a) const { + assert(plain_called == 0); + assert(sized_called == 0); + assert(aligned_called == 0); + assert(last_size == n); + assert(last_align == a); + return aligned_sized_called == 1; + } +}; +alloc_stats stats; + +void operator delete(void* p) TEST_NOEXCEPT { + ::free(p); + stats.plain_called++; + stats.last_size = stats.last_align = -1; +} + +#ifndef NO_SIZE +void operator delete(void* p, std::size_t n) TEST_NOEXCEPT { + ::free(p); + stats.sized_called++; + stats.last_size = n; + stats.last_align = -1; +} +#endif + +#ifndef NO_ALIGN +void operator delete(void* p, std::align_val_t a) TEST_NOEXCEPT { + std::__libcpp_aligned_free(p); + stats.aligned_called++; + stats.last_align = static_cast<int>(a); + stats.last_size = -1; +} + +void operator delete(void* p, std::size_t n, std::align_val_t a) TEST_NOEXCEPT { + std::__libcpp_aligned_free(p); + stats.aligned_sized_called++; + stats.last_align = static_cast<int>(a); + stats.last_size = n; +} +#endif + +void test_libcpp_dealloc() { + void* p = nullptr; +#ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__ + std::size_t over_align_val = __STDCPP_DEFAULT_NEW_ALIGNMENT__ * 2; +#else + std::size_t over_align_val = TEST_ALIGNOF(std::max_align_t) * 2; +#endif + std::size_t under_align_val = TEST_ALIGNOF(int); + std::size_t with_size_val = 2; + + { + std::__libcpp_deallocate_unsized<char>(static_cast<char*>(p), under_align_val); + assert(stats.expect_plain()); + } + stats.reset(); + +#if defined(NO_SIZE) && defined(NO_ALIGN) + { + std::__libcpp_deallocate<char>(static_cast<char*>(p), std::__element_count(with_size_val), over_align_val); + assert(stats.expect_plain()); + } + stats.reset(); +#elif defined(NO_SIZE) + { + std::__libcpp_deallocate<char>(static_cast<char*>(p), std::__element_count(with_size_val), over_align_val); + assert(stats.expect_align(over_align_val)); + } + stats.reset(); +#elif defined(NO_ALIGN) + { + std::__libcpp_deallocate<char>(static_cast<char*>(p), std::__element_count(with_size_val), over_align_val); + assert(stats.expect_size(with_size_val)); + } + stats.reset(); +#else + { + std::__libcpp_deallocate<char>(static_cast<char*>(p), std::__element_count(with_size_val), over_align_val); + assert(stats.expect_size_align(with_size_val, over_align_val)); + } + stats.reset(); + { + std::__libcpp_deallocate_unsized<char>(static_cast<char*>(p), over_align_val); + assert(stats.expect_align(over_align_val)); + } + stats.reset(); + { + std::__libcpp_deallocate<char>(static_cast<char*>(p), std::__element_count(with_size_val), under_align_val); + assert(stats.expect_size(with_size_val)); + } + stats.reset(); +#endif +} + +struct TEST_ALIGNAS(128) AlignedType { + AlignedType() : elem(0) {} + TEST_ALIGNAS(128) char elem; +}; + +void test_allocator_and_new_match() { + stats.reset(); +#if defined(NO_SIZE) && defined(NO_ALIGN) + { + int* x = DoNotOptimize(new int(42)); + delete x; + assert(stats.expect_plain()); + } + stats.reset(); + { + AlignedType* a = DoNotOptimize(new AlignedType()); + delete a; + assert(stats.expect_plain()); + } + stats.reset(); +#elif defined(NO_SIZE) + stats.reset(); +# if TEST_STD_VER >= 11 + { + int* x = DoNotOptimize(new int(42)); + delete x; + assert(stats.expect_plain()); + } +# endif + stats.reset(); + { + AlignedType* a = DoNotOptimize(new AlignedType()); + delete a; + assert(stats.expect_align(TEST_ALIGNOF(AlignedType))); + } + stats.reset(); +#elif defined(NO_ALIGN) + stats.reset(); + { + int* x = DoNotOptimize(new int(42)); + delete x; + assert(stats.expect_size(sizeof(int))); + } + stats.reset(); + { + AlignedType* a = DoNotOptimize(new AlignedType()); + delete a; + assert(stats.expect_size(sizeof(AlignedType))); + } + stats.reset(); +#else + stats.reset(); + { + int* x = DoNotOptimize(new int(42)); + delete x; + assert(stats.expect_size(sizeof(int))); + } + stats.reset(); + { + AlignedType* a = DoNotOptimize(new AlignedType()); + delete a; + assert(stats.expect_size_align(sizeof(AlignedType), TEST_ALIGNOF(AlignedType))); + } + stats.reset(); +#endif +} + +int main(int, char**) { + test_libcpp_dealloc(); + test_allocator_and_new_match(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp b/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp new file mode 100644 index 000000000000..6c6b1d44cc8f --- /dev/null +++ b/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp @@ -0,0 +1,30 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// This test makes sure that we use the correct implementation for comparing +// type_info objects on Apple platforms. See https://llvm.org/PR45549. + +// REQUIRES: darwin + +#include <typeinfo> + +#if !defined(_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION) +# error "_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION should be defined on Apple platforms" +#endif + +#if defined(__x86_64__) || defined(__ARM_ARCH_7M__) +# if _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION != 1 +# error "_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION should be 1 (assume RTTI is merged) on Apple platforms" +# endif +#elif defined(__aarch64__) +# if _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION != 3 +# error "_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION should be 3 (use the special ARM RTTI) on Apple platforms" +# endif +#else +# error "This test should be updated to pin down the RTTI behavior on this ABI." +#endif diff --git a/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp b/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp new file mode 100644 index 000000000000..da82ea1d2c38 --- /dev/null +++ b/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp @@ -0,0 +1,48 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: no-rtti + +// In MSVC mode, the two anonymous types have identical type index in both object files. +// XFAIL: msvc + +// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1 +// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1 +// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1 +// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{flags} %{link_flags} -o %t.exe +// RUN: %{exec} %t.exe + +#include <cassert> +#include <typeindex> +#include <vector> + +extern std::vector<std::type_index> registry; + +void register1(); +void register2(); + +#if defined(TU1) + namespace { struct A { bool x; }; } + void register1() { registry.push_back(std::type_index(typeid(A))); } +#elif defined(TU2) + namespace { struct A { int x, y; }; } + void register2() { registry.push_back(std::type_index(typeid(A))); } +#elif defined(MAIN) + std::vector<std::type_index> registry; + + int main(int, char**) { + register1(); + register2(); + + assert(registry.size() == 2); + assert(registry[0] != registry[1]); + return 0; + } +#else +# error +#endif diff --git a/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp b/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp new file mode 100644 index 000000000000..9b94fcbc1c92 --- /dev/null +++ b/libcxx/test/libcxx-03/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp @@ -0,0 +1,45 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: no-rtti + +// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2 +// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2 +// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2 +// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{flags} %{link_flags} -o %t.exe +// RUN: %{exec} %t.exe + +#include <cassert> +#include <typeindex> +#include <vector> + +extern std::vector<std::type_index> registry; + +void register1(); +void register2(); + +#if defined(TU1) + namespace { struct A { bool x; }; } + void register1() { registry.push_back(std::type_index(typeid(A))); } +#elif defined(TU2) + namespace { struct A { int x, y; }; } + void register2() { registry.push_back(std::type_index(typeid(A))); } +#elif defined(MAIN) + std::vector<std::type_index> registry; + + int main(int, char**) { + register1(); + register2(); + + assert(registry.size() == 2); + assert(registry[0] == registry[1]); + return 0; + } +#else +# error +#endif diff --git a/libcxx/test/libcxx-03/libcpp_alignof.pass.cpp b/libcxx/test/libcxx-03/libcpp_alignof.pass.cpp new file mode 100644 index 000000000000..3ae7f7499d79 --- /dev/null +++ b/libcxx/test/libcxx-03/libcpp_alignof.pass.cpp @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Test that _LIBCPP_ALIGNOF acts the same as the C++11 keyword `alignof`, and +// not as the GNU extension `__alignof`. The former returns the minimal required +// alignment for a type, whereas the latter returns the preferred alignment. +// +// See llvm.org/PR39713 + +#include <type_traits> +#include "test_macros.h" + +template <class T> +void test() { + static_assert(_LIBCPP_ALIGNOF(T) == std::alignment_of<T>::value, ""); + static_assert(_LIBCPP_ALIGNOF(T) == TEST_ALIGNOF(T), ""); +#if TEST_STD_VER >= 11 + static_assert(_LIBCPP_ALIGNOF(T) == alignof(T), ""); +#endif +#ifdef TEST_COMPILER_CLANG + static_assert(_LIBCPP_ALIGNOF(T) == _Alignof(T), ""); +#endif +} + +int main(int, char**) { + test<int>(); + test<long long>(); + test<double>(); + test<long double>(); + return 0; +} diff --git a/libcxx/test/libcxx-03/libcpp_freestanding.sh.cpp b/libcxx/test/libcxx-03/libcpp_freestanding.sh.cpp new file mode 100644 index 000000000000..8dd7a8ac8521 --- /dev/null +++ b/libcxx/test/libcxx-03/libcpp_freestanding.sh.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Test that _LIBCPP_FREESTANDING is not defined when -ffreestanding is not passed +// to the compiler but defined when -ffreestanding is passed to the compiler. + +// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only %s +// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only -ffreestanding -DFREESTANDING %s + +#include <__config> + +#if defined(FREESTANDING) != defined(_LIBCPP_FREESTANDING) +#error _LIBCPP_FREESTANDING should be defined in freestanding mode and not \ + defined in non-freestanding mode +#endif diff --git a/libcxx/test/libcxx-03/lint/lint_headers.sh.py b/libcxx/test/libcxx-03/lint/lint_headers.sh.py new file mode 100644 index 000000000000..ab237c968da7 --- /dev/null +++ b/libcxx/test/libcxx-03/lint/lint_headers.sh.py @@ -0,0 +1,63 @@ +# RUN: %{python} %s + +# Verify that each run of consecutive #include directives +# in each libcxx/include/ header is maintained in alphabetical order. + +import glob +import os +import re + + +def exclude_from_consideration(path): + return ( + path.endswith(".txt") + or path.endswith(".modulemap.in") + or os.path.basename(path) == "__config" + or os.path.basename(path) == "__config_site.in" + or os.path.basename(path) == "libcxx.imp" + or os.path.basename(path).startswith("__pstl") + or not os.path.isfile(path) # TODO: Remove once PSTL integration is finished + ) + + +def check_for_pragma_GCC_system_header(pretty_fname, lines): + if pretty_fname not in ["__undef_macros"]: + for line in lines: + if re.match("# *pragma GCC system_header\n", line): + return True + print( + "FAILED TO FIND # pragma GCC system_header in libcxx/include/%s" + % pretty_fname + ) + return False + return True + + +if __name__ == "__main__": + libcxx_test_libcxx_lint = os.path.dirname(os.path.abspath(__file__)) + libcxx_include = os.path.abspath( + os.path.join(libcxx_test_libcxx_lint, "../../../include") + ) + assert os.path.isdir(libcxx_include) + + def pretty(path): + return path[len(libcxx_include) + 1 :] + + all_headers = [ + p + for p in ( + glob.glob(os.path.join(libcxx_include, "*")) + + glob.glob(os.path.join(libcxx_include, "__*/*.h")) + ) + if not exclude_from_consideration(p) + ] + + okay = True + for fname in all_headers: + pretty_fname = pretty(fname) + with open(fname, "r") as f: + lines = f.readlines() + + okay = check_for_pragma_GCC_system_header(pretty_fname, lines) and okay + + assert okay diff --git a/libcxx/test/libcxx-03/lit.local.cfg b/libcxx/test/libcxx-03/lit.local.cfg new file mode 100644 index 000000000000..2f2ebec94920 --- /dev/null +++ b/libcxx/test/libcxx-03/lit.local.cfg @@ -0,0 +1,7 @@ +# The tests in this directory need to run Python +import shlex +import sys + +# run libcxx-03 tests only when running against the frozen headers. We have separate tests for non-frozen headers. +if "FROZEN-CXX03-HEADERS-FIXME" not in config.available_features: + config.unsupported = True diff --git a/libcxx/test/libcxx-03/localization/lit.local.cfg b/libcxx/test/libcxx-03/localization/lit.local.cfg new file mode 100644 index 000000000000..ac628161afe7 --- /dev/null +++ b/libcxx/test/libcxx-03/localization/lit.local.cfg @@ -0,0 +1,7 @@ +# Load the same local configuration as the corresponding one in libcxx/test/std +import os + +inLibcxx = os.path.join("libcxx", "test", "libcxx-03") +inStd = os.path.join("libcxx", "test", "std") +localConfig = os.path.normpath(os.path.realpath(__file__)).replace(inLibcxx, inStd) +config.load_from_path(localConfig, lit_config) diff --git a/libcxx/test/libcxx-03/localization/locale.categories/__scan_keyword.pass.cpp b/libcxx/test/libcxx-03/localization/locale.categories/__scan_keyword.pass.cpp new file mode 100644 index 000000000000..1ecf378de5b6 --- /dev/null +++ b/libcxx/test/libcxx-03/localization/locale.categories/__scan_keyword.pass.cpp @@ -0,0 +1,121 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <locale> + +// Not a portable test + +// __scan_keyword +// Scans [__b, __e) until a match is found in the basic_strings range +// [__kb, __ke) or until it can be shown that there is no match in [__kb, __ke). +// __b will be incremented (visibly), consuming CharT until a match is found +// or proved to not exist. A keyword may be "", in which will match anything. +// If one keyword is a prefix of another, and the next CharT in the input +// might match another keyword, the algorithm will attempt to find the longest +// matching keyword. If the longer matching keyword ends up not matching, then +// no keyword match is found. If no keyword match is found, __ke is returned. +// Else an iterator pointing to the matching keyword is found. If more than +// one keyword matches, an iterator to the first matching keyword is returned. +// If on exit __b == __e, eofbit is set in __err. If __case_sensitive is false, +// __ct is used to force to lower case before comparing characters. +// Examples: +// Keywords: "a", "abb" +// If the input is "a", the first keyword matches and eofbit is set. +// If the input is "abc", no match is found and "ab" are consumed. +// +// template <class _InputIterator, class _ForwardIterator, class _Ctype> +// _ForwardIterator +// __scan_keyword(_InputIterator& __b, _InputIterator __e, +// _ForwardIterator __kb, _ForwardIterator __ke, +// const _Ctype& __ct, ios_base::iostate& __err, +// bool __case_sensitive = true); + +#include <locale> +#include <cassert> + +#include "test_macros.h" + +int main(int, char**) +{ + const std::ctype<char>& ct = std::use_facet<std::ctype<char> >(std::locale::classic()); + std::ios_base::iostate err = std::ios_base::goodbit; + { + const char input[] = "a"; + const char* in = input; + std::string keys[] = {"a", "abb"}; + err = std::ios_base::goodbit; + std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, + keys, keys+sizeof(keys)/sizeof(keys[0]), + ct, err); + assert(k - keys == 0); + assert(in == input+1); + assert(err == std::ios_base::eofbit); + } + { + const char input[] = "abc"; + const char* in = input; + std::string keys[] = {"a", "abb"}; + err = std::ios_base::goodbit; + std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, + keys, keys+sizeof(keys)/sizeof(keys[0]), + ct, err); + assert(k - keys == 2); + assert(in == input+2); + assert(err == std::ios_base::failbit); + } + { + const char input[] = "abb"; + const char* in = input; + std::string keys[] = {"a", "abb"}; + err = std::ios_base::goodbit; + std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, + keys, keys+sizeof(keys)/sizeof(keys[0]), + ct, err); + assert(k - keys == 1); + assert(in == input+3); + assert(err == std::ios_base::eofbit); + } + { + const char input[] = "Tue "; + const char* in = input; + std::string keys[] = {"Mon", "Monday", "Tue", "Tuesday"}; + err = std::ios_base::goodbit; + std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, + keys, keys+sizeof(keys)/sizeof(keys[0]), + ct, err); + assert(k - keys == 2); + assert(in == input+3); + assert(err == std::ios_base::goodbit); + } + { + const char input[] = "tue "; + const char* in = input; + std::string keys[] = {"Mon", "Monday", "Tue", "Tuesday"}; + err = std::ios_base::goodbit; + std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, + keys, keys+sizeof(keys)/sizeof(keys[0]), + ct, err); + assert(k - keys == 4); + assert(in == input+0); + assert(err == std::ios_base::failbit); + } + { + const char input[] = "tue "; + const char* in = input; + std::string keys[] = {"Mon", "Monday", "Tue", "Tuesday"}; + err = std::ios_base::goodbit; + std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, + keys, keys+sizeof(keys)/sizeof(keys[0]), + ct, err, false); + assert(k - keys == 2); + assert(in == input+3); + assert(err == std::ios_base::goodbit); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/localization/locales/locale.abort.pass.cpp b/libcxx/test/libcxx-03/localization/locales/locale.abort.pass.cpp new file mode 100644 index 000000000000..9a47eb8f13c6 --- /dev/null +++ b/libcxx/test/libcxx-03/localization/locales/locale.abort.pass.cpp @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <locale> + +// class locale; + +// explicit locale( const char* std_name ); + +// REQUIRES: no-exceptions + +// Make sure we abort() when we construct a locale with a null name and +// exceptions are disabled. + +#include <csignal> +#include <cstdlib> +#include <locale> + +#include "test_macros.h" + + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::locale loc(NULL); + (void)loc; + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/localization/locales/locale.category.abort.pass.cpp b/libcxx/test/libcxx-03/localization/locales/locale.category.abort.pass.cpp new file mode 100644 index 000000000000..9b321e6b1fd3 --- /dev/null +++ b/libcxx/test/libcxx-03/localization/locales/locale.category.abort.pass.cpp @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <locale> + +// class locale; + +// locale(const locale& other, const char* std_name, category cat); + +// REQUIRES: no-exceptions + +// Make sure we abort() when we construct a locale with a null name and +// exceptions are disabled. + +#include <csignal> +#include <cstdlib> +#include <locale> + +#include "test_macros.h" + + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::locale loc(std::locale(), NULL, std::locale::ctype); + (void)loc; + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp b/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp new file mode 100644 index 000000000000..072c85a11d2b --- /dev/null +++ b/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp @@ -0,0 +1,56 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <locale> + +// class locale::facet +// { +// protected: +// explicit facet(size_t refs = 0); +// virtual ~facet(); +// facet(const facet&) = delete; +// void operator=(const facet&) = delete; +// }; + +// This test isn't portable + +#include <locale> +#include <cassert> + +#include "test_macros.h" + +struct my_facet + : public std::locale::facet +{ + static int count; + my_facet(unsigned refs = 0) + : std::locale::facet(refs) + {++count;} + + ~my_facet() {--count;} +}; + +int my_facet::count = 0; + +int main(int, char**) +{ + my_facet* f = new my_facet; + f->__add_shared(); + assert(my_facet::count == 1); + f->__release_shared(); + assert(my_facet::count == 0); + f = new my_facet(1); + f->__add_shared(); + assert(my_facet::count == 1); + f->__release_shared(); + assert(my_facet::count == 1); + f->__release_shared(); + assert(my_facet::count == 0); + + return 0; +} diff --git a/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.facet/no_allocation.pass.cpp b/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.facet/no_allocation.pass.cpp new file mode 100644 index 000000000000..6e59b8256ffe --- /dev/null +++ b/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.facet/no_allocation.pass.cpp @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <locale> + +// This test verifies that the construction of locale::__imp does not allocate +// for facets, as it uses __sso_allocator<facet*, N>. It would fail if new +// facets have been added (using install()) but N hasn't been adjusted to +// account for them. + +#include <cassert> + +#include "count_new.h" + +int main(int, char**) { + assert(globalMemCounter.checkOutstandingNewEq(0)); + return 0; +} diff --git a/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.id/id.pass.cpp b/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.id/id.pass.cpp new file mode 100644 index 000000000000..5e0113474c9d --- /dev/null +++ b/libcxx/test/libcxx-03/localization/locales/locale/locale.types/locale.id/id.pass.cpp @@ -0,0 +1,53 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <locale> + +// class locale::id +// { +// public: +// id(); +// void operator=(const id&) = delete; +// id(const id&) = delete; +// }; + +// This test isn't portable + +#include <locale> +#include <cassert> + +#include "test_macros.h" + +std::locale::id id0; +std::locale::id id2; +std::locale::id id1; + +int main(int, char**) +{ + long id = id0.__get(); + assert(id0.__get() == id+0); + assert(id0.__get() == id+0); + assert(id0.__get() == id+0); + assert(id1.__get() == id+1); + assert(id1.__get() == id+1); + assert(id1.__get() == id+1); + assert(id2.__get() == id+2); + assert(id2.__get() == id+2); + assert(id2.__get() == id+2); + assert(id0.__get() == id+0); + assert(id0.__get() == id+0); + assert(id0.__get() == id+0); + assert(id1.__get() == id+1); + assert(id1.__get() == id+1); + assert(id1.__get() == id+1); + assert(id2.__get() == id+2); + assert(id2.__get() == id+2); + assert(id2.__get() == id+2); + + return 0; +} diff --git a/libcxx/test/libcxx-03/localization/locales/use_facet.abort.pass.cpp b/libcxx/test/libcxx-03/localization/locales/use_facet.abort.pass.cpp new file mode 100644 index 000000000000..9b4755a819cb --- /dev/null +++ b/libcxx/test/libcxx-03/localization/locales/use_facet.abort.pass.cpp @@ -0,0 +1,39 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <locale> + +// template <class Facet> const Facet& use_facet(const locale& loc); + +// REQUIRES: no-exceptions + +// Make sure we abort() when we pass a facet not associated to the locale to +// use_facet() and exceptions are disabled. + +#include <csignal> +#include <cstdlib> +#include <locale> + +#include "test_macros.h" + + +struct my_facet : public std::locale::facet { + static std::locale::id id; +}; + +std::locale::id my_facet::id; + +void exit_success(int) { + std::_Exit(EXIT_SUCCESS); +} + +int main(int, char**) { + std::signal(SIGABRT, exit_success); + std::use_facet<my_facet>(std::locale()); + return EXIT_FAILURE; +} diff --git a/libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp b/libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp new file mode 100644 index 000000000000..5e71decdcabb --- /dev/null +++ b/libcxx/test/libcxx-03/memory/allocation_guard.pass.cpp @@ -0,0 +1,192 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// <memory> + +// To allow checking that self-move works correctly. +// ADDITIONAL_COMPILE_FLAGS: -Wno-self-move + +// template<class _Alloc> +// struct __allocation_guard; + +#include <__cxx03/__memory/allocation_guard.h> +#include <cassert> +#include <type_traits> +#include <utility> + +#include "test_allocator.h" + +using A = test_allocator<int>; + +// A trimmed-down version of `test_allocator` that is copy-assignable (in general allocators don't have to support copy +// assignment). +template <class T> +struct AssignableAllocator { + using size_type = unsigned; + using difference_type = int; + using value_type = T; + using pointer = value_type*; + using const_pointer = const value_type*; + using reference = typename std::add_lvalue_reference<value_type>::type; + using const_reference = typename std::add_lvalue_reference<const value_type>::type; + + template <class U> + struct rebind { + using other = test_allocator<U>; + }; + + test_allocator_statistics* stats_ = nullptr; + + explicit AssignableAllocator(test_allocator_statistics& stats) : stats_(&stats) { + ++stats_->count; + } + + TEST_CONSTEXPR_CXX14 AssignableAllocator(const AssignableAllocator& rhs) TEST_NOEXCEPT + : stats_(rhs.stats_) { + if (stats_ != nullptr) { + ++stats_->count; + ++stats_->copied; + } + } + + TEST_CONSTEXPR_CXX14 AssignableAllocator& operator=(const AssignableAllocator& rhs) TEST_NOEXCEPT { + stats_ = rhs.stats_; + if (stats_ != nullptr) { + ++stats_->count; + ++stats_->copied; + } + + return *this; + } + + TEST_CONSTEXPR_CXX14 pointer allocate(size_type n, const void* = nullptr) { + if (stats_ != nullptr) { + ++stats_->alloc_count; + } + return std::allocator<value_type>().allocate(n); + } + + TEST_CONSTEXPR_CXX14 void deallocate(pointer p, size_type s) { + if (stats_ != nullptr) { + --stats_->alloc_count; + } + std::allocator<value_type>().deallocate(p, s); + } + + TEST_CONSTEXPR size_type max_size() const TEST_NOEXCEPT { return UINT_MAX / sizeof(T); } + + template <class U> + TEST_CONSTEXPR_CXX20 void construct(pointer p, U&& val) { + if (stats_ != nullptr) + ++stats_->construct_count; +#if TEST_STD_VER > 17 + std::construct_at(std::to_address(p), std::forward<U>(val)); +#else + ::new (static_cast<void*>(p)) T(std::forward<U>(val)); +#endif + } + + TEST_CONSTEXPR_CXX14 void destroy(pointer p) { + if (stats_ != nullptr) { + ++stats_->destroy_count; + } + p->~T(); + } +}; + +// Move-only. +static_assert(!std::is_copy_constructible<std::__allocation_guard<A> >::value, ""); +static_assert(std::is_move_constructible<std::__allocation_guard<A> >::value, ""); +static_assert(!std::is_copy_assignable<std::__allocation_guard<A> >::value, ""); +static_assert(std::is_move_assignable<std::__allocation_guard<A> >::value, ""); + +int main(int, char**) { + const int size = 42; + + { // The constructor allocates using the given allocator. + test_allocator_statistics stats; + std::__allocation_guard<A> guard(A(&stats), size); + assert(stats.alloc_count == 1); + assert(guard.__get() != nullptr); + } + + { // The destructor deallocates using the given allocator. + test_allocator_statistics stats; + { + std::__allocation_guard<A> guard(A(&stats), size); + assert(stats.alloc_count == 1); + } + assert(stats.alloc_count == 0); + } + + { // `__release_ptr` prevents deallocation. + test_allocator_statistics stats; + A alloc(&stats); + int* ptr = nullptr; + { + std::__allocation_guard<A> guard(alloc, size); + assert(stats.alloc_count == 1); + ptr = guard.__release_ptr(); + } + assert(stats.alloc_count == 1); + alloc.deallocate(ptr, size); + } + + { // Using the move constructor doesn't lead to double deletion. + test_allocator_statistics stats; + { + std::__allocation_guard<A> guard1(A(&stats), size); + assert(stats.alloc_count == 1); + auto* ptr1 = guard1.__get(); + + std::__allocation_guard<A> guard2 = std::move(guard1); + assert(stats.alloc_count == 1); + assert(guard1.__get() == nullptr); + assert(guard2.__get() == ptr1); + } + assert(stats.alloc_count == 0); + } + + { // Using the move assignment operator doesn't lead to double deletion. + using A2 = AssignableAllocator<int>; + + test_allocator_statistics stats; + { + std::__allocation_guard<A2> guard1(A2(stats), size); + assert(stats.alloc_count == 1); + std::__allocation_guard<A2> guard2(A2(stats), size); + assert(stats.alloc_count == 2); + auto* ptr1 = guard1.__get(); + + guard2 = std::move(guard1); + assert(stats.alloc_count == 1); + assert(guard1.__get() == nullptr); + assert(guard2.__get() == ptr1); + } + assert(stats.alloc_count == 0); + } + + { // Self-assignment is a no-op. + using A2 = AssignableAllocator<int>; + + test_allocator_statistics stats; + { + std::__allocation_guard<A2> guard(A2(stats), size); + assert(stats.alloc_count == 1); + auto* ptr = guard.__get(); + + guard = std::move(guard); + assert(stats.alloc_count == 1); + assert(guard.__get() == ptr); + } + assert(stats.alloc_count == 0); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/memory/allocator_void.trivial.compile.pass.cpp b/libcxx/test/libcxx-03/memory/allocator_void.trivial.compile.pass.cpp new file mode 100644 index 000000000000..b7dfc190e8e9 --- /dev/null +++ b/libcxx/test/libcxx-03/memory/allocator_void.trivial.compile.pass.cpp @@ -0,0 +1,26 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Make sure that std::allocator<void> is trivial. This was the case before C++20 +// with the std::allocator<void> explicit specialization, and this test makes sure +// that we maintain that property across all standards. +// +// This is important since triviality has implications on how the type is passed +// as a function argument in the ABI. + +#include <memory> +#include <type_traits> + +typedef std::allocator<void> A1; +struct A2 : std::allocator<void> { }; + +static_assert(std::is_trivially_default_constructible<A1>::value, ""); +static_assert(std::is_trivially_copyable<A1>::value, ""); + +static_assert(std::is_trivially_default_constructible<A2>::value, ""); +static_assert(std::is_trivially_copyable<A2>::value, ""); diff --git a/libcxx/test/libcxx-03/memory/allocator_volatile.verify.cpp b/libcxx/test/libcxx-03/memory/allocator_volatile.verify.cpp new file mode 100644 index 000000000000..53fdc08e7a02 --- /dev/null +++ b/libcxx/test/libcxx-03/memory/allocator_volatile.verify.cpp @@ -0,0 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// http://wg21.link/LWG2447 gives implementors freedom to reject const or volatile types in `std::allocator`. + +#include <memory> + +std::allocator<const int> A1; // expected-error@*:* {{std::allocator does not support const types}} +std::allocator<volatile int> A2; // expected-error@*:* {{std::allocator does not support volatile types}} diff --git a/libcxx/test/libcxx-03/memory/is_allocator.pass.cpp b/libcxx/test/libcxx-03/memory/is_allocator.pass.cpp new file mode 100644 index 000000000000..cf11d077bf08 --- /dev/null +++ b/libcxx/test/libcxx-03/memory/is_allocator.pass.cpp @@ -0,0 +1,43 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// <memory> +// UNSUPPORTED: c++03, c++11, c++14 + +// template<typename _Alloc> +// struct __is_allocator; + +// Is either true_type or false_type depending on if A is an allocator. + +#include <memory> +#include <string> + +#include "test_macros.h" +#include "min_allocator.h" +#include "test_allocator.h" + +template <typename T> +void test_allocators() +{ + static_assert(!std::__is_allocator<T>::value, "" ); + static_assert( std::__is_allocator<std::allocator<T>>::value, "" ); + static_assert( std::__is_allocator<test_allocator<T>>::value, "" ); + static_assert( std::__is_allocator<min_allocator<T>>::value, "" ); +} + + +int main(int, char**) +{ + // test_allocators<void>(); + test_allocators<char>(); + test_allocators<int>(); + test_allocators<std::string>(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp b/libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp new file mode 100644 index 000000000000..38dde7a1bf63 --- /dev/null +++ b/libcxx/test/libcxx-03/memory/swap_allocator.pass.cpp @@ -0,0 +1,81 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// <memory> + +// template <typename _Alloc> +// void __swap_allocator(_Alloc& __a1, _Alloc& __a2); + +#include <__cxx03/__memory/swap_allocator.h> +#include <cassert> +#include <memory> +#include <utility> + +#include "test_macros.h" + +template <bool Propagate, bool Noexcept> +struct Alloc { + int i = 0; + Alloc() = default; + Alloc(int set_i) : i(set_i) {} + + using value_type = int; + using propagate_on_container_swap = std::integral_constant<bool, Propagate>; + + friend void swap(Alloc& a1, Alloc& a2) TEST_NOEXCEPT_COND(Noexcept) { + std::swap(a1.i, a2.i); + } + +}; + +using PropagatingAlloc = Alloc</*Propagate=*/true, /*Noexcept=*/true>; +static_assert(std::allocator_traits<PropagatingAlloc>::propagate_on_container_swap::value, ""); + +using NonPropagatingAlloc = Alloc</*Propagate=*/false, /*Noexcept=*/true>; +static_assert(!std::allocator_traits<NonPropagatingAlloc>::propagate_on_container_swap::value, ""); + +using NoexceptSwapAlloc = Alloc</*Propagate=*/true, /*Noexcept=*/true>; +using ThrowingSwapAlloc = Alloc</*Propagate=*/true, /*Noexcept=*/false>; + +int main(int, char**) { + { + PropagatingAlloc a1(1), a2(42); + std::__swap_allocator(a1, a2); + assert(a1.i == 42); + assert(a2.i == 1); + } + + { + NonPropagatingAlloc a1(1), a2(42); + std::__swap_allocator(a1, a2); + assert(a1.i == 1); + assert(a2.i == 42); + } + +#if TEST_STD_VER >= 11 + { + NoexceptSwapAlloc noexcept_alloc; + static_assert(noexcept(std::__swap_allocator(noexcept_alloc, noexcept_alloc)), ""); + } + +#if TEST_STD_VER > 11 + { // From C++14, `__swap_allocator` is unconditionally noexcept. + ThrowingSwapAlloc throwing_alloc; + static_assert(noexcept(std::__swap_allocator(throwing_alloc, throwing_alloc)), ""); + } +#else + { // Until C++14, `__swap_allocator` is only noexcept if the underlying `swap` function is `noexcept`. + ThrowingSwapAlloc throwing_alloc; + static_assert(!noexcept(std::__swap_allocator(throwing_alloc, throwing_alloc)), ""); + } +#endif // TEST_STD_VER > 11 +#endif // TEST_STD_VER >= 11 + + return 0; +} diff --git a/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_arg.pass.cpp b/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_arg.pass.cpp new file mode 100644 index 000000000000..8a7367bf2974 --- /dev/null +++ b/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_arg.pass.cpp @@ -0,0 +1,52 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// Test unique_ptr<T> with trivial_abi as parameter type. + +// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI + +// XFAIL: gcc + +#include <memory> +#include <cassert> + +__attribute__((noinline)) void call_something() { asm volatile(""); } + +struct Node { + int* shared_val; + + explicit Node(int* ptr) : shared_val(ptr) {} + ~Node() { ++(*shared_val); } +}; + +__attribute__((noinline)) bool get_val(std::unique_ptr<Node> /*unused*/) { + call_something(); + return true; +} + +__attribute__((noinline)) void expect_1(int* shared, bool /*unused*/) { + assert(*shared == 1); +} + +int main(int, char**) { + int shared = 0; + + // Without trivial-abi, the unique_ptr is deleted at the end of this + // statement; expect_1 will see shared == 0 because it's not incremented (in + // ~Node()) until expect_1 returns. + // + // With trivial-abi, expect_1 will see shared == 1 because shared_val is + // incremented before get_val returns. + expect_1(&shared, get_val(std::unique_ptr<Node>(new Node(&shared)))); + + // Check that the shared-value is still 1. + expect_1(&shared, true); + return 0; +} diff --git a/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp b/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp new file mode 100644 index 000000000000..8752ba5a01d6 --- /dev/null +++ b/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp @@ -0,0 +1,68 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// Test arguments destruction order involving unique_ptr<T> with trivial_abi. + +// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI + +// XFAIL: gcc + +#include <memory> +#include <cassert> + +#include "test_macros.h" + +__attribute__((noinline)) void call_something() { asm volatile(""); } + +struct Base { + char* shared_buff; + int* cur_idx; + const char id; + + explicit Base(char* buf, int* idx, char ch) + : shared_buff(buf), cur_idx(idx), id(ch) {} + Base(const Base& other) = default; + Base& operator=(const Base&) = delete; + ~Base() { shared_buff[(*cur_idx)++] = id; } +}; + +struct A : Base { + explicit A(char* buf, int* idx) : Base(buf, idx, 'A') {} +}; + +struct B : Base { + explicit B(char* buf, int* idx) : Base(buf, idx, 'B') {} +}; + +struct C : Base { + explicit C(char* buf, int* idx) : Base(buf, idx, 'C') {} +}; + +__attribute__((noinline)) void func(A /*unused*/, std::unique_ptr<B> /*unused*/, + C /*unused*/) { + call_something(); +} + +int main(int, char**) { + char shared_buf[3] = {'0', '0', '0'}; + int cur_idx = 0; + + func(A(shared_buf, &cur_idx), std::unique_ptr<B>(new B(shared_buf, &cur_idx)), + C(shared_buf, &cur_idx)); + +#if defined(TEST_ABI_MICROSOFT) + // On Microsoft ABI, the dtor order is always A,B,C (because callee-destroyed) + assert(shared_buf[0] == 'A' && shared_buf[1] == 'B' && shared_buf[2] == 'C'); +#else + // With trivial_abi, the std::unique_ptr<B> arg is always destructed first. + assert(shared_buf[0] == 'B'); +#endif + return 0; +} diff --git a/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_ret.pass.cpp b/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_ret.pass.cpp new file mode 100644 index 000000000000..65e9069e07a1 --- /dev/null +++ b/libcxx/test/libcxx-03/memory/trivial_abi/unique_ptr_ret.pass.cpp @@ -0,0 +1,59 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// Test unique_ptr<T> with trivial_abi as return-type. + +// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI + +// XFAIL: gcc + +#include <memory> +#include <cassert> + +__attribute__((noinline)) void call_something() { asm volatile(""); } + +struct Node { + explicit Node() {} + Node(const Node&) = default; + Node& operator=(const Node&) = default; + ~Node() {} +}; + +__attribute__((noinline)) std::unique_ptr<Node> make_val(void** local_addr) { + call_something(); + + auto ret = std::unique_ptr<Node>(new Node); + + // Capture the local address of ret. + *local_addr = &ret; + + return ret; +} + +int main(int, char**) { + void* local_addr = nullptr; + auto ret = make_val(&local_addr); + assert(local_addr != nullptr); + + // Without trivial_abi, &ret == local_addr because the return value + // is allocated here in main's stackframe. + // + // With trivial_abi, local_addr is the address of a local variable in + // make_val, and hence different from &ret. +#if !defined(__i386__) && !defined(_WIN32) && !defined(_AIX) + // On X86, structs are never returned in registers. + // On AIX, structs are never returned in registers. + // Thus, unique_ptr will be passed indirectly even if it is trivial. + // On Windows, structs with a destructor are always returned indirectly. + assert((void*)&ret != local_addr); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/memory/trivial_abi/weak_ptr_ret.pass.cpp b/libcxx/test/libcxx-03/memory/trivial_abi/weak_ptr_ret.pass.cpp new file mode 100644 index 000000000000..0b1a434ee45b --- /dev/null +++ b/libcxx/test/libcxx-03/memory/trivial_abi/weak_ptr_ret.pass.cpp @@ -0,0 +1,62 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// Test weak_ptr<T> with trivial_abi as return-type. + +// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI + +// XFAIL: gcc + +#include <memory> +#include <cassert> + +__attribute__((noinline)) void call_something() { asm volatile(""); } + +struct Node { + explicit Node() {} + Node(const Node&) = default; + Node& operator=(const Node&) = default; + ~Node() {} +}; + +__attribute__((noinline)) std::weak_ptr<Node> +make_val(std::shared_ptr<Node>& sptr, void** local_addr) { + call_something(); + + std::weak_ptr<Node> ret; + ret = sptr; + + // Capture the local address of ret. + *local_addr = &ret; + + return ret; +} + +int main(int, char**) { + void* local_addr = nullptr; + auto sptr = std::make_shared<Node>(); + std::weak_ptr<Node> ret = make_val(sptr, &local_addr); + assert(local_addr != nullptr); + + // Without trivial_abi, &ret == local_addr because the return value + // is allocated here in main's stackframe. + // + // With trivial_abi, local_addr is the address of a local variable in + // make_val, and hence different from &ret. +#if !defined(__i386__) && !defined(__arm__) && !defined(_WIN32) && !defined(_AIX) + // On X86, structs are never returned in registers. + // On AIX, structs are never returned in registers. + // On ARM32, structs larger than 4 bytes cannot be returned in registers. + // On Windows, structs with a destructor are always returned indirectly. + // Thus, weak_ptr will be passed indirectly even if it is trivial. + assert((void*)&ret != local_addr); +#endif + return 0; +} diff --git a/libcxx/test/libcxx-03/memory/uninitialized_allocator_copy.pass.cpp b/libcxx/test/libcxx-03/memory/uninitialized_allocator_copy.pass.cpp new file mode 100644 index 000000000000..679ee8684468 --- /dev/null +++ b/libcxx/test/libcxx-03/memory/uninitialized_allocator_copy.pass.cpp @@ -0,0 +1,67 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: no-exceptions + +// ensure that __uninitialized_allocator_copy calls the proper construct and destruct functions + +#include <algorithm> +#include <iterator> +#include <memory> + +#include "test_allocator.h" + +template <class T> +class construct_counting_allocator { +public: + using value_type = T; + + int* constructed_count_; + int* max_constructed_count_; + + construct_counting_allocator(int* constructed_count, int* max_constructed_count) + : constructed_count_(constructed_count), max_constructed_count_(max_constructed_count) {} + + template <class... Args> + void construct(T* ptr, Args&&... args) { + ::new (static_cast<void*>(ptr)) T(args...); + ++*constructed_count_; + *max_constructed_count_ = std::max(*max_constructed_count_, *constructed_count_); + } + + void destroy(T* ptr) { + --*constructed_count_; + ptr->~T(); + } +}; + +int throw_if_zero = 15; + +struct ThrowSometimes { + ThrowSometimes() = default; + ThrowSometimes(const ThrowSometimes&) { + if (--throw_if_zero == 0) + throw 1; + } +}; + +int main(int, char**) { + int constructed_count = 0; + int max_constructed_count = 0; + construct_counting_allocator<ThrowSometimes> alloc(&constructed_count, &max_constructed_count); + ThrowSometimes in[20]; + TEST_ALIGNAS_TYPE(ThrowSometimes) char out[sizeof(ThrowSometimes) * 20]; + try { + std::__uninitialized_allocator_copy( + alloc, std::begin(in), std::end(in), reinterpret_cast<ThrowSometimes*>(std::begin(out))); + } catch (...) { + } + + assert(constructed_count == 0); + assert(max_constructed_count == 14); +} diff --git a/libcxx/test/libcxx-03/module_std.gen.py b/libcxx/test/libcxx-03/module_std.gen.py new file mode 100644 index 000000000000..fc23985caf30 --- /dev/null +++ b/libcxx/test/libcxx-03/module_std.gen.py @@ -0,0 +1,38 @@ +# ===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ===----------------------------------------------------------------------===## + +# Test that all named declarations with external linkage match the +# exported declarations in their associated module partition. +# Then it tests the sum of the exported declarations in the module +# partitions matches the export of the std module. + +# Note the test of the std module requires all partitions to be tested +# first. Since lit tests have no dependencies, this means the test needs +# to be one monolitic test. Since the test doesn't take very long it's +# not a huge issue. + +# RUN: %{python} %s %{libcxx-dir}/utils + +import sys + +sys.path.append(sys.argv[1]) +from libcxx.test.modules import module_test_generator + +generator = module_test_generator( + "%t", + "%{module-dir}", + "%{clang-tidy}", + "%{test-tools-dir}/clang_tidy_checks/libcxx-tidy.plugin", + "%{cxx}", + "%{flags} %{compile_flags}", + "std", +) + + +print("//--- module_std.sh.cpp") +generator.write_test("std") diff --git a/libcxx/test/libcxx-03/module_std_compat.gen.py b/libcxx/test/libcxx-03/module_std_compat.gen.py new file mode 100644 index 000000000000..000aa2998612 --- /dev/null +++ b/libcxx/test/libcxx-03/module_std_compat.gen.py @@ -0,0 +1,42 @@ +# ===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ===----------------------------------------------------------------------===## + +# Test that all named declarations with external linkage match the +# exported declarations in their associated module partition. +# Then it tests the sum of the exported declarations in the module +# partitions matches the export of the std.compat module. + +# Note the test of the std.compat module requires all partitions to be tested +# first. Since lit tests have no dependencies, this means the test needs +# to be one monolitic test. Since the test doesn't take very long it's +# not a huge issue. + +# RUN: %{python} %s %{libcxx-dir}/utils + +import sys + +sys.path.append(sys.argv[1]) +from libcxx.header_information import module_c_headers +from libcxx.test.modules import module_test_generator + +generator = module_test_generator( + "%t", + "%{module-dir}", + "%{clang-tidy}", + "%{test-tools-dir}/clang_tidy_checks/libcxx-tidy.plugin", + "%{cxx}", + "%{flags} %{compile_flags}", + "std.compat", +) + + +print("//--- module_std_compat.sh.cpp") +generator.write_test( + "std.compat", + module_c_headers, +) diff --git a/libcxx/test/libcxx-03/no_assert_include.gen.py b/libcxx/test/libcxx-03/no_assert_include.gen.py new file mode 100644 index 000000000000..e0dbc3d815f3 --- /dev/null +++ b/libcxx/test/libcxx-03/no_assert_include.gen.py @@ -0,0 +1,39 @@ +# ===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ===----------------------------------------------------------------------===## + +# Ensure that none of the standard C++ headers implicitly include cassert or +# assert.h (because assert() is implemented as a macro). + +# RUN: %{python} %s %{libcxx-dir}/utils + +import sys + +sys.path.append(sys.argv[1]) +from libcxx.header_information import ( + lit_header_restrictions, + lit_header_undeprecations, + public_headers, +) + +for header in public_headers: + if header == "cassert": + continue + + print( + f"""\ +//--- {header}.compile.pass.cpp +{lit_header_restrictions.get(header, '')} +{lit_header_undeprecations.get(header, '')} + +#include <{header}> + +#ifdef assert +# error "Do not include cassert or assert.h in standard header files" +#endif +""" + ) diff --git a/libcxx/test/libcxx-03/numerics/bit.ops.pass.cpp b/libcxx/test/libcxx-03/numerics/bit.ops.pass.cpp new file mode 100644 index 000000000000..0b82f352ffe3 --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/bit.ops.pass.cpp @@ -0,0 +1,37 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Test the __XXXX routines in the <bit> header. +// These are not supposed to be exhaustive tests, just sanity checks. + +#include <__cxx03/__bit/countl.h> +#include <__cxx03/__bit/rotate.h> +#include <cassert> + +#include "test_macros.h" + +TEST_CONSTEXPR_CXX14 bool test() { + const unsigned v = 0x12345678; + + ASSERT_SAME_TYPE(unsigned, decltype(std::__rotr(v, 3))); + ASSERT_SAME_TYPE(int, decltype(std::__countl_zero(v))); + + assert(std::__rotr(v, 3) == 0x02468acfU); + assert(std::__countl_zero(v) == 3); + + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER > 11 + static_assert(test(), ""); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/numerics/clamp_to_integral.pass.cpp b/libcxx/test/libcxx-03/numerics/clamp_to_integral.pass.cpp new file mode 100644 index 000000000000..d8ac80d4d2fc --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/clamp_to_integral.pass.cpp @@ -0,0 +1,92 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// __clamp_to_integral<IntT>(RealT) + +// Test the conversion function that truncates floating point types to the +// closest representable value for the specified integer type, or +// numeric_limits<IntT>::max()/min() if the value isn't representable. + +#include <__cxx03/__random/clamp_to_integral.h> +#include <cassert> +#include <cmath> +#include <limits> + +template <class IntT> +void test() { + typedef std::numeric_limits<IntT> Lim; + const bool MaxIsRepresentable = sizeof(IntT) < 8; + const bool IsSigned = std::is_signed<IntT>::value; + struct TestCase { + double Input; + IntT Expect; + bool IsRepresentable; + } TestCases[] = { + {0, 0, true}, + {1, 1, true}, + {IsSigned ? static_cast<IntT>(-1) : 0, + IsSigned ? static_cast<IntT>(-1) : 0, true}, + {Lim::lowest(), Lim::lowest(), true}, + {static_cast<double>(Lim::max()), Lim::max(), MaxIsRepresentable}, + {static_cast<double>(Lim::max()) + 1, Lim::max(), false}, + {static_cast<double>(Lim::max()) + 1024, Lim::max(), false}, + {nextafter(static_cast<double>(Lim::max()), INFINITY), Lim::max(), false}, + }; + for (TestCase TC : TestCases) { + auto res = std::__clamp_to_integral<IntT>(TC.Input); + assert(res == TC.Expect); + if (TC.IsRepresentable) { + auto other = static_cast<IntT>(std::trunc(TC.Input)); + assert(res == other); + } else + assert(res == Lim::min() || res == Lim::max()); + } +} + +template <class IntT> +void test_float() { + typedef std::numeric_limits<IntT> Lim; + const bool MaxIsRepresentable = sizeof(IntT) < 4; + ((void)MaxIsRepresentable); + const bool IsSigned = std::is_signed<IntT>::value; + struct TestCase { + float Input; + IntT Expect; + bool IsRepresentable; + } TestCases[] = { + {0, 0, true}, + {1, 1, true}, + {IsSigned ? static_cast<IntT>(-1) : 0, + IsSigned ? static_cast<IntT>(-1) : 0, true}, + {Lim::lowest(), Lim::lowest(), true}, + {static_cast<float>(Lim::max()), Lim::max(), MaxIsRepresentable }, + {nextafter(static_cast<float>(Lim::max()), INFINITY), Lim::max(), false}, + }; + for (TestCase TC : TestCases) { + auto res = std::__clamp_to_integral<IntT>(TC.Input); + assert(res == TC.Expect); + if (TC.IsRepresentable) { + auto other = static_cast<IntT>(std::trunc(TC.Input)); + assert(res == other); + } else + assert(res == Lim::min() || res == Lim::max()); + } +} + +int main(int, char**) { + test<short>(); + test<unsigned short>(); + test<int>(); + test<unsigned>(); + test<long long>(); + test<unsigned long long>(); + test_float<short>(); + test_float<int>(); + test_float<long long>(); + return 0; +} diff --git a/libcxx/test/libcxx-03/numerics/complex.number/__sqr.pass.cpp b/libcxx/test/libcxx-03/numerics/complex.number/__sqr.pass.cpp new file mode 100644 index 000000000000..97f4a2419483 --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/complex.number/__sqr.pass.cpp @@ -0,0 +1,84 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <complex> + +// template<class T> +// complex<T> +// __sqr(const complex<T>& x); + +#include <complex> +#include <cassert> + +#include "test_macros.h" + +template <class T> +void +test() +{ + const T tolerance = std::is_same<T, float>::value ? 1.e-6 : 1.e-14; + + typedef std::complex<T> cplx; + struct test_case + { + cplx value; + cplx expected; + }; + + const test_case cases[] = { + {cplx( 0, 0), cplx( 0, 0)}, + {cplx( 1, 0), cplx( 1, 0)}, + {cplx( 2, 0), cplx( 4, 0)}, + {cplx(-1, 0), cplx( 1, 0)}, + {cplx( 0, 1), cplx(-1, 0)}, + {cplx( 0, 2), cplx(-4, 0)}, + {cplx( 0, -1), cplx(-1, 0)}, + {cplx( 1, 1), cplx( 0, 2)}, + {cplx( 1, -1), cplx( 0, -2)}, + {cplx(-1, -1), cplx( 0, 2)}, + {cplx(0.5, 0), cplx(0.25, 0)}, + }; + + const unsigned num_cases = sizeof(cases) / sizeof(test_case); + for (unsigned i = 0; i < num_cases; ++i) + { + const test_case& test = cases[i]; + const std::complex<T> actual = std::__sqr(test.value); + assert(std::abs(actual.real() - test.expected.real()) < tolerance); + assert(std::abs(actual.imag() - test.expected.imag()) < tolerance); + } + + const cplx nan1 = std::__sqr(cplx(NAN, 0)); + assert(std::isnan(nan1.real())); + assert(std::isnan(nan1.imag())); + + const cplx nan2 = std::__sqr(cplx(0, NAN)); + assert(std::isnan(nan2.real())); + assert(std::isnan(nan2.imag())); + + const cplx nan3 = std::__sqr(cplx(NAN, NAN)); + assert(std::isnan(nan3.real())); + assert(std::isnan(nan3.imag())); + + const cplx inf1 = std::__sqr(cplx(INFINITY, 0)); + assert(std::isinf(inf1.real())); + assert(inf1.real() > 0); + + const cplx inf2 = std::__sqr(cplx(0, INFINITY)); + assert(std::isinf(inf2.real())); + assert(inf2.real() < 0); +} + +int main(int, char**) +{ + test<float>(); + test<double>(); + test<long double>(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/numerics/complex.number/cmplx.over.pow.pass.cpp b/libcxx/test/libcxx-03/numerics/complex.number/cmplx.over.pow.pass.cpp new file mode 100644 index 000000000000..abbbb6b96042 --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/complex.number/cmplx.over.pow.pass.cpp @@ -0,0 +1,86 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <complex> + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +// template<class T, class U> complex<__promote_t<T, U>> pow(const complex<T>&, const U&); +// template<class T, class U> complex<__promote_t<T, U>> pow(const complex<T>&, const complex<U>&); +// template<class T, class U> complex<__promote_t<T, U>> pow(const T&, const complex<U>&); + +// Test that these additional overloads are free from catching std::complex<non-floating-point>, +// which is expected by several 3rd party libraries, see https://llvm.org/PR109858. +// +// Note that we reserve the right to break this in the future if we have a reason to, but for the time being, +// make sure we don't break this property unintentionally. +#include <cassert> +#include <cmath> +#include <complex> +#include <type_traits> + +#include "test_macros.h" + +namespace usr { +struct usr_tag {}; + +template <class T, class U> +typename std::enable_if<(std::is_same<T, usr_tag>::value && std::is_floating_point<U>::value) || + (std::is_floating_point<T>::value && std::is_same<U, usr_tag>::value), + int>::type +pow(const T&, const std::complex<U>&) { + return std::is_same<T, usr_tag>::value ? 0 : 1; +} + +template <class T, class U> +typename std::enable_if<(std::is_same<T, usr_tag>::value && std::is_floating_point<U>::value) || + (std::is_floating_point<T>::value && std::is_same<U, usr_tag>::value), + int>::type +pow(const std::complex<T>&, const U&) { + return std::is_same<U, usr_tag>::value ? 2 : 3; +} + +template <class T, class U> +typename std::enable_if<(std::is_same<T, usr_tag>::value && std::is_floating_point<U>::value) || + (std::is_floating_point<T>::value && std::is_same<U, usr_tag>::value), + int>::type +pow(const std::complex<T>&, const std::complex<U>&) { + return std::is_same<T, usr_tag>::value ? 4 : 5; +} +} // namespace usr + +int main(int, char**) { + using std::pow; + using usr::pow; + + usr::usr_tag tag; + const std::complex<usr::usr_tag> ctag; + + assert(pow(tag, std::complex<float>(1.0f)) == 0); + assert(pow(std::complex<float>(1.0f), tag) == 2); + assert(pow(tag, std::complex<double>(1.0)) == 0); + assert(pow(std::complex<double>(1.0), tag) == 2); + assert(pow(tag, std::complex<long double>(1.0l)) == 0); + assert(pow(std::complex<long double>(1.0l), tag) == 2); + + assert(pow(1.0f, ctag) == 1); + assert(pow(ctag, 1.0f) == 3); + assert(pow(1.0, ctag) == 1); + assert(pow(ctag, 1.0) == 3); + assert(pow(1.0l, ctag) == 1); + assert(pow(ctag, 1.0l) == 3); + + assert(pow(ctag, std::complex<float>(1.0f)) == 4); + assert(pow(std::complex<float>(1.0f), ctag) == 5); + assert(pow(ctag, std::complex<double>(1.0)) == 4); + assert(pow(std::complex<double>(1.0), ctag) == 5); + assert(pow(ctag, std::complex<long double>(1.0l)) == 4); + assert(pow(std::complex<long double>(1.0l), ctag) == 5); + + return 0; +} diff --git a/libcxx/test/libcxx-03/numerics/numarray/class.gslice.array/get.pass.cpp b/libcxx/test/libcxx-03/numerics/numarray/class.gslice.array/get.pass.cpp new file mode 100644 index 000000000000..2a1842f69fd2 --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/numarray/class.gslice.array/get.pass.cpp @@ -0,0 +1,52 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <valarray> + +// template<class T> class gslice_array; + +// T __get(size_t i); + +#include <valarray> +#include <cassert> + +#include "test_macros.h" + +int main(int, char**) { + unsigned input[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; + const unsigned N = sizeof(input) / sizeof(input[0]); + + std::valarray<unsigned> array(input, N); + + { + std::gslice_array<unsigned> result = + array[std::gslice(0, std::valarray<std::size_t>(N, 1), std::valarray<std::size_t>(1, 1))]; + for (unsigned i = 0; i < N; ++i) + assert(result.__get(i) == i); + } + + { + std::valarray<std::size_t> sizes(2); + sizes[0] = 2; + sizes[1] = 3; + + std::valarray<std::size_t> strides(2); + strides[0] = 6; + strides[1] = 1; + + std::gslice_array<unsigned> result = array[std::gslice(1, sizes, strides)]; + assert(result.__get(0) == input[1 + 0 * 6 + 0 * 1]); + assert(result.__get(1) == input[1 + 0 * 6 + 1 * 1]); + assert(result.__get(2) == input[1 + 0 * 6 + 2 * 1]); + + assert(result.__get(3) == input[1 + 1 * 6 + 0 * 1]); + assert(result.__get(4) == input[1 + 1 * 6 + 1 * 1]); + assert(result.__get(5) == input[1 + 1 * 6 + 2 * 1]); + } + return 0; +} diff --git a/libcxx/test/libcxx-03/numerics/numarray/class.indirect.array/get.pass.cpp b/libcxx/test/libcxx-03/numerics/numarray/class.indirect.array/get.pass.cpp new file mode 100644 index 000000000000..3c50c740bcab --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/numarray/class.indirect.array/get.pass.cpp @@ -0,0 +1,44 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <valarray> + +// template<class T> class indirect_array; + +// T __get(size_t i); + +#include <valarray> +#include <cassert> + +#include "test_macros.h" + +int main(int, char**) { + unsigned input[] = {0, 1, 2, 3, 4}; + const unsigned N = sizeof(input) / sizeof(input[0]); + + std::valarray<unsigned> array(input, N); + + { + std::indirect_array<unsigned> result = array[std::valarray<std::size_t>(std::size_t(0), std::size_t(N))]; + for (unsigned i = 0; i < N; ++i) + assert(result.__get(i) == 0); + } + + { + std::valarray<std::size_t> indirect(std::size_t(0), std::size_t(3)); + indirect[0] = 4; + indirect[1] = 1; + indirect[2] = 3; + std::indirect_array<unsigned> result = array[indirect]; + assert(result.__get(0) == 4); + assert(result.__get(1) == 1); + assert(result.__get(2) == 3); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/numerics/numarray/class.mask.array/get.pass.cpp b/libcxx/test/libcxx-03/numerics/numarray/class.mask.array/get.pass.cpp new file mode 100644 index 000000000000..e34c38289222 --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/numarray/class.mask.array/get.pass.cpp @@ -0,0 +1,51 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <valarray> + +// template<class T> class mask_array; + +// T __get(size_t i); + +#include <valarray> +#include <cassert> + +#include "test_macros.h" + +int main(int, char**) { + unsigned input[] = {0, 1, 2, 3, 4}; + const unsigned N = sizeof(input) / sizeof(input[0]); + + std::valarray<unsigned> array(input, N); + + { + std::mask_array<unsigned> result = array[std::valarray<bool>(true, N)]; + for (unsigned i = 0; i < N; ++i) + assert(result.__get(i) == i); + } + + { + std::valarray<bool> mask(false, N); + mask[1] = true; + mask[3] = true; + std::mask_array<unsigned> result = array[mask]; + assert(result.__get(0) == 1); + assert(result.__get(1) == 3); + } + + { + std::valarray<bool> mask(false, N); + mask[0] = true; + mask[4] = true; + std::mask_array<unsigned> result = array[mask]; + assert(result.__get(0) == 0); + assert(result.__get(1) == 4); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/numerics/numarray/class.slice.array/get.pass.cpp b/libcxx/test/libcxx-03/numerics/numarray/class.slice.array/get.pass.cpp new file mode 100644 index 000000000000..26871f310bae --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/numarray/class.slice.array/get.pass.cpp @@ -0,0 +1,46 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <valarray> + +// template<class T> class slice_array; + +// T __get(size_t i); + +#include <valarray> +#include <cassert> + +#include "test_macros.h" + +int main(int, char**) { + unsigned input[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; + const unsigned N = sizeof(input) / sizeof(input[0]); + + std::valarray<unsigned> array(input, N); + + { + std::slice_array<unsigned> result = array[std::slice(0, N, 1)]; + for (unsigned i = 0; i < N; ++i) + assert(result.__get(i) == i); + } + + { + std::slice_array<unsigned> result = array[std::slice(3, 2, 2)]; + assert(result.__get(0) == 3); + assert(result.__get(1) == 5); + } + + { + std::slice_array<unsigned> result = array[std::slice(1, 3, 4)]; + assert(result.__get(0) == 1); + assert(result.__get(1) == 5); + assert(result.__get(2) == 9); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/numerics/rand/rand.device/has-no-random-device.verify.cpp b/libcxx/test/libcxx-03/numerics/rand/rand.device/has-no-random-device.verify.cpp new file mode 100644 index 000000000000..03d592774e57 --- /dev/null +++ b/libcxx/test/libcxx-03/numerics/rand/rand.device/has-no-random-device.verify.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Make sure that std::random_device is not available in namespace std:: when +// libc++ is built without support for random device. + +// REQUIRES: no-random-device + +#include <random> + +void f() { + std::random_device d; // expected-error {{no type named 'random_device' in namespace 'std'}} +} diff --git a/libcxx/test/libcxx-03/strings/basic.string/sizeof.compile.pass.cpp b/libcxx/test/libcxx-03/strings/basic.string/sizeof.compile.pass.cpp new file mode 100644 index 000000000000..31f1a94c7321 --- /dev/null +++ b/libcxx/test/libcxx-03/strings/basic.string/sizeof.compile.pass.cpp @@ -0,0 +1,145 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Ensure that we never change the size or alignment of `basic_string` + +#include <cstdint> +#include <iterator> +#include <string> + +#include "test_macros.h" +#include "min_allocator.h" +#include "test_allocator.h" + +template <class T> +class small_pointer { +public: + using value_type = T; + using difference_type = std::int16_t; + using pointer = small_pointer; + using reference = T&; + using iterator_category = std::random_access_iterator_tag; + +private: + std::uint16_t offset; +}; + +template <class T> +class small_iter_allocator { +public: + using value_type = T; + using pointer = small_pointer<T>; + using size_type = std::int16_t; + using difference_type = std::int16_t; + + small_iter_allocator() TEST_NOEXCEPT {} + + template <class U> + small_iter_allocator(small_iter_allocator<U>) TEST_NOEXCEPT {} + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t); + + friend bool operator==(small_iter_allocator, small_iter_allocator) { return true; } + friend bool operator!=(small_iter_allocator, small_iter_allocator) { return false; } +}; + +template <class CharT> +using min_string = std::basic_string<CharT, std::char_traits<CharT>, min_allocator<CharT> >; + +template <class CharT> +using test_string = std::basic_string<CharT, std::char_traits<CharT>, test_allocator<CharT> >; + +template <class CharT> +using small_string = std::basic_string<CharT, std::char_traits<CharT>, small_iter_allocator<CharT> >; + +#if __SIZE_WIDTH__ == 64 + +static_assert(sizeof(std::string) == 24, ""); +static_assert(sizeof(min_string<char>) == 24, ""); +static_assert(sizeof(test_string<char>) == 32, ""); +static_assert(sizeof(small_string<char>) == 6, ""); + +# ifndef TEST_HAS_NO_WIDE_CHARACTERS +# if __WCHAR_WIDTH__ == 32 +static_assert(sizeof(std::wstring) == 24, ""); +static_assert(sizeof(min_string<wchar_t>) == 24, ""); +static_assert(sizeof(test_string<wchar_t>) == 32, ""); +static_assert(sizeof(small_string<wchar_t>) == 12, ""); +# elif __WCHAR_WIDTH__ == 16 +static_assert(sizeof(std::wstring) == 24, ""); +static_assert(sizeof(min_string<wchar_t>) == 24, ""); +static_assert(sizeof(test_string<wchar_t>) == 32, ""); +static_assert(sizeof(small_string<wchar_t>) == 6, ""); +# else +# error "Unexpected wchar_t width" +# endif +# endif + +# ifndef TEST_HAS_NO_CHAR8_T +static_assert(sizeof(std::u8string) == 24, ""); +static_assert(sizeof(min_string<char8_t>) == 24, ""); +static_assert(sizeof(test_string<char8_t>) == 32, ""); +static_assert(sizeof(small_string<char8_t>) == 6, ""); +# endif + +# ifndef TEST_HAS_NO_UNICODE_CHARS +static_assert(sizeof(std::u16string) == 24, ""); +static_assert(sizeof(std::u32string) == 24, ""); +static_assert(sizeof(min_string<char16_t>) == 24, ""); +static_assert(sizeof(min_string<char32_t>) == 24, ""); +static_assert(sizeof(test_string<char16_t>) == 32, ""); +static_assert(sizeof(test_string<char32_t>) == 32, ""); +static_assert(sizeof(small_string<char16_t>) == 6, ""); +static_assert(sizeof(small_string<char32_t>) == 12, ""); +# endif + +#elif __SIZE_WIDTH__ == 32 + +static_assert(sizeof(std::string) == 12, ""); +static_assert(sizeof(min_string<char>) == 12, ""); +static_assert(sizeof(test_string<char>) == 24, ""); +static_assert(sizeof(small_string<char>) == 6, ""); + +# ifndef TEST_HAS_NO_WIDE_CHARACTERS +# if __WCHAR_WIDTH__ == 32 +static_assert(sizeof(std::wstring) == 12, ""); +static_assert(sizeof(min_string<wchar_t>) == 12, ""); +static_assert(sizeof(test_string<wchar_t>) == 24, ""); +static_assert(sizeof(small_string<wchar_t>) == 12, ""); +# elif __WCHAR_WIDTH__ == 16 +static_assert(sizeof(std::wstring) == 12, ""); +static_assert(sizeof(min_string<wchar_t>) == 12, ""); +static_assert(sizeof(test_string<wchar_t>) == 24, ""); +static_assert(sizeof(small_string<wchar_t>) == 6, ""); +# else +# error "Unexpected wchar_t width" +# endif +# endif + +# ifndef TEST_HAS_NO_CHAR8_T +static_assert(sizeof(std::u8string) == 12, ""); +static_assert(sizeof(min_string<char8_t>) == 12, ""); +static_assert(sizeof(test_string<char8_t>) == 24, ""); +static_assert(sizeof(small_string<char>) == 6, ""); +# endif + +# ifndef TEST_HAS_NO_UNICODE_CHARS +static_assert(sizeof(std::u16string) == 12, ""); +static_assert(sizeof(std::u32string) == 12, ""); +static_assert(sizeof(min_string<char16_t>) == 12, ""); +static_assert(sizeof(min_string<char32_t>) == 12, ""); +static_assert(sizeof(test_string<char16_t>) == 24, ""); +static_assert(sizeof(test_string<char32_t>) == 24, ""); +static_assert(sizeof(small_string<char16_t>) == 6, ""); +static_assert(sizeof(small_string<char32_t>) == 12, ""); +# endif + +#else +# error "std::size_t has an unexpected size" +#endif diff --git a/libcxx/test/libcxx-03/strings/basic.string/string.capacity/allocation_size.pass.cpp b/libcxx/test/libcxx-03/strings/basic.string/string.capacity/allocation_size.pass.cpp new file mode 100644 index 000000000000..77da29225957 --- /dev/null +++ b/libcxx/test/libcxx-03/strings/basic.string/string.capacity/allocation_size.pass.cpp @@ -0,0 +1,37 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <string> + +#include <algorithm> +#include <cassert> +#include <cstddef> +#include <string> + +#include "test_macros.h" + +// alignment of the string heap buffer is hardcoded to 8 +const std::size_t alignment = 8; + +int main(int, char**) { + std::string input_string; + input_string.resize(64, 'a'); + + // Call a constructor which selects its size using __recommend. + std::string test_string(input_string.data()); + const std::size_t expected_align8_size = 71; + + // Demonstrate the lesser capacity/allocation size when the alignment requirement is 8. + if (alignment == 8) { + assert(test_string.capacity() == expected_align8_size); + } else { + assert(test_string.capacity() == expected_align8_size + 8); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/libcxx-03/strings/basic.string/string.capacity/max_size.pass.cpp new file mode 100644 index 000000000000..6bfcb5d4bfcd --- /dev/null +++ b/libcxx/test/libcxx-03/strings/basic.string/string.capacity/max_size.pass.cpp @@ -0,0 +1,120 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <string> + +// This test ensures that the correct max_size() is returned depending on the platform. + +#include <algorithm> +#include <cassert> +#include <cstddef> +#include <string> + +#include "test_macros.h" + +// alignment of the string heap buffer is hardcoded to 8 +static const std::size_t alignment = 8; + +template <class = int> +TEST_CONSTEXPR_CXX20 void full_size() { + std::string str; + assert(str.max_size() == std::numeric_limits<std::size_t>::max() - alignment - 1); + +#ifndef TEST_HAS_NO_CHAR8_T + std::u8string u8str; + assert(u8str.max_size() == std::numeric_limits<std::size_t>::max() - alignment - 1); +#endif + +#ifndef TEST_HAS_NO_WIDE_CHARACTERS + std::wstring wstr; + assert(wstr.max_size() == + ((std::numeric_limits<std::size_t>::max() / sizeof(wchar_t) - alignment) & ~std::size_t(1)) - 1); +#endif + + std::u16string u16str; + std::u32string u32str; + assert(u16str.max_size() == ((std::numeric_limits<std::size_t>::max() / 2 - alignment) & ~std::size_t(1)) - 1); + assert(u32str.max_size() == ((std::numeric_limits<std::size_t>::max() / 4 - alignment) & ~std::size_t(1)) - 1); +} + +template <class = int> +TEST_CONSTEXPR_CXX20 void half_size() { + std::string str; + assert(str.max_size() == std::numeric_limits<std::size_t>::max() / 2 - alignment - 1); + +#ifndef TEST_HAS_NO_CHAR8_T + std::u8string u8str; + assert(u8str.max_size() == std::numeric_limits<std::size_t>::max() / 2 - alignment - 1); +#endif + +#ifndef TEST_HAS_NO_WIDE_CHARACTERS + std::wstring wstr; + assert(wstr.max_size() == + std::numeric_limits<std::size_t>::max() / std::max<size_t>(2ul, sizeof(wchar_t)) - alignment - 1); +#endif + + std::u16string u16str; + std::u32string u32str; + assert(u16str.max_size() == std::numeric_limits<std::size_t>::max() / 2 - alignment - 1); + assert(u32str.max_size() == std::numeric_limits<std::size_t>::max() / 4 - alignment - 1); +} + +TEST_CONSTEXPR_CXX20 bool test() { +#if _LIBCPP_ABI_VERSION == 1 + +# if defined(__x86_64__) || defined(__i386__) + full_size(); +# elif defined(__APPLE__) && defined(__aarch64__) + half_size(); +# elif defined(__arm__) || defined(__aarch64__) +# ifdef __BIG_ENDIAN__ + half_size(); +# else + full_size(); +# endif +# elif defined(__powerpc__) || defined(__powerpc64__) +# ifdef __BIG_ENDIAN__ + half_size(); +# else + full_size(); +# endif +# elif defined(__sparc64__) + half_size(); +# elif defined(__riscv) + full_size(); +# elif defined(_WIN32) + full_size(); +# else +# error "Your target system seems to be unsupported." +# endif + +#else + +# if defined(__arm__) || defined(__aarch64__) +# ifdef __BIG_ENDIAN__ + full_size(); +# else + half_size(); +# endif +# else + half_size(); +# endif + +#endif + + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER > 17 + static_assert(test()); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp b/libcxx/test/libcxx-03/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp new file mode 100644 index 000000000000..d4a0b318f36d --- /dev/null +++ b/libcxx/test/libcxx-03/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp @@ -0,0 +1,45 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <string> + +// basic_string(const basic_string<charT,traits,Allocator>& str); + +#include <string> +#include <cassert> + +#include "test_macros.h" +#include "test_allocator.h" +#include "min_allocator.h" + +template <class S> +TEST_CONSTEXPR_CXX20 bool test() { + // Tests that a long string holding a SSO size string results in + // an SSO copy constructed value. + S s1("1234567890123456789012345678901234567890123456789012345678901234567890"); + s1.resize(7); + S s2(s1); + LIBCPP_ASSERT(s2.__invariants()); + assert(s2 == s1); + assert(s2.capacity() < sizeof(S)); + + return true; +} + +int main(int, char**) { + test<std::basic_string<char, std::char_traits<char>, test_allocator<char> > >(); +#if TEST_STD_VER >= 11 + test<std::basic_string<char, std::char_traits<char>, min_allocator<char>>>(); +#endif +#if TEST_STD_VER > 17 + static_assert(test<std::basic_string<char, std::char_traits<char>, test_allocator<char>>>()); + static_assert(test<std::basic_string<char, std::char_traits<char>, min_allocator<char>>>()); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp b/libcxx/test/libcxx-03/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp new file mode 100644 index 000000000000..8e6e07d659c1 --- /dev/null +++ b/libcxx/test/libcxx-03/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp @@ -0,0 +1,75 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <string> + +// __resize_default_init(size_type) + +#include <string> +#include <cassert> + +#include "test_macros.h" + +TEST_CONSTEXPR_CXX20 void write_c_str(char* buf, int size) { + for (int i = 0; i < size; ++i) { + buf[i] = 'a'; + } + buf[size] = '\0'; +} + +template <class S> +TEST_CONSTEXPR_CXX20 void test_buffer_usage() { + { + unsigned buff_size = 125; + unsigned used_size = buff_size - 16; + S s; + s.__resize_default_init(buff_size); + write_c_str(&s[0], used_size); + assert(s.size() == buff_size); + assert(std::char_traits<char>().length(s.data()) == used_size); + s.__resize_default_init(used_size); + assert(s.size() == used_size); + assert(s.data()[used_size] == '\0'); + for (unsigned i = 0; i < used_size; ++i) { + assert(s[i] == 'a'); + } + } +} + +template <class S> +TEST_CONSTEXPR_CXX20 void test_basic() { + { + S s; + s.__resize_default_init(3); + assert(s.size() == 3); + assert(s.data()[3] == '\0'); + for (int i = 0; i < 3; ++i) + s[i] = 'a' + i; + s.__resize_default_init(1); + assert(s[0] == 'a'); + assert(s.data()[1] == '\0'); + assert(s.size() == 1); + } +} + +template <class S> +TEST_CONSTEXPR_CXX20 bool test() { + test_basic<S>(); + test_buffer_usage<S>(); + + return true; +} + +int main(int, char**) { + test<std::string>(); +#if TEST_STD_VER > 17 + static_assert(test<std::string>()); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/strings/c.strings/constexpr_memmove.pass.cpp b/libcxx/test/libcxx-03/strings/c.strings/constexpr_memmove.pass.cpp new file mode 100644 index 000000000000..d2ca5a265852 --- /dev/null +++ b/libcxx/test/libcxx-03/strings/c.strings/constexpr_memmove.pass.cpp @@ -0,0 +1,155 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// _Tp* __constexpr_memmove(_Tp* __dest, _Up* __src, __element_count __n); +// +// General tests for __constexpr_memmove. +// +// In particular, we try to ensure that __constexpr_memmove behaves like +// __builtin_memmove as closely as possible. This means that it produces the +// same effect, but also that it has the same type requirements. +// +// __builtin_memmove only requires that the types are TriviallyCopyable +// (which is interestingly different from both is_trivially_XXX_constructible +// and is_trivially_XXX_assignable), so we use some funky types to test these +// corner cases. + +#include <__cxx03/__string/constexpr_c_functions.h> +#include <cassert> +#include <cstdint> +#include <type_traits> + +#include "test_macros.h" + +// The following types are all TriviallyCopyable, but they are not all +// trivially_{copy,move}_{constructible,assignable}. TriviallyCopyable +// guarantees that the type is *at least* one of the four, but no more +// than that. +struct CopyConstructible { + CopyConstructible() = default; + int value = 0; + + CopyConstructible(const CopyConstructible&) = default; + CopyConstructible(CopyConstructible&&) = delete; + CopyConstructible& operator=(const CopyConstructible&) = delete; + CopyConstructible& operator=(CopyConstructible&&) = delete; +}; + +struct MoveConstructible { + MoveConstructible() = default; + int value = 0; + + MoveConstructible(const MoveConstructible&) = delete; + MoveConstructible(MoveConstructible&&) = default; + MoveConstructible& operator=(const MoveConstructible&) = delete; + MoveConstructible& operator=(MoveConstructible&&) = delete; +}; + +struct CopyAssignable { + CopyAssignable() = default; + int value = 0; + + CopyAssignable(const CopyAssignable&) = delete; + CopyAssignable(CopyAssignable&&) = delete; + CopyAssignable& operator=(const CopyAssignable&) = default; + CopyAssignable& operator=(CopyAssignable&&) = delete; +}; + +struct MoveAssignable { + MoveAssignable() = default; + int value = 0; + + MoveAssignable(const MoveAssignable&) = delete; + MoveAssignable(MoveAssignable&&) = delete; + MoveAssignable& operator=(const MoveAssignable&) = delete; + MoveAssignable& operator=(MoveAssignable&&) = default; +}; + +template <class Source, class Dest> +TEST_CONSTEXPR_CXX14 void test_user_defined_types() { + static_assert(std::is_trivially_copyable<Source>::value, "test the test"); + static_assert(std::is_trivially_copyable<Dest>::value, "test the test"); + + // Note that we can't just initialize with an initializer list since some of the types we use here + // are not copy-constructible, which is required in pre-C++20 Standards for that syntax to work. + Source src[3]; + src[0].value = 1; + src[1].value = 2; + src[2].value = 3; + Dest dst[3]; + dst[0].value = 111; + dst[1].value = 111; + dst[2].value = 111; + + Dest* result = std::__constexpr_memmove(dst, src, std::__element_count(3)); + assert(result == dst); + assert(dst[0].value == 1); + assert(dst[1].value == 2); + assert(dst[2].value == 3); +} + +template <class Source, class Dest> +TEST_CONSTEXPR_CXX14 void test_builtin_types() { + Source src[3] = {1, 2, 3}; + Dest dst[3] = {111, 111, 111}; + + Dest* result = std::__constexpr_memmove(dst, src, std::__element_count(3)); + assert(result == dst); + assert(dst[0] == 1); + assert(dst[1] == 2); + assert(dst[2] == 3); +} + +template <class SourcePtr, class DestPtr, class ObjectType> +TEST_CONSTEXPR_CXX14 void test_pointer_types() { + ObjectType objs[3] = {1, 2, 3}; + + SourcePtr src[3] = {objs + 0, objs + 1, objs + 2}; + DestPtr dst[3] = {nullptr, nullptr, nullptr}; + + DestPtr* result = std::__constexpr_memmove(dst, src, std::__element_count(3)); + assert(result == dst); + assert(dst[0] == objs + 0); + assert(dst[1] == objs + 1); + assert(dst[2] == objs + 2); +} + +TEST_CONSTEXPR_CXX14 bool test() { + test_user_defined_types<CopyConstructible, CopyConstructible>(); + test_user_defined_types<MoveConstructible, MoveConstructible>(); + test_user_defined_types<CopyAssignable, CopyAssignable>(); + test_user_defined_types<MoveAssignable, MoveAssignable>(); + + test_builtin_types<char, char>(); + test_builtin_types<short, short>(); + test_builtin_types<int, int>(); + test_builtin_types<long, long>(); + test_builtin_types<long long, long long>(); + + // Cross-type + test_builtin_types<std::int16_t, std::uint16_t>(); + test_builtin_types<std::int16_t, char16_t>(); + test_builtin_types<std::int32_t, std::uint32_t>(); + test_builtin_types<std::int32_t, char32_t>(); + + test_pointer_types<char*, char*, char>(); + test_pointer_types<int*, int*, int>(); + test_pointer_types<long*, long*, long>(); + test_pointer_types<void*, void*, int>(); + test_pointer_types<int* const, int*, int>(); + + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER >= 14 + static_assert(test(), ""); +#endif + return 0; +} diff --git a/libcxx/test/libcxx-03/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp b/libcxx/test/libcxx-03/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp new file mode 100644 index 000000000000..5043a88cbc3d --- /dev/null +++ b/libcxx/test/libcxx-03/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp @@ -0,0 +1,158 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Make sure that std::string_view's iterators check for OOB accesses when the debug mode is enabled. + +// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators +// UNSUPPORTED: libcpp-hardening-mode=none + +#include <iterator> +#include <string_view> + +#include "check_assertion.h" + +template <typename Iter> +void test_iterator(Iter begin, Iter end, bool reverse) { + ptrdiff_t distance = std::distance(begin, end); + + // Dereferencing an iterator at the end. + { + TEST_LIBCPP_ASSERT_FAILURE( + *end, + reverse ? "__bounded_iter::operator--: Attempt to rewind an iterator past the start" + : "__bounded_iter::operator*: Attempt to dereference an iterator at the end"); +#if _LIBCPP_STD_VER >= 20 + // In C++20 mode, std::reverse_iterator implements operator->, but not operator*, with + // std::prev instead of operator--. std::prev ultimately calls operator+ + TEST_LIBCPP_ASSERT_FAILURE( + end.operator->(), + reverse ? "__bounded_iter::operator+=: Attempt to rewind an iterator past the start" + : "__bounded_iter::operator->: Attempt to dereference an iterator at the end"); +#else + TEST_LIBCPP_ASSERT_FAILURE( + end.operator->(), + reverse ? "__bounded_iter::operator--: Attempt to rewind an iterator past the start" + : "__bounded_iter::operator->: Attempt to dereference an iterator at the end"); +#endif + } + + // Incrementing an iterator past the end. + { + [[maybe_unused]] const char* msg = + reverse ? "__bounded_iter::operator--: Attempt to rewind an iterator past the start" + : "__bounded_iter::operator++: Attempt to advance an iterator past the end"; + auto it = end; + TEST_LIBCPP_ASSERT_FAILURE(it++, msg); + it = end; + TEST_LIBCPP_ASSERT_FAILURE(++it, msg); + } + + // Decrementing an iterator past the start. + { + [[maybe_unused]] const char* msg = + reverse ? "__bounded_iter::operator++: Attempt to advance an iterator past the end" + : "__bounded_iter::operator--: Attempt to rewind an iterator past the start"; + auto it = begin; + TEST_LIBCPP_ASSERT_FAILURE(it--, msg); + it = begin; + TEST_LIBCPP_ASSERT_FAILURE(--it, msg); + } + + // Advancing past the end with operator+= and operator+. + { + [[maybe_unused]] const char* msg = + reverse ? "__bounded_iter::operator-=: Attempt to rewind an iterator past the start" + : "__bounded_iter::operator+=: Attempt to advance an iterator past the end"; + auto it = end; + TEST_LIBCPP_ASSERT_FAILURE(it += 1, msg); + TEST_LIBCPP_ASSERT_FAILURE(end + 1, msg); + it = begin; + TEST_LIBCPP_ASSERT_FAILURE(it += (distance + 1), msg); + TEST_LIBCPP_ASSERT_FAILURE(begin + (distance + 1), msg); + } + + // Advancing past the end with operator-= and operator-. + { + [[maybe_unused]] const char* msg = + reverse ? "__bounded_iter::operator+=: Attempt to rewind an iterator past the start" + : "__bounded_iter::operator-=: Attempt to advance an iterator past the end"; + auto it = end; + TEST_LIBCPP_ASSERT_FAILURE(it -= (-1), msg); + TEST_LIBCPP_ASSERT_FAILURE(end - (-1), msg); + it = begin; + TEST_LIBCPP_ASSERT_FAILURE(it -= (-distance - 1), msg); + TEST_LIBCPP_ASSERT_FAILURE(begin - (-distance - 1), msg); + } + + // Rewinding past the start with operator+= and operator+. + { + [[maybe_unused]] const char* msg = + reverse ? "__bounded_iter::operator-=: Attempt to advance an iterator past the end" + : "__bounded_iter::operator+=: Attempt to rewind an iterator past the start"; + auto it = begin; + TEST_LIBCPP_ASSERT_FAILURE(it += (-1), msg); + TEST_LIBCPP_ASSERT_FAILURE(begin + (-1), msg); + it = end; + TEST_LIBCPP_ASSERT_FAILURE(it += (-distance - 1), msg); + TEST_LIBCPP_ASSERT_FAILURE(end + (-distance - 1), msg); + } + + // Rewinding past the start with operator-= and operator-. + { + [[maybe_unused]] const char* msg = + reverse ? "__bounded_iter::operator+=: Attempt to advance an iterator past the end" + : "__bounded_iter::operator-=: Attempt to rewind an iterator past the start"; + auto it = begin; + TEST_LIBCPP_ASSERT_FAILURE(it -= 1, msg); + TEST_LIBCPP_ASSERT_FAILURE(begin - 1, msg); + it = end; + TEST_LIBCPP_ASSERT_FAILURE(it -= (distance + 1), msg); + TEST_LIBCPP_ASSERT_FAILURE(end - (distance + 1), msg); + } + + // Out-of-bounds operator[]. + { + [[maybe_unused]] const char* end_msg = + reverse ? "__bounded_iter::operator--: Attempt to rewind an iterator past the start" + : "__bounded_iter::operator[]: Attempt to index an iterator at or past the end"; + [[maybe_unused]] const char* past_end_msg = + reverse ? "__bounded_iter::operator-=: Attempt to rewind an iterator past the start" + : "__bounded_iter::operator[]: Attempt to index an iterator at or past the end"; + [[maybe_unused]] const char* past_start_msg = + reverse ? "__bounded_iter::operator-=: Attempt to advance an iterator past the end" + : "__bounded_iter::operator[]: Attempt to index an iterator past the start"; + TEST_LIBCPP_ASSERT_FAILURE(begin[distance], end_msg); + TEST_LIBCPP_ASSERT_FAILURE(begin[distance + 1], past_end_msg); + TEST_LIBCPP_ASSERT_FAILURE(begin[-1], past_start_msg); + TEST_LIBCPP_ASSERT_FAILURE(begin[-99], past_start_msg); + + auto it = begin + 1; + TEST_LIBCPP_ASSERT_FAILURE(it[distance - 1], end_msg); + TEST_LIBCPP_ASSERT_FAILURE(it[distance], past_end_msg); + TEST_LIBCPP_ASSERT_FAILURE(it[-2], past_start_msg); + TEST_LIBCPP_ASSERT_FAILURE(it[-99], past_start_msg); + } +} + +int main(int, char**) { + std::string_view const str("hello world"); + + // string_view::iterator + test_iterator(str.begin(), str.end(), /*reverse=*/false); + + // string_view::const_iterator + test_iterator(str.cbegin(), str.cend(), /*reverse=*/false); + + // string_view::reverse_iterator + test_iterator(str.rbegin(), str.rend(), /*reverse=*/true); + + // string_view::const_reverse_iterator + test_iterator(str.crbegin(), str.crend(), /*reverse=*/true); + + return 0; +} diff --git a/libcxx/test/libcxx-03/system_reserved_names.gen.py b/libcxx/test/libcxx-03/system_reserved_names.gen.py new file mode 100644 index 000000000000..43c008823a85 --- /dev/null +++ b/libcxx/test/libcxx-03/system_reserved_names.gen.py @@ -0,0 +1,204 @@ +# ===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ===----------------------------------------------------------------------===## + +# Test that headers are not tripped up by the surrounding code defining various +# alphabetic macros. Also ensure that we don't swallow the definition of user +# provided macros (in other words, ensure that we push/pop correctly everywhere). + +# RUN: %{python} %s %{libcxx-dir}/utils +# END. + +import sys + +sys.path.append(sys.argv[1]) +from libcxx.header_information import ( + lit_header_restrictions, + lit_header_undeprecations, + public_headers, +) + +for header in public_headers: + print( + f"""\ +//--- {header}.compile.pass.cpp +{lit_header_restrictions.get(header, '')} +{lit_header_undeprecations.get(header, '')} + +// This is required to detect the platform we're building for below. +#include <__cxx03/__config> + +#define SYSTEM_RESERVED_NAME This name should not be used in libc++ + +// libc++ does not use single-letter names as a matter of principle. +// But Windows' own <wchar.h>, <math.h>, and <exception> use many of these +// (at least C,E,F,I,M,N,P,S,X,Y,Z) as uglified function parameter names, +// so don't define these on Windows. +// +#ifndef _WIN32 +#define _A SYSTEM_RESERVED_NAME +#define _B SYSTEM_RESERVED_NAME +#define _C SYSTEM_RESERVED_NAME +#define _D SYSTEM_RESERVED_NAME +#define _E SYSTEM_RESERVED_NAME +#define _F SYSTEM_RESERVED_NAME +#define _G SYSTEM_RESERVED_NAME +#define _H SYSTEM_RESERVED_NAME +#define _I SYSTEM_RESERVED_NAME +#define _J SYSTEM_RESERVED_NAME +#define _K SYSTEM_RESERVED_NAME +#define _L SYSTEM_RESERVED_NAME +#define _M SYSTEM_RESERVED_NAME +#define _N SYSTEM_RESERVED_NAME +#define _O SYSTEM_RESERVED_NAME +#define _P SYSTEM_RESERVED_NAME +#define _Q SYSTEM_RESERVED_NAME +#define _R SYSTEM_RESERVED_NAME +#define _S SYSTEM_RESERVED_NAME +#define _T SYSTEM_RESERVED_NAME +#define _U SYSTEM_RESERVED_NAME +#define _V SYSTEM_RESERVED_NAME +#define _W SYSTEM_RESERVED_NAME +#define _X SYSTEM_RESERVED_NAME +#define _Y SYSTEM_RESERVED_NAME +#define _Z SYSTEM_RESERVED_NAME +#endif + +// FreeBSD's <sys/types.h> uses _M +// +#ifdef __FreeBSD__ +# undef _M +#endif + +// Test that libc++ doesn't use names that collide with FreeBSD system macros. +// newlib and picolibc also define these macros +#if !defined(__FreeBSD__) && !defined(_NEWLIB_VERSION) +# define __null_sentinel SYSTEM_RESERVED_NAME +# define __generic SYSTEM_RESERVED_NAME +#endif + +// tchar.h defines these macros on Windows +#ifndef _WIN32 +# define _UI SYSTEM_RESERVED_NAME +# define _PUC SYSTEM_RESERVED_NAME +# define _CPUC SYSTEM_RESERVED_NAME +# define _PC SYSTEM_RESERVED_NAME +# define _CRPC SYSTEM_RESERVED_NAME +# define _CPC SYSTEM_RESERVED_NAME +#endif + +// yvals.h on MINGW defines this macro +#ifndef _WIN32 +# define _C2 SYSTEM_RESERVED_NAME +#endif + +// Test that libc++ doesn't use names that collide with Win32 API macros. +// Obviously we can only define these on non-Windows platforms. +#ifndef _WIN32 +# define __allocator SYSTEM_RESERVED_NAME +# define __bound SYSTEM_RESERVED_NAME +# define __deallocate SYSTEM_RESERVED_NAME +# define __deref SYSTEM_RESERVED_NAME +# define __format_string SYSTEM_RESERVED_NAME +# define __full SYSTEM_RESERVED_NAME +# define __in SYSTEM_RESERVED_NAME +# define __inout SYSTEM_RESERVED_NAME +# define __nz SYSTEM_RESERVED_NAME +# define __out SYSTEM_RESERVED_NAME +# define __part SYSTEM_RESERVED_NAME +# define __post SYSTEM_RESERVED_NAME +# define __pre SYSTEM_RESERVED_NAME +#endif + +// Newlib & picolibc use __input as a parameter name of a64l & l64a +#ifndef _NEWLIB_VERSION +# define __input SYSTEM_RESERVED_NAME +#endif +#define __output SYSTEM_RESERVED_NAME + +#define __acquire SYSTEM_RESERVED_NAME +#define __release SYSTEM_RESERVED_NAME + +// Android and FreeBSD use this for __attribute__((__unused__)) +#if !defined(__FreeBSD__) && !defined(__ANDROID__) +#define __unused SYSTEM_RESERVED_NAME +#endif + +// These names are not reserved, so the user can macro-define them. +// These are intended to find improperly _Uglified template parameters. +#define A SYSTEM_RESERVED_NAME +#define Arg SYSTEM_RESERVED_NAME +#define Args SYSTEM_RESERVED_NAME +#define As SYSTEM_RESERVED_NAME +#define B SYSTEM_RESERVED_NAME +#define Bs SYSTEM_RESERVED_NAME +#define C SYSTEM_RESERVED_NAME +#define Cp SYSTEM_RESERVED_NAME +#define Cs SYSTEM_RESERVED_NAME +// Windows setjmp.h contains a struct member named 'D' on ARM/AArch64. +#ifndef _WIN32 +# define D SYSTEM_RESERVED_NAME +#endif +#define Dp SYSTEM_RESERVED_NAME +#define Ds SYSTEM_RESERVED_NAME +#define E SYSTEM_RESERVED_NAME +#define Ep SYSTEM_RESERVED_NAME +#define Es SYSTEM_RESERVED_NAME +#define N SYSTEM_RESERVED_NAME +#define Np SYSTEM_RESERVED_NAME +#define Ns SYSTEM_RESERVED_NAME +#define R SYSTEM_RESERVED_NAME +#define Rp SYSTEM_RESERVED_NAME +#define Rs SYSTEM_RESERVED_NAME +#define T SYSTEM_RESERVED_NAME +#define Tp SYSTEM_RESERVED_NAME +#define Ts SYSTEM_RESERVED_NAME +#define Type SYSTEM_RESERVED_NAME +#define Types SYSTEM_RESERVED_NAME +#define U SYSTEM_RESERVED_NAME +#define Up SYSTEM_RESERVED_NAME +#define Us SYSTEM_RESERVED_NAME +#define V SYSTEM_RESERVED_NAME +#define Vp SYSTEM_RESERVED_NAME +#define Vs SYSTEM_RESERVED_NAME +#define X SYSTEM_RESERVED_NAME +#define Xp SYSTEM_RESERVED_NAME +#define Xs SYSTEM_RESERVED_NAME + +// The classic Windows min/max macros +#define min SYSTEM_RESERVED_NAME +#define max SYSTEM_RESERVED_NAME + +// Test to make sure curses has no conflicting macros with the standard library +#define move SYSTEM_RESERVED_NAME +#define erase SYSTEM_RESERVED_NAME +#define refresh SYSTEM_RESERVED_NAME + +// Dinkumware libc ctype.h uses these definitions +#define _XA SYSTEM_RESERVED_NAME +#define _XS SYSTEM_RESERVED_NAME +#define _BB SYSTEM_RESERVED_NAME +#define _CN SYSTEM_RESERVED_NAME +#define _DI SYSTEM_RESERVED_NAME +#define _LO SYSTEM_RESERVED_NAME +#define _PU SYSTEM_RESERVED_NAME +#define _SP SYSTEM_RESERVED_NAME +#define _UP SYSTEM_RESERVED_NAME +#define _XD SYSTEM_RESERVED_NAME + +#include <{header}> + +// Make sure we don't swallow the definition of the macros we push/pop +#define STRINGIFY_IMPL(x) #x +#define STRINGIFY(x) STRINGIFY_IMPL(x) +static_assert(__builtin_strcmp(STRINGIFY(min), STRINGIFY(SYSTEM_RESERVED_NAME)) == 0, ""); +static_assert(__builtin_strcmp(STRINGIFY(max), STRINGIFY(SYSTEM_RESERVED_NAME)) == 0, ""); +static_assert(__builtin_strcmp(STRINGIFY(move), STRINGIFY(SYSTEM_RESERVED_NAME)) == 0, ""); +static_assert(__builtin_strcmp(STRINGIFY(erase), STRINGIFY(SYSTEM_RESERVED_NAME)) == 0, ""); +static_assert(__builtin_strcmp(STRINGIFY(refresh), STRINGIFY(SYSTEM_RESERVED_NAME)) == 0, ""); +""" + ) diff --git a/libcxx/test/libcxx-03/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp b/libcxx/test/libcxx-03/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp new file mode 100644 index 000000000000..13d1bfcb8812 --- /dev/null +++ b/libcxx/test/libcxx-03/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// UNSUPPORTED: no-threads, libcpp-has-thread-api-external + +// XFAIL: windows + +// <condition_variable> + +// class condition_variable; + +// typedef pthread_cond_t* native_handle_type; +// native_handle_type native_handle(); + +#include <cassert> +#include <condition_variable> +#include <pthread.h> +#include <type_traits> + +#include "test_macros.h" + +int main(int, char**) +{ + static_assert((std::is_same<std::condition_variable::native_handle_type, + pthread_cond_t*>::value), ""); + std::condition_variable cv; + std::condition_variable::native_handle_type h = cv.native_handle(); + assert(h != nullptr); + + return 0; +} diff --git a/libcxx/test/libcxx-03/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp b/libcxx/test/libcxx-03/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp new file mode 100644 index 000000000000..3de6635f13be --- /dev/null +++ b/libcxx/test/libcxx-03/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// UNSUPPORTED: no-threads, libcpp-has-thread-api-external + +// XFAIL: windows + +// <mutex> + +// class mutex; + +// typedef pthread_mutex_t* native_handle_type; +// native_handle_type native_handle(); + +#include <mutex> +#include <cassert> + +#include "test_macros.h" + +int main(int, char**) +{ + std::mutex m; + pthread_mutex_t* h = m.native_handle(); + assert(h); + + return 0; +} diff --git a/libcxx/test/libcxx-03/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp b/libcxx/test/libcxx-03/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp new file mode 100644 index 000000000000..d76b3d71d36e --- /dev/null +++ b/libcxx/test/libcxx-03/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// UNSUPPORTED: no-threads, libcpp-has-thread-api-external + +// XFAIL: windows + +// <mutex> + +// class recursive_mutex; + +// typedef pthread_mutex_t* native_handle_type; +// native_handle_type native_handle(); + +#include <mutex> +#include <cassert> + +#include "test_macros.h" + +int main(int, char**) +{ + std::recursive_mutex m; + pthread_mutex_t* h = m.native_handle(); + assert(h); + + return 0; +} diff --git a/libcxx/test/libcxx-03/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp b/libcxx/test/libcxx-03/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp new file mode 100644 index 000000000000..96ec3332519b --- /dev/null +++ b/libcxx/test/libcxx-03/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp @@ -0,0 +1,59 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// UNSUPPORTED: no-threads, libcpp-has-thread-api-external + +// XFAIL: windows + +// <thread> + +// class thread + +// native_handle_type native_handle(); + +#include <thread> +#include <new> +#include <cstdlib> +#include <cassert> + +#include "test_macros.h" + +class G +{ + int alive_; +public: + static int n_alive; + static bool op_run; + + G() : alive_(1) {++n_alive;} + G(const G& g) : alive_(g.alive_) {++n_alive;} + ~G() {alive_ = 0; --n_alive;} + + void operator()() + { + assert(alive_ == 1); + assert(n_alive >= 1); + op_run = true; + } +}; + +int G::n_alive = 0; +bool G::op_run = false; + +int main(int, char**) +{ + { + G g; + std::thread t0(g); + pthread_t pid = t0.native_handle(); + assert(pid != 0); + t0.join(); + } + + return 0; +} diff --git a/libcxx/test/libcxx-03/thread/thread.threads/thread.thread.class/types.pass.cpp b/libcxx/test/libcxx-03/thread/thread.threads/thread.thread.class/types.pass.cpp new file mode 100644 index 000000000000..bb60647ef05d --- /dev/null +++ b/libcxx/test/libcxx-03/thread/thread.threads/thread.thread.class/types.pass.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// UNSUPPORTED: no-threads, libcpp-has-thread-api-external +// REQUIRES: libcpp-has-thread-api-pthread + +// <thread> + +// class thread +// { +// public: +// typedef pthread_t native_handle_type; +// ... +// }; + +#include <thread> +#include <type_traits> + +#include "test_macros.h" + +int main(int, char**) +{ + static_assert((std::is_same<std::thread::native_handle_type, pthread_t>::value), ""); + + return 0; +} diff --git a/libcxx/test/libcxx-03/transitive_includes.gen.py b/libcxx/test/libcxx-03/transitive_includes.gen.py new file mode 100644 index 000000000000..6f9924043663 --- /dev/null +++ b/libcxx/test/libcxx-03/transitive_includes.gen.py @@ -0,0 +1,102 @@ +# ===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ===----------------------------------------------------------------------===## + +# Test that we don't remove transitive includes of public C++ headers in the library accidentally. +# When we remove a transitive public include, clients tend to break because they don't always +# properly include what they use. Note that we don't check which system (C) headers are +# included transitively, because that is too unstable across platforms, and hence difficult +# to test for. +# +# This is not meant to block libc++ from removing unused transitive includes +# forever, however we do try to group removals for a couple of releases +# to avoid breaking users at every release. + +# RUN: %{python} %s %{libcxx-dir}/utils + +# block Lit from interpreting a RUN/XFAIL/etc inside the generation script +# END. + +import sys +sys.path.append(sys.argv[1]) +from libcxx.header_information import lit_header_restrictions, public_headers + +import re + +# To re-generate the list of expected headers, temporarily set this to True, and run this test. +# Note that this needs to be done for all supported language versions of libc++: +# for std in c++03 c++11 c++14 c++17 c++20 c++23 c++26; do <build>/bin/llvm-lit --param std=$std libcxx/test/libcxx/transitive_includes.gen.py; done +regenerate_expected_results = False + +if regenerate_expected_results: + print( + f"""\ +//--- generate-transitive-includes.sh.cpp +// RUN: mkdir %t +""" + ) + + all_traces = [] + for header in sorted(public_headers): + if header.is_C_compatibility() or header.is_internal(): + continue + + normalized_header = re.sub("/", "_", str(header)) + print( + f"""\ +// RUN: echo "#include <{header}>" | %{{cxx}} -xc++ - %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.{normalized_header}.txt +""" + ) + all_traces.append(f"%t/trace-includes.{normalized_header}.txt") + + print( + f"""\ +// RUN: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes/to_csv.py {' '.join(all_traces)} > %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv +""" + ) + +else: + for header in public_headers: + if header.is_C_compatibility() or header.is_internal(): + continue + + # Escape slashes for the awk command below + escaped_header = str(header).replace("/", "\\/") + + print( + f"""\ +//--- {header}.sh.cpp +{lit_header_restrictions.get(header, '')} + +// TODO: Fix this test to make it work with localization or wide characters disabled +// UNSUPPORTED: no-localization, no-wide-characters, no-threads, no-filesystem, libcpp-has-no-experimental-tzdb + +// When built with modules, this test doesn't work because --trace-includes doesn't +// report the stack of includes correctly. +// UNSUPPORTED: clang-modules-build + +// This test uses --trace-includes, which is not supported by GCC. +// UNSUPPORTED: gcc + +// This test is not supported when we remove the transitive includes provided for backwards +// compatibility. When we bulk-remove them, we'll adjust the includes that are expected by +// this test instead. +// UNSUPPORTED: transitive-includes-disabled + +// TODO: Figure out why <stdatomic.h> doesn't work on FreeBSD +// UNSUPPORTED: LIBCXX-FREEBSD-FIXME + +// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME + +// RUN: mkdir %t +// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.txt +// RUN: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes/to_csv.py %t/trace-includes.txt > %t/actual_transitive_includes.csv +// RUN: cat %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv | awk '/^{escaped_header} / {{ print }}' > %t/expected_transitive_includes.csv +// RUN: diff -w %t/expected_transitive_includes.csv %t/actual_transitive_includes.csv +#include <{header}> +""" + ) diff --git a/libcxx/test/libcxx-03/transitive_includes/cxx03.csv b/libcxx/test/libcxx-03/transitive_includes/cxx03.csv new file mode 100644 index 000000000000..c0031543e47b --- /dev/null +++ b/libcxx/test/libcxx-03/transitive_includes/cxx03.csv @@ -0,0 +1,2568 @@ +algorithm atomic +algorithm bit +algorithm cctype +algorithm climits +algorithm cmath +algorithm compare +algorithm concepts +algorithm cstddef +algorithm cstdint +algorithm cstdio +algorithm cstdlib +algorithm cstring +algorithm ctime +algorithm cwchar +algorithm cwctype +algorithm exception +algorithm initializer_list +algorithm iosfwd +algorithm iterator +algorithm limits +algorithm memory +algorithm new +algorithm optional +algorithm ratio +algorithm stdexcept +algorithm tuple +algorithm type_traits +algorithm typeinfo +algorithm utility +algorithm variant +algorithm version +any algorithm +any array +any atomic +any bit +any cctype +any cerrno +any chrono +any climits +any clocale +any cmath +any compare +any concepts +any cstdarg +any cstddef +any cstdint +any cstdio +any cstdlib +any cstring +any ctime +any cwchar +any cwctype +any exception +any forward_list +any functional +any initializer_list +any ios +any iosfwd +any iterator +any limits +any locale +any memory +any mutex +any new +any optional +any ratio +any stdexcept +any streambuf +any string +any string_view +any system_error +any tuple +any type_traits +any typeinfo +any unordered_map +any utility +any variant +any vector +any version +array algorithm +array atomic +array bit +array cctype +array climits +array cmath +array compare +array concepts +array cstddef +array cstdint +array cstdio +array cstdlib +array cstring +array ctime +array cwchar +array cwctype +array exception +array initializer_list +array iosfwd +array iterator +array limits +array memory +array new +array optional +array ratio +array stdexcept +array tuple +array type_traits +array typeinfo +array utility +array variant +array version +atomic climits +atomic cmath +atomic compare +atomic cstddef +atomic cstdint +atomic cstdlib +atomic cstring +atomic ctime +atomic limits +atomic ratio +atomic type_traits +atomic version +barrier atomic +barrier climits +barrier cmath +barrier compare +barrier concepts +barrier cstddef +barrier cstdint +barrier cstdlib +barrier cstring +barrier ctime +barrier exception +barrier initializer_list +barrier iosfwd +barrier iterator +barrier limits +barrier memory +barrier new +barrier ratio +barrier stdexcept +barrier tuple +barrier type_traits +barrier typeinfo +barrier utility +barrier variant +barrier version +bit cstdint +bit cstdlib +bit iosfwd +bit limits +bit type_traits +bit version +bitset algorithm +bitset atomic +bitset bit +bitset cctype +bitset climits +bitset cmath +bitset compare +bitset concepts +bitset cstddef +bitset cstdint +bitset cstdio +bitset cstdlib +bitset cstring +bitset ctime +bitset cwchar +bitset cwctype +bitset exception +bitset initializer_list +bitset iosfwd +bitset iterator +bitset limits +bitset memory +bitset new +bitset optional +bitset ratio +bitset stdexcept +bitset string +bitset string_view +bitset tuple +bitset type_traits +bitset typeinfo +bitset utility +bitset variant +bitset version +ccomplex algorithm +ccomplex array +ccomplex atomic +ccomplex bit +ccomplex bitset +ccomplex cctype +ccomplex cerrno +ccomplex climits +ccomplex clocale +ccomplex cmath +ccomplex compare +ccomplex complex +ccomplex concepts +ccomplex cstdarg +ccomplex cstddef +ccomplex cstdint +ccomplex cstdio +ccomplex cstdlib +ccomplex cstring +ccomplex ctime +ccomplex cwchar +ccomplex cwctype +ccomplex deque +ccomplex exception +ccomplex format +ccomplex functional +ccomplex initializer_list +ccomplex ios +ccomplex iosfwd +ccomplex istream +ccomplex iterator +ccomplex limits +ccomplex locale +ccomplex memory +ccomplex mutex +ccomplex new +ccomplex optional +ccomplex ostream +ccomplex print +ccomplex queue +ccomplex ratio +ccomplex sstream +ccomplex stack +ccomplex stdexcept +ccomplex streambuf +ccomplex string +ccomplex string_view +ccomplex system_error +ccomplex tuple +ccomplex type_traits +ccomplex typeinfo +ccomplex unordered_map +ccomplex utility +ccomplex variant +ccomplex vector +ccomplex version +charconv cmath +charconv concepts +charconv cstddef +charconv cstdint +charconv cstdlib +charconv cstring +charconv iosfwd +charconv limits +charconv new +charconv type_traits +charconv version +chrono algorithm +chrono array +chrono atomic +chrono bit +chrono cctype +chrono cerrno +chrono climits +chrono clocale +chrono cmath +chrono compare +chrono concepts +chrono cstdarg +chrono cstddef +chrono cstdint +chrono cstdio +chrono cstdlib +chrono cstring +chrono ctime +chrono cwchar +chrono cwctype +chrono exception +chrono forward_list +chrono functional +chrono initializer_list +chrono ios +chrono iosfwd +chrono iterator +chrono limits +chrono locale +chrono memory +chrono mutex +chrono new +chrono optional +chrono ratio +chrono stdexcept +chrono streambuf +chrono string +chrono string_view +chrono system_error +chrono tuple +chrono type_traits +chrono typeinfo +chrono unordered_map +chrono utility +chrono variant +chrono vector +chrono version +cinttypes cstdint +cmath cstdint +cmath limits +cmath type_traits +cmath version +codecvt algorithm +codecvt atomic +codecvt bit +codecvt cctype +codecvt cerrno +codecvt climits +codecvt clocale +codecvt cmath +codecvt compare +codecvt concepts +codecvt cstddef +codecvt cstdint +codecvt cstdio +codecvt cstdlib +codecvt cstring +codecvt ctime +codecvt cwchar +codecvt cwctype +codecvt exception +codecvt initializer_list +codecvt iosfwd +codecvt iterator +codecvt limits +codecvt memory +codecvt mutex +codecvt new +codecvt optional +codecvt ratio +codecvt stdexcept +codecvt string +codecvt string_view +codecvt system_error +codecvt tuple +codecvt type_traits +codecvt typeinfo +codecvt utility +codecvt variant +codecvt version +compare cmath +compare cstddef +compare cstdint +compare limits +compare type_traits +compare version +complex algorithm +complex array +complex atomic +complex bit +complex bitset +complex cctype +complex cerrno +complex climits +complex clocale +complex cmath +complex compare +complex concepts +complex cstdarg +complex cstddef +complex cstdint +complex cstdio +complex cstdlib +complex cstring +complex ctime +complex cwchar +complex cwctype +complex deque +complex exception +complex format +complex functional +complex initializer_list +complex ios +complex iosfwd +complex istream +complex iterator +complex limits +complex locale +complex memory +complex mutex +complex new +complex optional +complex ostream +complex print +complex queue +complex ratio +complex sstream +complex stack +complex stdexcept +complex streambuf +complex string +complex string_view +complex system_error +complex tuple +complex type_traits +complex typeinfo +complex unordered_map +complex utility +complex variant +complex vector +complex version +concepts cstddef +concepts cstdint +concepts type_traits +concepts version +condition_variable algorithm +condition_variable atomic +condition_variable bit +condition_variable cctype +condition_variable cerrno +condition_variable climits +condition_variable cmath +condition_variable compare +condition_variable concepts +condition_variable cstddef +condition_variable cstdint +condition_variable cstdio +condition_variable cstdlib +condition_variable cstring +condition_variable ctime +condition_variable cwchar +condition_variable cwctype +condition_variable exception +condition_variable initializer_list +condition_variable iosfwd +condition_variable iterator +condition_variable limits +condition_variable memory +condition_variable new +condition_variable optional +condition_variable ratio +condition_variable stdexcept +condition_variable string +condition_variable string_view +condition_variable system_error +condition_variable tuple +condition_variable type_traits +condition_variable typeinfo +condition_variable utility +condition_variable variant +condition_variable version +coroutine cmath +coroutine compare +coroutine cstddef +coroutine cstdint +coroutine iosfwd +coroutine limits +coroutine type_traits +coroutine version +cstddef version +ctgmath algorithm +ctgmath array +ctgmath atomic +ctgmath bit +ctgmath bitset +ctgmath cctype +ctgmath cerrno +ctgmath climits +ctgmath clocale +ctgmath cmath +ctgmath compare +ctgmath complex +ctgmath concepts +ctgmath cstdarg +ctgmath cstddef +ctgmath cstdint +ctgmath cstdio +ctgmath cstdlib +ctgmath cstring +ctgmath ctime +ctgmath cwchar +ctgmath cwctype +ctgmath deque +ctgmath exception +ctgmath format +ctgmath functional +ctgmath initializer_list +ctgmath ios +ctgmath iosfwd +ctgmath istream +ctgmath iterator +ctgmath limits +ctgmath locale +ctgmath memory +ctgmath mutex +ctgmath new +ctgmath optional +ctgmath ostream +ctgmath print +ctgmath queue +ctgmath ratio +ctgmath sstream +ctgmath stack +ctgmath stdexcept +ctgmath streambuf +ctgmath string +ctgmath string_view +ctgmath system_error +ctgmath tuple +ctgmath type_traits +ctgmath typeinfo +ctgmath unordered_map +ctgmath utility +ctgmath variant +ctgmath vector +ctgmath version +cwchar cctype +cwchar cstddef +cwchar cwctype +cwchar version +cwctype cctype +deque algorithm +deque array +deque atomic +deque bit +deque cctype +deque cerrno +deque climits +deque clocale +deque cmath +deque compare +deque concepts +deque cstdarg +deque cstddef +deque cstdint +deque cstdio +deque cstdlib +deque cstring +deque ctime +deque cwchar +deque cwctype +deque exception +deque functional +deque initializer_list +deque ios +deque iosfwd +deque iterator +deque limits +deque locale +deque memory +deque mutex +deque new +deque optional +deque ratio +deque stdexcept +deque streambuf +deque string +deque string_view +deque system_error +deque tuple +deque type_traits +deque typeinfo +deque unordered_map +deque utility +deque variant +deque vector +deque version +exception cstddef +exception cstdint +exception cstdlib +exception new +exception type_traits +exception typeinfo +exception version +execution cstddef +execution version +expected version +experimental/iterator algorithm +experimental/iterator atomic +experimental/iterator bit +experimental/iterator bitset +experimental/iterator cctype +experimental/iterator cerrno +experimental/iterator climits +experimental/iterator clocale +experimental/iterator cmath +experimental/iterator compare +experimental/iterator concepts +experimental/iterator cstdarg +experimental/iterator cstddef +experimental/iterator cstdint +experimental/iterator cstdio +experimental/iterator cstdlib +experimental/iterator cstring +experimental/iterator ctime +experimental/iterator cwchar +experimental/iterator cwctype +experimental/iterator exception +experimental/iterator initializer_list +experimental/iterator ios +experimental/iterator iosfwd +experimental/iterator iterator +experimental/iterator limits +experimental/iterator locale +experimental/iterator memory +experimental/iterator mutex +experimental/iterator new +experimental/iterator optional +experimental/iterator ratio +experimental/iterator stdexcept +experimental/iterator streambuf +experimental/iterator string +experimental/iterator string_view +experimental/iterator system_error +experimental/iterator tuple +experimental/iterator type_traits +experimental/iterator typeinfo +experimental/iterator utility +experimental/iterator variant +experimental/iterator version +experimental/memory cstddef +experimental/memory cstdint +experimental/memory cstring +experimental/memory limits +experimental/memory type_traits +experimental/memory version +experimental/propagate_const cstddef +experimental/propagate_const cstdint +experimental/propagate_const type_traits +experimental/propagate_const version +experimental/simd cstddef +experimental/simd cstdint +experimental/simd limits +experimental/simd type_traits +experimental/simd version +experimental/utility cmath +experimental/utility compare +experimental/utility cstddef +experimental/utility cstdint +experimental/utility cstdlib +experimental/utility initializer_list +experimental/utility iosfwd +experimental/utility limits +experimental/utility type_traits +experimental/utility utility +experimental/utility version +filesystem algorithm +filesystem atomic +filesystem bit +filesystem cctype +filesystem cerrno +filesystem climits +filesystem cmath +filesystem compare +filesystem concepts +filesystem cstddef +filesystem cstdint +filesystem cstdio +filesystem cstdlib +filesystem cstring +filesystem ctime +filesystem cwchar +filesystem cwctype +filesystem exception +filesystem initializer_list +filesystem iosfwd +filesystem iterator +filesystem limits +filesystem memory +filesystem new +filesystem optional +filesystem ratio +filesystem stdexcept +filesystem string +filesystem string_view +filesystem system_error +filesystem tuple +filesystem type_traits +filesystem typeinfo +filesystem utility +filesystem variant +filesystem version +flat_map cmath +flat_map compare +flat_map cstddef +flat_map cstdint +flat_map initializer_list +flat_map limits +flat_map type_traits +flat_map version +flat_set cmath +flat_set compare +flat_set cstddef +flat_set cstdint +flat_set initializer_list +flat_set limits +flat_set type_traits +flat_set version +format algorithm +format array +format atomic +format bit +format cctype +format cerrno +format climits +format clocale +format cmath +format compare +format concepts +format cstdarg +format cstddef +format cstdint +format cstdio +format cstdlib +format cstring +format ctime +format cwchar +format cwctype +format deque +format exception +format functional +format initializer_list +format ios +format iosfwd +format iterator +format limits +format locale +format memory +format mutex +format new +format optional +format queue +format ratio +format stack +format stdexcept +format streambuf +format string +format string_view +format system_error +format tuple +format type_traits +format typeinfo +format unordered_map +format utility +format variant +format vector +format version +forward_list algorithm +forward_list array +forward_list atomic +forward_list bit +forward_list cctype +forward_list cerrno +forward_list climits +forward_list clocale +forward_list cmath +forward_list compare +forward_list concepts +forward_list cstdarg +forward_list cstddef +forward_list cstdint +forward_list cstdio +forward_list cstdlib +forward_list cstring +forward_list ctime +forward_list cwchar +forward_list cwctype +forward_list exception +forward_list functional +forward_list initializer_list +forward_list ios +forward_list iosfwd +forward_list iterator +forward_list limits +forward_list locale +forward_list memory +forward_list mutex +forward_list new +forward_list optional +forward_list ratio +forward_list stdexcept +forward_list streambuf +forward_list string +forward_list string_view +forward_list system_error +forward_list tuple +forward_list type_traits +forward_list typeinfo +forward_list unordered_map +forward_list utility +forward_list variant +forward_list vector +forward_list version +fstream algorithm +fstream array +fstream atomic +fstream bit +fstream bitset +fstream cctype +fstream cerrno +fstream climits +fstream clocale +fstream cmath +fstream compare +fstream concepts +fstream cstdarg +fstream cstddef +fstream cstdint +fstream cstdio +fstream cstdlib +fstream cstring +fstream ctime +fstream cwchar +fstream cwctype +fstream deque +fstream exception +fstream filesystem +fstream format +fstream functional +fstream initializer_list +fstream iomanip +fstream ios +fstream iosfwd +fstream istream +fstream iterator +fstream limits +fstream locale +fstream memory +fstream mutex +fstream new +fstream optional +fstream ostream +fstream print +fstream queue +fstream ratio +fstream stack +fstream stdexcept +fstream streambuf +fstream string +fstream string_view +fstream system_error +fstream tuple +fstream type_traits +fstream typeinfo +fstream unordered_map +fstream utility +fstream variant +fstream vector +fstream version +functional algorithm +functional array +functional atomic +functional bit +functional cctype +functional cerrno +functional climits +functional clocale +functional cmath +functional compare +functional concepts +functional cstdarg +functional cstddef +functional cstdint +functional cstdio +functional cstdlib +functional cstring +functional ctime +functional cwchar +functional cwctype +functional exception +functional initializer_list +functional ios +functional iosfwd +functional iterator +functional limits +functional locale +functional memory +functional mutex +functional new +functional optional +functional ratio +functional stdexcept +functional streambuf +functional string +functional string_view +functional system_error +functional tuple +functional type_traits +functional typeinfo +functional unordered_map +functional utility +functional variant +functional vector +functional version +future algorithm +future array +future atomic +future bit +future bitset +future cctype +future cerrno +future chrono +future climits +future clocale +future cmath +future compare +future concepts +future cstdarg +future cstddef +future cstdint +future cstdio +future cstdlib +future cstring +future ctime +future cwchar +future cwctype +future deque +future exception +future format +future forward_list +future functional +future initializer_list +future ios +future iosfwd +future istream +future iterator +future limits +future locale +future memory +future mutex +future new +future optional +future ostream +future print +future queue +future ratio +future sstream +future stack +future stdexcept +future streambuf +future string +future string_view +future system_error +future thread +future tuple +future type_traits +future typeinfo +future unordered_map +future utility +future variant +future vector +future version +initializer_list cstddef +initializer_list version +iomanip algorithm +iomanip array +iomanip atomic +iomanip bit +iomanip bitset +iomanip cctype +iomanip cerrno +iomanip climits +iomanip clocale +iomanip cmath +iomanip compare +iomanip concepts +iomanip cstdarg +iomanip cstddef +iomanip cstdint +iomanip cstdio +iomanip cstdlib +iomanip cstring +iomanip ctime +iomanip cwchar +iomanip cwctype +iomanip deque +iomanip exception +iomanip format +iomanip functional +iomanip initializer_list +iomanip ios +iomanip iosfwd +iomanip istream +iomanip iterator +iomanip limits +iomanip locale +iomanip memory +iomanip mutex +iomanip new +iomanip optional +iomanip ostream +iomanip print +iomanip queue +iomanip ratio +iomanip stack +iomanip stdexcept +iomanip streambuf +iomanip string +iomanip string_view +iomanip system_error +iomanip tuple +iomanip type_traits +iomanip typeinfo +iomanip unordered_map +iomanip utility +iomanip variant +iomanip vector +iomanip version +ios algorithm +ios atomic +ios bit +ios cctype +ios cerrno +ios climits +ios clocale +ios cmath +ios compare +ios concepts +ios cstddef +ios cstdint +ios cstdio +ios cstdlib +ios cstring +ios ctime +ios cwchar +ios cwctype +ios exception +ios initializer_list +ios iosfwd +ios iterator +ios limits +ios memory +ios mutex +ios new +ios optional +ios ratio +ios stdexcept +ios string +ios string_view +ios system_error +ios tuple +ios type_traits +ios typeinfo +ios utility +ios variant +ios version +iosfwd version +iostream algorithm +iostream array +iostream atomic +iostream bit +iostream bitset +iostream cctype +iostream cerrno +iostream climits +iostream clocale +iostream cmath +iostream compare +iostream concepts +iostream cstdarg +iostream cstddef +iostream cstdint +iostream cstdio +iostream cstdlib +iostream cstring +iostream ctime +iostream cwchar +iostream cwctype +iostream deque +iostream exception +iostream format +iostream functional +iostream initializer_list +iostream ios +iostream iosfwd +iostream istream +iostream iterator +iostream limits +iostream locale +iostream memory +iostream mutex +iostream new +iostream optional +iostream ostream +iostream print +iostream queue +iostream ratio +iostream stack +iostream stdexcept +iostream streambuf +iostream string +iostream string_view +iostream system_error +iostream tuple +iostream type_traits +iostream typeinfo +iostream unordered_map +iostream utility +iostream variant +iostream vector +iostream version +istream algorithm +istream array +istream atomic +istream bit +istream bitset +istream cctype +istream cerrno +istream climits +istream clocale +istream cmath +istream compare +istream concepts +istream cstdarg +istream cstddef +istream cstdint +istream cstdio +istream cstdlib +istream cstring +istream ctime +istream cwchar +istream cwctype +istream deque +istream exception +istream format +istream functional +istream initializer_list +istream ios +istream iosfwd +istream iterator +istream limits +istream locale +istream memory +istream mutex +istream new +istream optional +istream ostream +istream print +istream queue +istream ratio +istream stack +istream stdexcept +istream streambuf +istream string +istream string_view +istream system_error +istream tuple +istream type_traits +istream typeinfo +istream unordered_map +istream utility +istream variant +istream vector +istream version +iterator cctype +iterator cmath +iterator compare +iterator concepts +iterator cstddef +iterator cstdint +iterator cstdio +iterator cstdlib +iterator cstring +iterator cwchar +iterator cwctype +iterator exception +iterator initializer_list +iterator iosfwd +iterator limits +iterator new +iterator tuple +iterator type_traits +iterator typeinfo +iterator utility +iterator variant +iterator version +latch atomic +latch climits +latch cmath +latch compare +latch cstddef +latch cstdint +latch cstdlib +latch cstring +latch ctime +latch limits +latch ratio +latch type_traits +latch version +limits cstdint +limits type_traits +limits version +list algorithm +list array +list atomic +list bit +list cctype +list cerrno +list climits +list clocale +list cmath +list compare +list concepts +list cstdarg +list cstddef +list cstdint +list cstdio +list cstdlib +list cstring +list ctime +list cwchar +list cwctype +list exception +list functional +list initializer_list +list ios +list iosfwd +list iterator +list limits +list locale +list memory +list mutex +list new +list optional +list ratio +list stdexcept +list streambuf +list string +list string_view +list system_error +list tuple +list type_traits +list typeinfo +list unordered_map +list utility +list variant +list vector +list version +locale algorithm +locale atomic +locale bit +locale cctype +locale cerrno +locale climits +locale clocale +locale cmath +locale compare +locale concepts +locale cstdarg +locale cstddef +locale cstdint +locale cstdio +locale cstdlib +locale cstring +locale ctime +locale cwchar +locale cwctype +locale exception +locale initializer_list +locale ios +locale iosfwd +locale iterator +locale limits +locale memory +locale mutex +locale new +locale optional +locale ratio +locale stdexcept +locale streambuf +locale string +locale string_view +locale system_error +locale tuple +locale type_traits +locale typeinfo +locale utility +locale variant +locale version +map algorithm +map array +map atomic +map bit +map cctype +map cerrno +map climits +map clocale +map cmath +map compare +map concepts +map cstdarg +map cstddef +map cstdint +map cstdio +map cstdlib +map cstring +map ctime +map cwchar +map cwctype +map exception +map functional +map initializer_list +map ios +map iosfwd +map iterator +map limits +map locale +map memory +map mutex +map new +map optional +map ratio +map stdexcept +map streambuf +map string +map string_view +map system_error +map tuple +map type_traits +map typeinfo +map unordered_map +map utility +map variant +map vector +map version +mdspan version +memory atomic +memory cctype +memory climits +memory cmath +memory compare +memory concepts +memory cstddef +memory cstdint +memory cstdio +memory cstdlib +memory cstring +memory ctime +memory cwchar +memory cwctype +memory exception +memory initializer_list +memory iosfwd +memory iterator +memory limits +memory new +memory ratio +memory stdexcept +memory tuple +memory type_traits +memory typeinfo +memory utility +memory variant +memory version +memory_resource cstddef +memory_resource cstdint +memory_resource cstdlib +memory_resource exception +memory_resource iosfwd +memory_resource new +memory_resource stdexcept +memory_resource type_traits +memory_resource typeinfo +memory_resource version +mutex algorithm +mutex atomic +mutex bit +mutex cctype +mutex cerrno +mutex climits +mutex cmath +mutex compare +mutex concepts +mutex cstddef +mutex cstdint +mutex cstdio +mutex cstdlib +mutex cstring +mutex ctime +mutex cwchar +mutex cwctype +mutex exception +mutex initializer_list +mutex iosfwd +mutex iterator +mutex limits +mutex memory +mutex new +mutex optional +mutex ratio +mutex stdexcept +mutex string +mutex string_view +mutex system_error +mutex tuple +mutex type_traits +mutex typeinfo +mutex utility +mutex variant +mutex version +new cstddef +new cstdint +new cstdlib +new type_traits +new version +numbers concepts +numbers cstddef +numbers cstdint +numbers type_traits +numbers version +numeric algorithm +numeric array +numeric atomic +numeric bit +numeric cctype +numeric cerrno +numeric climits +numeric clocale +numeric cmath +numeric compare +numeric concepts +numeric cstdarg +numeric cstddef +numeric cstdint +numeric cstdio +numeric cstdlib +numeric cstring +numeric ctime +numeric cwchar +numeric cwctype +numeric exception +numeric execution +numeric functional +numeric initializer_list +numeric ios +numeric iosfwd +numeric iterator +numeric limits +numeric locale +numeric memory +numeric mutex +numeric new +numeric optional +numeric ratio +numeric stdexcept +numeric streambuf +numeric string +numeric string_view +numeric system_error +numeric tuple +numeric type_traits +numeric typeinfo +numeric unordered_map +numeric utility +numeric variant +numeric vector +numeric version +optional atomic +optional cctype +optional climits +optional cmath +optional compare +optional concepts +optional cstddef +optional cstdint +optional cstdio +optional cstdlib +optional cstring +optional ctime +optional cwchar +optional cwctype +optional exception +optional initializer_list +optional iosfwd +optional iterator +optional limits +optional memory +optional new +optional ratio +optional stdexcept +optional tuple +optional type_traits +optional typeinfo +optional utility +optional variant +optional version +ostream algorithm +ostream array +ostream atomic +ostream bit +ostream bitset +ostream cctype +ostream cerrno +ostream climits +ostream clocale +ostream cmath +ostream compare +ostream concepts +ostream cstdarg +ostream cstddef +ostream cstdint +ostream cstdio +ostream cstdlib +ostream cstring +ostream ctime +ostream cwchar +ostream cwctype +ostream deque +ostream exception +ostream format +ostream functional +ostream initializer_list +ostream ios +ostream iosfwd +ostream iterator +ostream limits +ostream locale +ostream memory +ostream mutex +ostream new +ostream optional +ostream print +ostream queue +ostream ratio +ostream stack +ostream stdexcept +ostream streambuf +ostream string +ostream string_view +ostream system_error +ostream tuple +ostream type_traits +ostream typeinfo +ostream unordered_map +ostream utility +ostream variant +ostream vector +ostream version +print algorithm +print array +print atomic +print bit +print cctype +print cerrno +print climits +print clocale +print cmath +print compare +print concepts +print cstdarg +print cstddef +print cstdint +print cstdio +print cstdlib +print cstring +print ctime +print cwchar +print cwctype +print deque +print exception +print format +print functional +print initializer_list +print ios +print iosfwd +print iterator +print limits +print locale +print memory +print mutex +print new +print optional +print queue +print ratio +print stack +print stdexcept +print streambuf +print string +print string_view +print system_error +print tuple +print type_traits +print typeinfo +print unordered_map +print utility +print variant +print vector +print version +queue algorithm +queue array +queue atomic +queue bit +queue cctype +queue cerrno +queue climits +queue clocale +queue cmath +queue compare +queue concepts +queue cstdarg +queue cstddef +queue cstdint +queue cstdio +queue cstdlib +queue cstring +queue ctime +queue cwchar +queue cwctype +queue deque +queue exception +queue functional +queue initializer_list +queue ios +queue iosfwd +queue iterator +queue limits +queue locale +queue memory +queue mutex +queue new +queue optional +queue ratio +queue stdexcept +queue streambuf +queue string +queue string_view +queue system_error +queue tuple +queue type_traits +queue typeinfo +queue unordered_map +queue utility +queue variant +queue vector +queue version +random algorithm +random array +random atomic +random bit +random cctype +random cerrno +random climits +random clocale +random cmath +random compare +random concepts +random cstdarg +random cstddef +random cstdint +random cstdio +random cstdlib +random cstring +random ctime +random cwchar +random cwctype +random exception +random execution +random functional +random initializer_list +random ios +random iosfwd +random iterator +random limits +random locale +random memory +random mutex +random new +random numeric +random optional +random ratio +random stdexcept +random streambuf +random string +random string_view +random system_error +random tuple +random type_traits +random typeinfo +random unordered_map +random utility +random variant +random vector +random version +ranges cctype +ranges cmath +ranges compare +ranges concepts +ranges cstddef +ranges cstdint +ranges cstdio +ranges cstdlib +ranges cstring +ranges cwchar +ranges cwctype +ranges exception +ranges initializer_list +ranges iosfwd +ranges iterator +ranges limits +ranges new +ranges tuple +ranges type_traits +ranges typeinfo +ranges utility +ranges variant +ranges version +ratio climits +ratio cstdint +ratio type_traits +ratio version +regex algorithm +regex array +regex atomic +regex bit +regex cctype +regex cerrno +regex climits +regex clocale +regex cmath +regex compare +regex concepts +regex cstdarg +regex cstddef +regex cstdint +regex cstdio +regex cstdlib +regex cstring +regex ctime +regex cwchar +regex cwctype +regex deque +regex exception +regex functional +regex initializer_list +regex ios +regex iosfwd +regex iterator +regex limits +regex locale +regex memory +regex mutex +regex new +regex optional +regex ratio +regex stdexcept +regex streambuf +regex string +regex string_view +regex system_error +regex tuple +regex type_traits +regex typeinfo +regex unordered_map +regex utility +regex variant +regex vector +regex version +scoped_allocator atomic +scoped_allocator cctype +scoped_allocator climits +scoped_allocator cmath +scoped_allocator compare +scoped_allocator concepts +scoped_allocator cstddef +scoped_allocator cstdint +scoped_allocator cstdio +scoped_allocator cstdlib +scoped_allocator cstring +scoped_allocator ctime +scoped_allocator cwchar +scoped_allocator cwctype +scoped_allocator exception +scoped_allocator initializer_list +scoped_allocator iosfwd +scoped_allocator iterator +scoped_allocator limits +scoped_allocator memory +scoped_allocator new +scoped_allocator ratio +scoped_allocator stdexcept +scoped_allocator tuple +scoped_allocator type_traits +scoped_allocator typeinfo +scoped_allocator utility +scoped_allocator variant +scoped_allocator version +semaphore atomic +semaphore climits +semaphore cmath +semaphore compare +semaphore cstddef +semaphore cstdint +semaphore cstdlib +semaphore cstring +semaphore ctime +semaphore limits +semaphore ratio +semaphore type_traits +semaphore version +set algorithm +set array +set atomic +set bit +set cctype +set cerrno +set climits +set clocale +set cmath +set compare +set concepts +set cstdarg +set cstddef +set cstdint +set cstdio +set cstdlib +set cstring +set ctime +set cwchar +set cwctype +set exception +set functional +set initializer_list +set ios +set iosfwd +set iterator +set limits +set locale +set memory +set mutex +set new +set optional +set ratio +set stdexcept +set streambuf +set string +set string_view +set system_error +set tuple +set type_traits +set typeinfo +set unordered_map +set utility +set variant +set vector +set version +shared_mutex algorithm +shared_mutex atomic +shared_mutex bit +shared_mutex cctype +shared_mutex cerrno +shared_mutex climits +shared_mutex cmath +shared_mutex compare +shared_mutex concepts +shared_mutex cstddef +shared_mutex cstdint +shared_mutex cstdio +shared_mutex cstdlib +shared_mutex cstring +shared_mutex ctime +shared_mutex cwchar +shared_mutex cwctype +shared_mutex exception +shared_mutex initializer_list +shared_mutex iosfwd +shared_mutex iterator +shared_mutex limits +shared_mutex memory +shared_mutex new +shared_mutex optional +shared_mutex ratio +shared_mutex stdexcept +shared_mutex string +shared_mutex string_view +shared_mutex system_error +shared_mutex tuple +shared_mutex type_traits +shared_mutex typeinfo +shared_mutex utility +shared_mutex variant +shared_mutex version +source_location cstdint +source_location version +span algorithm +span array +span atomic +span bit +span cctype +span cerrno +span climits +span clocale +span cmath +span compare +span concepts +span cstdarg +span cstddef +span cstdint +span cstdio +span cstdlib +span cstring +span ctime +span cwchar +span cwctype +span exception +span functional +span initializer_list +span ios +span iosfwd +span iterator +span limits +span locale +span memory +span mutex +span new +span optional +span ratio +span stdexcept +span streambuf +span string +span string_view +span system_error +span tuple +span type_traits +span typeinfo +span unordered_map +span utility +span variant +span vector +span version +sstream algorithm +sstream array +sstream atomic +sstream bit +sstream bitset +sstream cctype +sstream cerrno +sstream climits +sstream clocale +sstream cmath +sstream compare +sstream concepts +sstream cstdarg +sstream cstddef +sstream cstdint +sstream cstdio +sstream cstdlib +sstream cstring +sstream ctime +sstream cwchar +sstream cwctype +sstream deque +sstream exception +sstream format +sstream functional +sstream initializer_list +sstream ios +sstream iosfwd +sstream istream +sstream iterator +sstream limits +sstream locale +sstream memory +sstream mutex +sstream new +sstream optional +sstream ostream +sstream print +sstream queue +sstream ratio +sstream stack +sstream stdexcept +sstream streambuf +sstream string +sstream string_view +sstream system_error +sstream tuple +sstream type_traits +sstream typeinfo +sstream unordered_map +sstream utility +sstream variant +sstream vector +sstream version +stack algorithm +stack array +stack atomic +stack bit +stack cctype +stack cerrno +stack climits +stack clocale +stack cmath +stack compare +stack concepts +stack cstdarg +stack cstddef +stack cstdint +stack cstdio +stack cstdlib +stack cstring +stack ctime +stack cwchar +stack cwctype +stack deque +stack exception +stack functional +stack initializer_list +stack ios +stack iosfwd +stack iterator +stack limits +stack locale +stack memory +stack mutex +stack new +stack optional +stack ratio +stack stdexcept +stack streambuf +stack string +stack string_view +stack system_error +stack tuple +stack type_traits +stack typeinfo +stack unordered_map +stack utility +stack variant +stack vector +stack version +stdexcept cstddef +stdexcept cstdint +stdexcept cstdlib +stdexcept exception +stdexcept iosfwd +stdexcept new +stdexcept type_traits +stdexcept typeinfo +stdexcept version +stop_token iosfwd +stop_token version +streambuf algorithm +streambuf atomic +streambuf bit +streambuf cctype +streambuf cerrno +streambuf climits +streambuf clocale +streambuf cmath +streambuf compare +streambuf concepts +streambuf cstddef +streambuf cstdint +streambuf cstdio +streambuf cstdlib +streambuf cstring +streambuf ctime +streambuf cwchar +streambuf cwctype +streambuf exception +streambuf initializer_list +streambuf ios +streambuf iosfwd +streambuf iterator +streambuf limits +streambuf memory +streambuf mutex +streambuf new +streambuf optional +streambuf ratio +streambuf stdexcept +streambuf string +streambuf string_view +streambuf system_error +streambuf tuple +streambuf type_traits +streambuf typeinfo +streambuf utility +streambuf variant +streambuf version +string algorithm +string atomic +string bit +string cctype +string climits +string cmath +string compare +string concepts +string cstddef +string cstdint +string cstdio +string cstdlib +string cstring +string ctime +string cwchar +string cwctype +string exception +string initializer_list +string iosfwd +string iterator +string limits +string memory +string new +string optional +string ratio +string stdexcept +string string_view +string tuple +string type_traits +string typeinfo +string utility +string variant +string version +string_view algorithm +string_view atomic +string_view bit +string_view cctype +string_view climits +string_view cmath +string_view compare +string_view concepts +string_view cstddef +string_view cstdint +string_view cstdio +string_view cstdlib +string_view cstring +string_view ctime +string_view cwchar +string_view cwctype +string_view exception +string_view initializer_list +string_view iosfwd +string_view iterator +string_view limits +string_view memory +string_view new +string_view optional +string_view ratio +string_view stdexcept +string_view tuple +string_view type_traits +string_view typeinfo +string_view utility +string_view variant +string_view version +strstream algorithm +strstream array +strstream atomic +strstream bit +strstream bitset +strstream cctype +strstream cerrno +strstream climits +strstream clocale +strstream cmath +strstream compare +strstream concepts +strstream cstdarg +strstream cstddef +strstream cstdint +strstream cstdio +strstream cstdlib +strstream cstring +strstream ctime +strstream cwchar +strstream cwctype +strstream deque +strstream exception +strstream format +strstream functional +strstream initializer_list +strstream ios +strstream iosfwd +strstream istream +strstream iterator +strstream limits +strstream locale +strstream memory +strstream mutex +strstream new +strstream optional +strstream ostream +strstream print +strstream queue +strstream ratio +strstream stack +strstream stdexcept +strstream streambuf +strstream string +strstream string_view +strstream system_error +strstream tuple +strstream type_traits +strstream typeinfo +strstream unordered_map +strstream utility +strstream variant +strstream vector +strstream version +syncstream algorithm +syncstream array +syncstream atomic +syncstream bit +syncstream bitset +syncstream cctype +syncstream cerrno +syncstream climits +syncstream clocale +syncstream cmath +syncstream compare +syncstream concepts +syncstream cstdarg +syncstream cstddef +syncstream cstdint +syncstream cstdio +syncstream cstdlib +syncstream cstring +syncstream ctime +syncstream cwchar +syncstream cwctype +syncstream deque +syncstream exception +syncstream format +syncstream functional +syncstream initializer_list +syncstream ios +syncstream iosfwd +syncstream iterator +syncstream limits +syncstream locale +syncstream map +syncstream memory +syncstream mutex +syncstream new +syncstream optional +syncstream ostream +syncstream print +syncstream queue +syncstream ratio +syncstream shared_mutex +syncstream stack +syncstream stdexcept +syncstream streambuf +syncstream string +syncstream string_view +syncstream system_error +syncstream tuple +syncstream type_traits +syncstream typeinfo +syncstream unordered_map +syncstream utility +syncstream variant +syncstream vector +syncstream version +system_error algorithm +system_error atomic +system_error bit +system_error cctype +system_error cerrno +system_error climits +system_error cmath +system_error compare +system_error concepts +system_error cstddef +system_error cstdint +system_error cstdio +system_error cstdlib +system_error cstring +system_error ctime +system_error cwchar +system_error cwctype +system_error exception +system_error initializer_list +system_error iosfwd +system_error iterator +system_error limits +system_error memory +system_error new +system_error optional +system_error ratio +system_error stdexcept +system_error string +system_error string_view +system_error tuple +system_error type_traits +system_error typeinfo +system_error utility +system_error variant +system_error version +thread algorithm +thread array +thread atomic +thread bit +thread bitset +thread cctype +thread cerrno +thread chrono +thread climits +thread clocale +thread cmath +thread compare +thread concepts +thread cstdarg +thread cstddef +thread cstdint +thread cstdio +thread cstdlib +thread cstring +thread ctime +thread cwchar +thread cwctype +thread deque +thread exception +thread format +thread forward_list +thread functional +thread initializer_list +thread ios +thread iosfwd +thread istream +thread iterator +thread limits +thread locale +thread memory +thread mutex +thread new +thread optional +thread ostream +thread print +thread queue +thread ratio +thread sstream +thread stack +thread stdexcept +thread streambuf +thread string +thread string_view +thread system_error +thread tuple +thread type_traits +thread typeinfo +thread unordered_map +thread utility +thread variant +thread vector +thread version +tuple cmath +tuple compare +tuple cstddef +tuple cstdint +tuple cstdlib +tuple exception +tuple initializer_list +tuple iosfwd +tuple limits +tuple new +tuple type_traits +tuple typeinfo +tuple utility +tuple version +type_traits cstdint +type_traits version +typeindex cmath +typeindex compare +typeindex cstddef +typeindex cstdint +typeindex cstdlib +typeindex initializer_list +typeindex iosfwd +typeindex limits +typeindex new +typeindex type_traits +typeindex typeinfo +typeindex utility +typeindex version +typeinfo cstddef +typeinfo cstdint +typeinfo cstdlib +typeinfo type_traits +typeinfo version +unordered_map algorithm +unordered_map atomic +unordered_map bit +unordered_map cctype +unordered_map climits +unordered_map cmath +unordered_map compare +unordered_map concepts +unordered_map cstddef +unordered_map cstdint +unordered_map cstdio +unordered_map cstdlib +unordered_map cstring +unordered_map ctime +unordered_map cwchar +unordered_map cwctype +unordered_map exception +unordered_map initializer_list +unordered_map iosfwd +unordered_map iterator +unordered_map limits +unordered_map memory +unordered_map new +unordered_map optional +unordered_map ratio +unordered_map stdexcept +unordered_map tuple +unordered_map type_traits +unordered_map typeinfo +unordered_map utility +unordered_map variant +unordered_map version +unordered_set algorithm +unordered_set array +unordered_set atomic +unordered_set bit +unordered_set cctype +unordered_set cerrno +unordered_set climits +unordered_set clocale +unordered_set cmath +unordered_set compare +unordered_set concepts +unordered_set cstdarg +unordered_set cstddef +unordered_set cstdint +unordered_set cstdio +unordered_set cstdlib +unordered_set cstring +unordered_set ctime +unordered_set cwchar +unordered_set cwctype +unordered_set exception +unordered_set functional +unordered_set initializer_list +unordered_set ios +unordered_set iosfwd +unordered_set iterator +unordered_set limits +unordered_set locale +unordered_set memory +unordered_set mutex +unordered_set new +unordered_set optional +unordered_set ratio +unordered_set stdexcept +unordered_set streambuf +unordered_set string +unordered_set string_view +unordered_set system_error +unordered_set tuple +unordered_set type_traits +unordered_set typeinfo +unordered_set unordered_map +unordered_set utility +unordered_set variant +unordered_set vector +unordered_set version +utility cmath +utility compare +utility cstddef +utility cstdint +utility cstdlib +utility initializer_list +utility iosfwd +utility limits +utility type_traits +utility version +valarray algorithm +valarray array +valarray atomic +valarray bit +valarray cctype +valarray cerrno +valarray climits +valarray clocale +valarray cmath +valarray compare +valarray concepts +valarray cstdarg +valarray cstddef +valarray cstdint +valarray cstdio +valarray cstdlib +valarray cstring +valarray ctime +valarray cwchar +valarray cwctype +valarray exception +valarray functional +valarray initializer_list +valarray ios +valarray iosfwd +valarray iterator +valarray limits +valarray locale +valarray memory +valarray mutex +valarray new +valarray optional +valarray ratio +valarray stdexcept +valarray streambuf +valarray string +valarray string_view +valarray system_error +valarray tuple +valarray type_traits +valarray typeinfo +valarray unordered_map +valarray utility +valarray variant +valarray vector +valarray version +variant cmath +variant compare +variant cstddef +variant cstdint +variant cstdlib +variant cstring +variant exception +variant initializer_list +variant iosfwd +variant limits +variant new +variant tuple +variant type_traits +variant typeinfo +variant utility +variant version +vector algorithm +vector array +vector atomic +vector bit +vector cctype +vector cerrno +vector climits +vector clocale +vector cmath +vector compare +vector concepts +vector cstdarg +vector cstddef +vector cstdint +vector cstdio +vector cstdlib +vector cstring +vector ctime +vector cwchar +vector cwctype +vector exception +vector initializer_list +vector ios +vector iosfwd +vector iterator +vector limits +vector locale +vector memory +vector mutex +vector new +vector optional +vector ratio +vector stdexcept +vector streambuf +vector string +vector string_view +vector system_error +vector tuple +vector type_traits +vector typeinfo +vector utility +vector variant +vector version diff --git a/libcxx/test/libcxx-03/transitive_includes/to_csv.py b/libcxx/test/libcxx-03/transitive_includes/to_csv.py new file mode 100755 index 000000000000..69d94deedf6f --- /dev/null +++ b/libcxx/test/libcxx-03/transitive_includes/to_csv.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python +# ===----------------------------------------------------------------------===## +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# ===----------------------------------------------------------------------===## + +from typing import List, Tuple, Optional +import argparse +import io +import itertools +import os +import pathlib +import re +import sys + +libcxx_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) +sys.path.append(os.path.join(libcxx_root, "utils")) +from libcxx.header_information import Header + +def parse_line(line: str) -> Tuple[int, str]: + """ + Parse a single line of --trace-includes output. + + Returns the inclusion level and the raw file name being included. + """ + match = re.match(r"(\.+) (.+)", line) + if not match: + raise ArgumentError(f"Line {line} contains invalid data.") + + # The number of periods in front of the header name is the nesting level of + # that header. + return (len(match.group(1)), match.group(2)) + +def make_cxx_v1_relative(header: str) -> Optional[str]: + """ + Returns the path of the header as relative to <whatever>/c++/v1, or None if the path + doesn't contain c++/v1. + + We use that heuristic to figure out which headers are libc++ headers. + """ + # On Windows, the path separators can either be forward slash or backslash. + # If it is a backslash, Clang prints it escaped as two consecutive + # backslashes, and they need to be escaped in the RE. (Use a raw string for + # the pattern to avoid needing another level of escaping on the Python string + # literal level.) + pathsep = r"(?:/|\\\\)" + CXX_V1_REGEX = r"^.*c\+\+" + pathsep + r"v[0-9]+" + pathsep + r"(.+)$" + match = re.match(CXX_V1_REGEX, header) + if not match: + return None + else: + return match.group(1) + +def parse_file(file: io.TextIOBase) -> List[Tuple[Header, Header]]: + """ + Parse a file containing --trace-includes output to generate a list of the + transitive includes contained in it. + """ + result = [] + includer = None + for line in file.readlines(): + (level, header) = parse_line(line) + relative = make_cxx_v1_relative(header) + + # Not a libc++ header + if relative is None: + continue + + # If we're at the first level, remember this header as being the one who includes other headers. + # There's usually exactly one, except if the compiler is passed a file with `-include`. + if level == 1: + includer = Header(relative) + continue + + # Otherwise, take note that this header is being included by the top-level includer. + else: + assert includer is not None + result.append((includer, Header(relative))) + return result + +def print_csv(includes: List[Tuple[Header, Header]]) -> None: + """ + Print the transitive includes as space-delimited CSV. + + This function only prints public libc++ headers that are not C compatibility headers. + """ + # Sort and group by includer + by_includer = lambda t: t[0] + includes = itertools.groupby(sorted(includes, key=by_includer), key=by_includer) + + for (includer, includees) in includes: + includees = map(lambda t: t[1], includees) + for h in sorted(set(includees)): + if h.is_public() and not h.is_C_compatibility(): + print(f"{includer} {h}") + +def main(argv): + parser = argparse.ArgumentParser( + description=""" + Given a list of headers produced by --trace-includes, produce a list of libc++ headers in that output. + + Note that -fshow-skipped-includes must also be passed to the compiler in order to get sufficient + information for this script to run. + + The output of this script is provided in space-delimited CSV format where each line contains: + + <header performing inclusion> <header being included> + """) + parser.add_argument("inputs", type=argparse.FileType("r"), nargs='+', default=None, + help="One or more files containing the result of --trace-includes") + args = parser.parse_args(argv) + + includes = [line for file in args.inputs for line in parse_file(file)] + print_csv(includes) + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/libcxx/test/libcxx-03/type_traits/convert_to_integral.pass.cpp b/libcxx/test/libcxx-03/type_traits/convert_to_integral.pass.cpp new file mode 100644 index 000000000000..f1036b3929f0 --- /dev/null +++ b/libcxx/test/libcxx-03/type_traits/convert_to_integral.pass.cpp @@ -0,0 +1,123 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// TODO: Make this test pass for all standards. +// XFAIL: c++03 + +// <type_traits> + +// __convert_to_integral(Tp) + +// Test that the __convert_to_integral functions properly converts Tp to the +// correct type and value for integral, enum and user defined types. + +#include "test_macros.h" + +TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header") +#include <__utility/convert_to_integral.h> +#include <limits> +#include <type_traits> +#include <cstdint> +#include <cassert> + +#include "user_defined_integral.h" + +template <class T> +struct EnumType +{ + enum type : T {E_zero, E_one}; +}; + + +template <class From, class To> +void check_integral_types() +{ + typedef std::numeric_limits<From> Limits; + const From max = Limits::max(); + const From min = Limits::min(); + { + auto ret = std::__convert_to_integral((From)max); + assert(ret == max); + ret = std::__convert_to_integral((From)min); + assert(ret == min); + static_assert(std::is_same<decltype(ret), To>::value, ""); + } + { + UserDefinedIntegral<From> f(max); + auto ret = std::__convert_to_integral(f); + assert(ret == max); + f.value = min; + ret = std::__convert_to_integral(f); + assert(ret == min); + static_assert(std::is_same<decltype(ret), To>::value, ""); + } + { + typedef typename EnumType<From>::type Enum; + Enum e(static_cast<Enum>(max)); + auto ret = std::__convert_to_integral(e); + assert(ret == max); + e = static_cast<Enum>(min); + ret = std::__convert_to_integral(min); + assert(ret == min); + static_assert(std::is_same<decltype(ret), To>::value, ""); + } +} + + +template <class From, class To> +void check_enum_types() +{ + auto ret = std::__convert_to_integral((From)1); + assert(ret == 1); + static_assert(std::is_same<decltype(ret), To>::value, ""); +} + + +enum enum1 { zero = 0, one = 1 }; +enum enum2 : unsigned long { + value = std::numeric_limits<unsigned long>::max() +}; + +int main(int, char**) +{ + check_integral_types<bool, int>(); + check_integral_types<char, int>(); + check_integral_types<signed char, int>(); + check_integral_types<unsigned char, int>(); +#ifndef TEST_HAS_NO_WIDE_CHARACTERS + check_integral_types<wchar_t, decltype(((wchar_t)1) + 1)>(); +#endif + check_integral_types<char16_t, int>(); + // On some platforms, unsigned int and long are the same size. These + // platforms have a choice of making std::uint32_t an int or a long. However + // char32_t must promote to an unsigned int on these platforms [conv.prom]. + // Use the following logic to make the test work on such platforms. + // (sizeof(std::uint32_t) == sizeof(unsigned int)) ? unsigned int : std::uint32_t; + typedef std::conditional<sizeof(std::uint32_t) == sizeof(unsigned int), + unsigned int, std::uint32_t>::type char_integral; + check_integral_types<char32_t, char_integral>(); + check_integral_types<short, int>(); + check_integral_types<unsigned short, int>(); + check_integral_types<int, int>(); + check_integral_types<unsigned, unsigned>(); + check_integral_types<long, long>(); + check_integral_types<unsigned long, unsigned long>(); + check_integral_types<long long, long long>(); + check_integral_types<unsigned long long, unsigned long long>(); +#ifndef TEST_HAS_NO_INT128 + check_integral_types<__int128_t, __int128_t>(); + check_integral_types<__uint128_t, __uint128_t>(); +#endif + // TODO(ericwf): Not standard + typedef std::underlying_type<enum1>::type Enum1UT; + check_enum_types<enum1, decltype(((Enum1UT)1) + 1)>(); + typedef std::underlying_type<enum2>::type Enum2UT; + check_enum_types<enum2, decltype(((Enum2UT)1) + 1)>(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/type_traits/datasizeof.compile.pass.cpp b/libcxx/test/libcxx-03/type_traits/datasizeof.compile.pass.cpp new file mode 100644 index 000000000000..67a4dccb0f5f --- /dev/null +++ b/libcxx/test/libcxx-03/type_traits/datasizeof.compile.pass.cpp @@ -0,0 +1,62 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + +#include <__type_traits/datasizeof.h> +#include <cstdint> +#include <type_traits> + +static_assert(std::__datasizeof_v<std::int8_t> == 1, ""); +static_assert(std::__datasizeof_v<std::int16_t> == 2, ""); +static_assert(std::__datasizeof_v<std::int32_t> == 4, ""); +static_assert(std::__datasizeof_v<std::int64_t> == 8, ""); + +struct NonStandardLayout { + virtual ~NonStandardLayout(); +}; + +static_assert(!std::is_standard_layout<NonStandardLayout>::value, ""); +static_assert(std::__datasizeof_v<NonStandardLayout> == sizeof(void*), ""); + +struct Empty {}; + +static_assert(std::__datasizeof_v<Empty> == 0, ""); + +struct FinalEmpty final {}; + +static_assert(std::__datasizeof_v<FinalEmpty> == 0, ""); + +struct OneBytePadding final { + OneBytePadding() {} + + std::int16_t a; + std::int8_t b; +}; + +#if defined(_WIN32) && !defined(__MINGW32__) +static_assert(std::__datasizeof_v<OneBytePadding> == 4, ""); +#else +static_assert(std::__datasizeof_v<OneBytePadding> == 3, ""); +#endif + +struct InBetweenPadding { + InBetweenPadding() {} + + std::int32_t a; + std::int8_t b; + std::int16_t c; +}; + +static_assert(std::__datasizeof_v<InBetweenPadding> == 8, ""); + +struct NoDataButNoPadding { + OneBytePadding v; +}; + +static_assert(std::__datasizeof_v<NoDataButNoPadding> == 4, ""); diff --git a/libcxx/test/libcxx-03/type_traits/is_callable.compile.pass.cpp b/libcxx/test/libcxx-03/type_traits/is_callable.compile.pass.cpp new file mode 100644 index 000000000000..d7bd701aa706 --- /dev/null +++ b/libcxx/test/libcxx-03/type_traits/is_callable.compile.pass.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <__type_traits/is_callable.h> + +struct Functor { + void operator()(); +}; + +int func(); + +struct NotFunctor { + bool compare(); +}; + +struct ArgumentFunctor { + bool operator()(int, int); +}; + +static_assert(std::__is_callable<Functor>::value, ""); +static_assert(std::__is_callable<decltype(func)>::value, ""); +static_assert(!std::__is_callable<NotFunctor>::value, ""); +static_assert(!std::__is_callable<NotFunctor, + decltype(&NotFunctor::compare)>::value, ""); +static_assert(std::__is_callable<ArgumentFunctor, int, int>::value, ""); +static_assert(!std::__is_callable<ArgumentFunctor, int>::value, ""); diff --git a/libcxx/test/libcxx-03/type_traits/is_constant_evaluated.pass.cpp b/libcxx/test/libcxx-03/type_traits/is_constant_evaluated.pass.cpp new file mode 100644 index 000000000000..5e1b34259f2f --- /dev/null +++ b/libcxx/test/libcxx-03/type_traits/is_constant_evaluated.pass.cpp @@ -0,0 +1,30 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// <type_traits> + +// __libcpp_is_constant_evaluated() + +// returns false when there's no constant evaluation support from the compiler. +// as well as when called not in a constexpr context + +#include <__cxx03/__type_traits/is_constant_evaluated.h> +#include <cassert> + +#include "test_macros.h" + +int main (int, char**) { + ASSERT_SAME_TYPE(decltype(std::__libcpp_is_constant_evaluated()), bool); + ASSERT_NOEXCEPT(std::__libcpp_is_constant_evaluated()); + + bool p = std::__libcpp_is_constant_evaluated(); + assert(!p); + + return 0; + } diff --git a/libcxx/test/libcxx-03/type_traits/is_trivially_comparable.compile.pass.cpp b/libcxx/test/libcxx-03/type_traits/is_trivially_comparable.compile.pass.cpp new file mode 100644 index 000000000000..860ed63500e2 --- /dev/null +++ b/libcxx/test/libcxx-03/type_traits/is_trivially_comparable.compile.pass.cpp @@ -0,0 +1,65 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <__cxx03/__type_traits/conditional.h> +#include <__cxx03/__type_traits/is_equality_comparable.h> +#include <__cxx03/__type_traits/is_signed.h> +#include <cstdint> + +enum Enum : int {}; +enum class EnumClass : int {}; + +static_assert(std::__libcpp_is_trivially_equality_comparable<int, int>::value, ""); +static_assert(std::__libcpp_is_trivially_equality_comparable<const int, int>::value, ""); +static_assert(std::__libcpp_is_trivially_equality_comparable<int, const int>::value, ""); + +static_assert(std::__libcpp_is_trivially_equality_comparable<unsigned int, unsigned int>::value, ""); +static_assert(std::__libcpp_is_trivially_equality_comparable<const unsigned int, unsigned int>::value, ""); +static_assert(!std::__libcpp_is_trivially_equality_comparable<unsigned int, int>::value, ""); + +static_assert(!std::__libcpp_is_trivially_equality_comparable<std::int32_t, std::int64_t>::value, ""); +static_assert(!std::__libcpp_is_trivially_equality_comparable<std::int64_t, std::int32_t>::value, ""); + +static_assert(std::__libcpp_is_trivially_equality_comparable<int*, int*>::value, ""); +static_assert(std::__libcpp_is_trivially_equality_comparable<int*, void*>::value, ""); +static_assert(!std::__libcpp_is_trivially_equality_comparable<int*, long*>::value, ""); + +static_assert(!std::__libcpp_is_trivially_equality_comparable<Enum, int>::value, ""); +static_assert(!std::__libcpp_is_trivially_equality_comparable<EnumClass, int>::value, ""); + +static_assert(!std::__libcpp_is_trivially_equality_comparable<float, int>::value, ""); +static_assert(!std::__libcpp_is_trivially_equality_comparable<double, long long>::value, ""); + +static_assert(!std::__libcpp_is_trivially_equality_comparable<float, int>::value, ""); + +static_assert(!std::__libcpp_is_trivially_equality_comparable<float, float>::value, ""); +static_assert(!std::__libcpp_is_trivially_equality_comparable<double, double>::value, ""); +static_assert(!std::__libcpp_is_trivially_equality_comparable<long double, long double>::value, ""); + +static_assert(std::__libcpp_is_trivially_equality_comparable< + char, + typename std::conditional<std::is_signed<char>::value, signed char, unsigned char>::type>::value, + ""); +static_assert(std::__libcpp_is_trivially_equality_comparable<char16_t, std::uint_least16_t>::value, ""); + +struct S { + char c; +}; + +struct S2 { + char c; +}; + +struct VirtualBase : virtual S {}; +struct NonVirtualBase : S, S2 {}; + +static_assert(!std::__libcpp_is_trivially_equality_comparable<S*, VirtualBase*>::value, ""); +static_assert(!std::__libcpp_is_trivially_equality_comparable<S2*, VirtualBase*>::value, ""); + +// This is trivially_equality_comparable, but we can't detect it currently +static_assert(!std::__libcpp_is_trivially_equality_comparable<S*, NonVirtualBase*>::value, ""); diff --git a/libcxx/test/libcxx-03/type_traits/is_trivially_relocatable.compile.pass.cpp b/libcxx/test/libcxx-03/type_traits/is_trivially_relocatable.compile.pass.cpp new file mode 100644 index 000000000000..09049f38497a --- /dev/null +++ b/libcxx/test/libcxx-03/type_traits/is_trivially_relocatable.compile.pass.cpp @@ -0,0 +1,241 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <__cxx03/__type_traits/is_trivially_relocatable.h> +#include <array> +#include <deque> +#include <exception> +#include <expected> +#include <memory> +#include <optional> +#include <string> +#include <tuple> +#include <variant> +#include <vector> + +#include "constexpr_char_traits.h" +#include "test_allocator.h" +#include "test_macros.h" + +#ifndef TEST_HAS_NO_LOCALIZATION +# include <locale> +#endif + +static_assert(std::__libcpp_is_trivially_relocatable<char>::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<int>::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<double>::value, ""); + +struct Empty {}; +static_assert(std::__libcpp_is_trivially_relocatable<Empty>::value, ""); + +struct TriviallyCopyable { + char c; + int i; + Empty s; +}; +static_assert(std::__libcpp_is_trivially_relocatable<TriviallyCopyable>::value, ""); + +struct NotTriviallyCopyable { + NotTriviallyCopyable(const NotTriviallyCopyable&); + ~NotTriviallyCopyable(); +}; +static_assert(!std::__libcpp_is_trivially_relocatable<NotTriviallyCopyable>::value, ""); + +struct MoveOnlyTriviallyCopyable { + MoveOnlyTriviallyCopyable(const MoveOnlyTriviallyCopyable&) = delete; + MoveOnlyTriviallyCopyable& operator=(const MoveOnlyTriviallyCopyable&) = delete; + MoveOnlyTriviallyCopyable(MoveOnlyTriviallyCopyable&&) = default; + MoveOnlyTriviallyCopyable& operator=(MoveOnlyTriviallyCopyable&&) = default; +}; +static_assert(std::__libcpp_is_trivially_relocatable<MoveOnlyTriviallyCopyable>::value, ""); + +struct NonTrivialMoveConstructor { + NonTrivialMoveConstructor(NonTrivialMoveConstructor&&); +}; +static_assert(!std::__libcpp_is_trivially_relocatable<NonTrivialMoveConstructor>::value, ""); + +struct NonTrivialDestructor { + ~NonTrivialDestructor() {} +}; +static_assert(!std::__libcpp_is_trivially_relocatable<NonTrivialDestructor>::value, ""); + +// library-internal types +// ---------------------- + +// __split_buffer +static_assert(std::__libcpp_is_trivially_relocatable<std::__split_buffer<int> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::__split_buffer<NotTriviallyCopyable> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::__split_buffer<int, test_allocator<int> > >::value, ""); + +// standard library types +// ---------------------- + +// array +static_assert(std::__libcpp_is_trivially_relocatable<std::array<int, 0> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::array<NotTriviallyCopyable, 0> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::array<std::unique_ptr<int>, 0> >::value, ""); + +static_assert(std::__libcpp_is_trivially_relocatable<std::array<int, 1> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::array<NotTriviallyCopyable, 1> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::array<std::unique_ptr<int>, 1> >::value, ""); + +// basic_string +#if !__has_feature(address_sanitizer) || !_LIBCPP_INSTRUMENTED_WITH_ASAN +struct MyChar { + char c; +}; +template <class T> +struct NotTriviallyRelocatableCharTraits : constexpr_char_traits<T> { + NotTriviallyRelocatableCharTraits(const NotTriviallyRelocatableCharTraits&); + NotTriviallyRelocatableCharTraits& operator=(const NotTriviallyRelocatableCharTraits&); + ~NotTriviallyRelocatableCharTraits(); +}; + +static_assert(std::__libcpp_is_trivially_relocatable< + std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::value, + ""); +static_assert(std::__libcpp_is_trivially_relocatable< + std::basic_string<char, NotTriviallyRelocatableCharTraits<char>, std::allocator<char> > >::value, + ""); +static_assert(std::__libcpp_is_trivially_relocatable< + std::basic_string<MyChar, constexpr_char_traits<MyChar>, std::allocator<MyChar> > >::value, + ""); +static_assert( + std::__libcpp_is_trivially_relocatable< + std::basic_string<MyChar, NotTriviallyRelocatableCharTraits<MyChar>, std::allocator<MyChar> > >::value, + ""); +static_assert(!std::__libcpp_is_trivially_relocatable< + std::basic_string<char, std::char_traits<char>, test_allocator<char> > >::value, + ""); +static_assert( + !std::__libcpp_is_trivially_relocatable< + std::basic_string<MyChar, NotTriviallyRelocatableCharTraits<MyChar>, test_allocator<MyChar> > >::value, + ""); +#endif + +// deque +static_assert(std::__libcpp_is_trivially_relocatable<std::deque<int> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::deque<NotTriviallyCopyable> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::deque<int, test_allocator<int> > >::value, ""); + +// exception_ptr +#ifndef _LIBCPP_ABI_MICROSOFT // FIXME: Is this also the case on windows? +static_assert(std::__libcpp_is_trivially_relocatable<std::exception_ptr>::value, ""); +#endif + +// expected +#if TEST_STD_VER >= 23 +static_assert(std::__libcpp_is_trivially_relocatable<std::expected<int, int> >::value); +static_assert(std::__libcpp_is_trivially_relocatable<std::expected<std::unique_ptr<int>, int>>::value); +static_assert(std::__libcpp_is_trivially_relocatable<std::expected<int, std::unique_ptr<int>>>::value); +static_assert(std::__libcpp_is_trivially_relocatable<std::expected<std::unique_ptr<int>, std::unique_ptr<int>>>::value); + +static_assert(!std::__libcpp_is_trivially_relocatable<std::expected<int, NotTriviallyCopyable>>::value); +static_assert(!std::__libcpp_is_trivially_relocatable<std::expected<NotTriviallyCopyable, int>>::value); +static_assert( + !std::__libcpp_is_trivially_relocatable<std::expected<NotTriviallyCopyable, NotTriviallyCopyable>>::value); +#endif + +// locale +#ifndef TEST_HAS_NO_LOCALIZATION +static_assert(std::__libcpp_is_trivially_relocatable<std::locale>::value, ""); +#endif + +// optional +#if TEST_STD_VER >= 17 +static_assert(std::__libcpp_is_trivially_relocatable<std::optional<int>>::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::optional<NotTriviallyCopyable>>::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::optional<std::unique_ptr<int>>>::value, ""); +#endif // TEST_STD_VER >= 17 + +// pair +static_assert(std::__libcpp_is_trivially_relocatable<std::pair<int, int> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::pair<NotTriviallyCopyable, int> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::pair<int, NotTriviallyCopyable> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::pair<NotTriviallyCopyable, NotTriviallyCopyable> >::value, + ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::pair<std::unique_ptr<int>, std::unique_ptr<int> > >::value, + ""); + +// shared_ptr +static_assert(std::__libcpp_is_trivially_relocatable<std::shared_ptr<NotTriviallyCopyable> >::value, ""); + +// tuple +#if TEST_STD_VER >= 11 +static_assert(std::__libcpp_is_trivially_relocatable<std::tuple<> >::value, ""); + +static_assert(std::__libcpp_is_trivially_relocatable<std::tuple<int> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::tuple<NotTriviallyCopyable> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::tuple<std::unique_ptr<int> > >::value, ""); + +static_assert(std::__libcpp_is_trivially_relocatable<std::tuple<int, int> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::tuple<NotTriviallyCopyable, int> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::tuple<int, NotTriviallyCopyable> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::tuple<NotTriviallyCopyable, NotTriviallyCopyable> >::value, + ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::tuple<std::unique_ptr<int>, std::unique_ptr<int> > >::value, + ""); +#endif // TEST_STD_VER >= 11 + +// unique_ptr +struct NotTriviallyRelocatableDeleter { + NotTriviallyRelocatableDeleter(const NotTriviallyRelocatableDeleter&); + NotTriviallyRelocatableDeleter& operator=(const NotTriviallyRelocatableDeleter&); + ~NotTriviallyRelocatableDeleter(); + + template <class T> + void operator()(T*); +}; + +struct NotTriviallyRelocatablePointer { + struct pointer { + pointer(const pointer&); + pointer& operator=(const pointer&); + ~pointer(); + }; + + template <class T> + void operator()(T*); +}; + +static_assert(std::__libcpp_is_trivially_relocatable<std::unique_ptr<int> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::unique_ptr<NotTriviallyCopyable> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::unique_ptr<int[]> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::unique_ptr<int, NotTriviallyRelocatableDeleter> >::value, + ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::unique_ptr<int[], NotTriviallyRelocatableDeleter> >::value, + ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::unique_ptr<int, NotTriviallyRelocatablePointer> >::value, + ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::unique_ptr<int[], NotTriviallyRelocatablePointer> >::value, + ""); + +// variant +#if TEST_STD_VER >= 17 +static_assert(std::__libcpp_is_trivially_relocatable<std::variant<int> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::variant<NotTriviallyCopyable> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::variant<std::unique_ptr<int> > >::value, ""); + +static_assert(std::__libcpp_is_trivially_relocatable<std::variant<int, int> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::variant<NotTriviallyCopyable, int> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::variant<int, NotTriviallyCopyable> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::variant<NotTriviallyCopyable, NotTriviallyCopyable> >::value, + ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::variant<std::unique_ptr<int>, std::unique_ptr<int> > >::value, + ""); +#endif // TEST_STD_VER >= 17 + +// vector +static_assert(std::__libcpp_is_trivially_relocatable<std::vector<int> >::value, ""); +static_assert(std::__libcpp_is_trivially_relocatable<std::vector<NotTriviallyCopyable> >::value, ""); +static_assert(!std::__libcpp_is_trivially_relocatable<std::vector<int, test_allocator<int> > >::value, ""); + +// weak_ptr +static_assert(std::__libcpp_is_trivially_relocatable<std::weak_ptr<NotTriviallyCopyable> >::value, ""); + +// TODO: Mark all the trivially relocatable STL types as such diff --git a/libcxx/test/libcxx-03/utilities/exception_guard.odr.sh.cpp b/libcxx/test/libcxx-03/utilities/exception_guard.odr.sh.cpp new file mode 100644 index 000000000000..92ec3e97cabe --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/exception_guard.odr.sh.cpp @@ -0,0 +1,43 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// This test relies on `typeid` and thus requires `-frtti`. +// UNSUPPORTED: no-rtti + +// Make sure that we don't get ODR violations with __exception_guard when +// linking together TUs compiled with different values of -f[no-]exceptions. + +// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.except.o -O1 -fexceptions +// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.noexcept.o -O1 -fno-exceptions +// RUN: %{cxx} %{flags} %{link_flags} -o %t.exe %t.except.o %t.noexcept.o +// RUN: %{run} + +#include <__cxx03/__utility/exception_guard.h> +#include <cassert> +#include <cstring> +#include <typeinfo> + +struct Rollback { + void operator()() {} +}; + +#if defined(__cpp_exceptions) && __cpp_exceptions >= 199711L + +const char* func(); + +int main(int, char**) { + assert(std::strcmp(typeid(std::__exception_guard<Rollback>).name(), func()) != 0); + + return 0; +} + +#else + +const char* func() { return typeid(std::__exception_guard<Rollback>).name(); } + +#endif diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp new file mode 100644 index 000000000000..48460d1488fd --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp @@ -0,0 +1,405 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <functional> + +// INVOKE (f, t1, t2, ..., tN) + +//------------------------------------------------------------------------------ +// TESTING INVOKE(f, t1, t2, ..., tN) +// - Bullet 1 -- (t1.*f)(t2, ..., tN) +// - Bullet 2 -- (t1.get().*f)(t2, ..., tN) // t1 is a reference_wrapper +// - Bullet 3 -- ((*t1).*f)(t2, ..., tN) +// +// Overview: +// Bullets 1, 2 and 3 handle the case where 'f' is a pointer to member function. +// Bullet 1 only handles the cases where t1 is an object of type T or a +// type derived from 'T'. Bullet 2 handles the case where 't1' is a reference +// wrapper and bullet 3 handles all other cases. +// +// Concerns: +// 1) cv-qualified member function signatures are accepted. +// 2) reference qualified member function signatures are accepted. +// 3) member functions with varargs at the end are accepted. +// 4) The arguments are perfect forwarded to the member function call. +// 5) Classes that are publicly derived from 'T' are accepted as the call object +// 6) All types that dereference to T or a type derived from T can be used +// as the call object. +// 7) Pointers to T or a type derived from T can be used as the call object. +// 8) Reference return types are properly deduced. +// 9) reference_wrappers are properly handled and unwrapped. +// +// +// Plan: +// 1) Create a class that contains a set, 'S', of non-static functions. +// 'S' should include functions that cover every single combination +// of qualifiers and varargs for arities of 0, 1 and 2 (C-1,2,3). +// The argument types used in the functions should be non-copyable (C-4). +// The functions should return 'MethodID::setUncheckedCall()'. +// +// 2) Create a set of supported call object, 'Objs', of different types +// and behaviors. (C-5,6,7) +// +// 3) Attempt to call each function, 'f', in 'S' with each call object, 'c', +// in 'Objs'. After every attempted call to 'f' check that 'f' was +// actually called using 'MethodID::checkCalled(<return-value>)' +// +// 3b) If 'f' is reference qualified call 'f' with the properly qualified +// call object. Otherwise call 'f' with lvalue call objects. +// +// 3a) If 'f' is const, volatile, or cv qualified then call it with call +// objects that are equally or less cv-qualified. + +#include <functional> +#include <cassert> +#include <type_traits> +#include <utility> + +#include "test_macros.h" +#include "invoke_helpers.h" + +//============================================================================== +// MemFun03 - C++03 compatible set of test member functions. +struct MemFun03 { + typedef void*& R; +#define F(...) \ + R f(__VA_ARGS__) { return MethodID<R(MemFun03::*)(__VA_ARGS__)>::setUncheckedCall(); } \ + R f(__VA_ARGS__) const { return MethodID<R(MemFun03::*)(__VA_ARGS__) const>::setUncheckedCall(); } \ + R f(__VA_ARGS__) volatile { return MethodID<R(MemFun03::*)(__VA_ARGS__) volatile>::setUncheckedCall(); } \ + R f(__VA_ARGS__) const volatile { return MethodID<R(MemFun03::*)(__VA_ARGS__) const volatile>::setUncheckedCall(); } +# + F() + F(...) + F(ArgType&) + F(ArgType&, ...) + F(ArgType&, ArgType&) + F(ArgType&, ArgType&, ...) + F(ArgType&, ArgType&, ArgType&) + F(ArgType&, ArgType&, ArgType&, ...) +#undef F +public: + MemFun03() {} +private: + MemFun03(MemFun03 const&); + MemFun03& operator=(MemFun03 const&); +}; + + +#if TEST_STD_VER >= 11 + +//============================================================================== +// MemFun11 - C++11 reference qualified test member functions. +struct MemFun11 { + typedef void*& R; + typedef MemFun11 C; +#define F(...) \ + R f(__VA_ARGS__) & { return MethodID<R(C::*)(__VA_ARGS__) &>::setUncheckedCall(); } \ + R f(__VA_ARGS__) const & { return MethodID<R(C::*)(__VA_ARGS__) const &>::setUncheckedCall(); } \ + R f(__VA_ARGS__) volatile & { return MethodID<R(C::*)(__VA_ARGS__) volatile &>::setUncheckedCall(); } \ + R f(__VA_ARGS__) const volatile & { return MethodID<R(C::*)(__VA_ARGS__) const volatile &>::setUncheckedCall(); } \ + R f(__VA_ARGS__) && { return MethodID<R(C::*)(__VA_ARGS__) &&>::setUncheckedCall(); } \ + R f(__VA_ARGS__) const && { return MethodID<R(C::*)(__VA_ARGS__) const &&>::setUncheckedCall(); } \ + R f(__VA_ARGS__) volatile && { return MethodID<R(C::*)(__VA_ARGS__) volatile &&>::setUncheckedCall(); } \ + R f(__VA_ARGS__) const volatile && { return MethodID<R(C::*)(__VA_ARGS__) const volatile &&>::setUncheckedCall(); } +# + F() + F(...) + F(ArgType&&) + F(ArgType&&, ...) + F(ArgType&&, ArgType&&) + F(ArgType&&, ArgType&&, ...) + F(ArgType&&, ArgType&&, ArgType&&) + F(ArgType&&, ArgType&&, ArgType&&, ...) +#undef F +public: + MemFun11() {} +private: + MemFun11(MemFun11 const&); + MemFun11& operator=(MemFun11 const&); +}; + +#endif // TEST_STD_VER >= 11 + + + +//============================================================================== +// TestCase - A test case for a single member function. +// ClassType - The type of the class being tested. +// CallSig - The function signature of the method being tested. +// Arity - the arity of 'CallSig' +// CV - the cv qualifiers of 'CallSig' represented as a type tag. +// RValue - The method is RValue qualified. +// ArgRValue - Call the method with RValue arguments. +template <class ClassType, class CallSig, int Arity, class CV, + bool RValue = false, bool ArgRValue = false> +struct TestCaseImp { +public: + + static void run() { TestCaseImp().doTest(); } + +private: + //========================================================================== + // TEST DISPATCH + void doTest() { + // (Plan-2) Create test call objects. + typedef ClassType T; + typedef DerivedFromType<T> D; + T obj; + T* obj_ptr = &obj; + D der; + D* der_ptr = &der; + DerefToType<T> dref; + DerefPropType<T> dref2; + std::reference_wrapper<T> rref(obj); + std::reference_wrapper<D> drref(der); + + // (Plan-3) Dispatch based on the CV tags. + CV tag; + Bool<!RValue> NotRValue; + runTestDispatch(tag, obj); + runTestDispatch(tag, der); + runTestDispatch(tag, dref2); + runTestDispatchIf(NotRValue, tag, dref); + runTestDispatchIf(NotRValue, tag, obj_ptr); + runTestDispatchIf(NotRValue, tag, der_ptr); +#if TEST_STD_VER >= 11 + runTestDispatchIf(NotRValue, tag, rref); + runTestDispatchIf(NotRValue, tag, drref); +#endif + } + + template <class QT, class Tp> + void runTestDispatchIf(Bool<true>, QT q, Tp& v) { + runTestDispatch(q, v); + } + + template <class QT, class Tp> + void runTestDispatchIf(Bool<false>, QT, Tp&) { + } + + template <class Tp> + void runTestDispatch(Q_None, Tp& v) { + runTest(v); + } + + template <class Tp> + void runTestDispatch(Q_Const, Tp& v) { + runTest(v); + runTest(makeConst(v)); + } + + template <class Tp> + void runTestDispatch(Q_Volatile, Tp& v) { + runTest(v); + runTest(makeVolatile(v)); + + } + + template <class Tp> + void runTestDispatch(Q_CV, Tp& v) { + runTest(v); + runTest(makeConst(v)); + runTest(makeVolatile(v)); + runTest(makeCV(v)); + } + + template <class T> + void runTest(const std::reference_wrapper<T>& obj) { + typedef Caster<Q_None, RValue> SCast; + typedef Caster<Q_None, ArgRValue> ACast; + typedef CallSig (ClassType::*MemPtr); + // Delegate test to logic in invoke_helpers.h + BasicTest<MethodID<MemPtr>, Arity, SCast, ACast> b; + b.runTest( (MemPtr)&ClassType::f, obj); + } + + template <class T> + void runTest(T* obj) { + typedef Caster<Q_None, RValue> SCast; + typedef Caster<Q_None, ArgRValue> ACast; + typedef CallSig (ClassType::*MemPtr); + // Delegate test to logic in invoke_helpers.h + BasicTest<MethodID<MemPtr>, Arity, SCast, ACast> b; + b.runTest( (MemPtr)&ClassType::f, obj); + } + + template <class Obj> + void runTest(Obj& obj) { + typedef Caster<Q_None, RValue> SCast; + typedef Caster<Q_None, ArgRValue> ACast; + typedef CallSig (ClassType::*MemPtr); + // Delegate test to logic in invoke_helpers.h + BasicTest<MethodID<MemPtr>, Arity, SCast, ACast> b; + b.runTest( (MemPtr)&ClassType::f, obj); + } +}; + +template <class Sig, int Arity, class CV> +struct TestCase : public TestCaseImp<MemFun03, Sig, Arity, CV> {}; + +#if TEST_STD_VER >= 11 +template <class Sig, int Arity, class CV, bool RValue = false> +struct TestCase11 : public TestCaseImp<MemFun11, Sig, Arity, CV, RValue, true> {}; + +template <class Type> +struct ReferenceWrapper { + using type = Type; + Type* ptr; + + static void fun(Type&) noexcept; + static void fun(Type&&) = delete; + + template <class Type2, + class = typename std::enable_if<!std::__is_same_uncvref<Type2, ReferenceWrapper>::value>::type> + constexpr ReferenceWrapper(Type2&& t) noexcept : ptr(&t) {} + + constexpr Type& get() const noexcept { return *ptr; } + constexpr operator Type&() const noexcept { return *ptr; } + + template <class... _ArgTypes> + constexpr std::__invoke_result_t<Type&, _ArgTypes...> operator()(_ArgTypes&&... __args) const { + return std::__invoke(get(), std::forward<_ArgTypes>(__args)...); + } +}; + +template <class Tp> +struct DerivedFromRefWrap : public ReferenceWrapper<Tp> { + constexpr DerivedFromRefWrap(Tp& tp) : ReferenceWrapper<Tp>(tp) {} +}; + +TEST_CONSTEXPR_CXX14 bool test_derived_from_ref_wrap() { + int x = 42; + ReferenceWrapper<int> r(x); + DerivedFromRefWrap<int> d(x); + auto get_fn = &ReferenceWrapper<int>::get; + auto& ret = std::__invoke(get_fn, r); + assert(&ret == &x); + auto& ret2 = std::__invoke(get_fn, d); + assert(&ret2 == &x); + + return true; +} + +TEST_CONSTEXPR_CXX20 bool test_reference_wrapper_reference_wrapper() { + int x = 42; + auto get_fn = &std::reference_wrapper<int>::get; + std::reference_wrapper<int> r(x); + std::reference_wrapper<std::reference_wrapper<int>> r2(r); + auto& ret3 = std::__invoke(get_fn, r2); + assert(&ret3 == &x); + + return true; +} +#endif + +int main(int, char**) { + typedef void*& R; + typedef ArgType A; + TestCase<R(), 0, Q_None>::run(); + TestCase<R() const, 0, Q_Const>::run(); + TestCase<R() volatile, 0, Q_Volatile>::run(); + TestCase<R() const volatile, 0, Q_CV>::run(); + TestCase<R(...), 0, Q_None>::run(); + TestCase<R(...) const, 0, Q_Const>::run(); + TestCase<R(...) volatile, 0, Q_Volatile>::run(); + TestCase<R(...) const volatile, 0, Q_CV>::run(); + TestCase<R(A&), 1, Q_None>::run(); + TestCase<R(A&) const, 1, Q_Const>::run(); + TestCase<R(A&) volatile, 1, Q_Volatile>::run(); + TestCase<R(A&) const volatile, 1, Q_CV>::run(); + TestCase<R(A&, ...), 1, Q_None>::run(); + TestCase<R(A&, ...) const, 1, Q_Const>::run(); + TestCase<R(A&, ...) volatile, 1, Q_Volatile>::run(); + TestCase<R(A&, ...) const volatile, 1, Q_CV>::run(); + TestCase<R(A&, A&), 2, Q_None>::run(); + TestCase<R(A&, A&) const, 2, Q_Const>::run(); + TestCase<R(A&, A&) volatile, 2, Q_Volatile>::run(); + TestCase<R(A&, A&) const volatile, 2, Q_CV>::run(); + TestCase<R(A&, A&, ...), 2, Q_None>::run(); + TestCase<R(A&, A&, ...) const, 2, Q_Const>::run(); + TestCase<R(A&, A&, ...) volatile, 2, Q_Volatile>::run(); + TestCase<R(A&, A&, ...) const volatile, 2, Q_CV>::run(); + TestCase<R(A&, A&, A&), 3, Q_None>::run(); + TestCase<R(A&, A&, A&) const, 3, Q_Const>::run(); + TestCase<R(A&, A&, A&) volatile, 3, Q_Volatile>::run(); + TestCase<R(A&, A&, A&) const volatile, 3, Q_CV>::run(); + TestCase<R(A&, A&, A&, ...), 3, Q_None>::run(); + TestCase<R(A&, A&, A&, ...) const, 3, Q_Const>::run(); + TestCase<R(A&, A&, A&, ...) volatile, 3, Q_Volatile>::run(); + TestCase<R(A&, A&, A&, ...) const volatile, 3, Q_CV>::run(); + +#if TEST_STD_VER >= 11 + TestCase11<R() &, 0, Q_None>::run(); + TestCase11<R() const &, 0, Q_Const>::run(); + TestCase11<R() volatile &, 0, Q_Volatile>::run(); + TestCase11<R() const volatile &, 0, Q_CV>::run(); + TestCase11<R(...) &, 0, Q_None>::run(); + TestCase11<R(...) const &, 0, Q_Const>::run(); + TestCase11<R(...) volatile &, 0, Q_Volatile>::run(); + TestCase11<R(...) const volatile &, 0, Q_CV>::run(); + TestCase11<R(A&&) &, 1, Q_None>::run(); + TestCase11<R(A&&) const &, 1, Q_Const>::run(); + TestCase11<R(A&&) volatile &, 1, Q_Volatile>::run(); + TestCase11<R(A&&) const volatile &, 1, Q_CV>::run(); + TestCase11<R(A&&, ...) &, 1, Q_None>::run(); + TestCase11<R(A&&, ...) const &, 1, Q_Const>::run(); + TestCase11<R(A&&, ...) volatile &, 1, Q_Volatile>::run(); + TestCase11<R(A&&, ...) const volatile &, 1, Q_CV>::run(); + TestCase11<R(A&&, A&&) &, 2, Q_None>::run(); + TestCase11<R(A&&, A&&) const &, 2, Q_Const>::run(); + TestCase11<R(A&&, A&&) volatile &, 2, Q_Volatile>::run(); + TestCase11<R(A&&, A&&) const volatile &, 2, Q_CV>::run(); + TestCase11<R(A&&, A&&, ...) &, 2, Q_None>::run(); + TestCase11<R(A&&, A&&, ...) const &, 2, Q_Const>::run(); + TestCase11<R(A&&, A&&, ...) volatile &, 2, Q_Volatile>::run(); + TestCase11<R(A&&, A&&, ...) const volatile &, 2, Q_CV>::run(); + TestCase11<R() &&, 0, Q_None, /* RValue */ true>::run(); + TestCase11<R() const &&, 0, Q_Const, /* RValue */ true>::run(); + TestCase11<R() volatile &&, 0, Q_Volatile, /* RValue */ true>::run(); + TestCase11<R() const volatile &&, 0, Q_CV, /* RValue */ true>::run(); + TestCase11<R(...) &&, 0, Q_None, /* RValue */ true>::run(); + TestCase11<R(...) const &&, 0, Q_Const, /* RValue */ true>::run(); + TestCase11<R(...) volatile &&, 0, Q_Volatile, /* RValue */ true>::run(); + TestCase11<R(...) const volatile &&, 0, Q_CV, /* RValue */ true>::run(); + TestCase11<R(A&&) &&, 1, Q_None, /* RValue */ true>::run(); + TestCase11<R(A&&) const &&, 1, Q_Const, /* RValue */ true>::run(); + TestCase11<R(A&&) volatile &&, 1, Q_Volatile, /* RValue */ true>::run(); + TestCase11<R(A&&) const volatile &&, 1, Q_CV, /* RValue */ true>::run(); + TestCase11<R(A&&, ...) &&, 1, Q_None, /* RValue */ true>::run(); + TestCase11<R(A&&, ...) const &&, 1, Q_Const, /* RValue */ true>::run(); + TestCase11<R(A&&, ...) volatile &&, 1, Q_Volatile, /* RValue */ true>::run(); + TestCase11<R(A&&, ...) const volatile &&, 1, Q_CV, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&) &&, 2, Q_None, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&) const &&, 2, Q_Const, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&) volatile &&, 2, Q_Volatile, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&) const volatile &&, 2, Q_CV, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, ...) &&, 2, Q_None, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, ...) const &&, 2, Q_Const, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, ...) volatile &&, 2, Q_Volatile, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, ...) const volatile &&, 2, Q_CV, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, A&&) &&, 3, Q_None, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, A&&) const &&, 3, Q_Const, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, A&&) volatile &&, 3, Q_Volatile, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, A&&) const volatile &&, 3, Q_CV, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, A&&, ...) &&, 3, Q_None, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, A&&, ...) const &&, 3, Q_Const, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, A&&, ...) volatile &&, 3, Q_Volatile, /* RValue */ true>::run(); + TestCase11<R(A&&, A&&, A&&, ...) const volatile &&, 3, Q_CV, /* RValue */ true>::run(); + + test_derived_from_ref_wrap(); + test_reference_wrapper_reference_wrapper(); +#if TEST_STD_VER > 11 + static_assert(test_derived_from_ref_wrap(), ""); +#endif +#if TEST_STD_VER > 17 + static_assert(test_reference_wrapper_reference_wrapper(), ""); +#endif +#endif // TEST_STD_VER >= 11 + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp new file mode 100644 index 000000000000..0df59290824b --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp @@ -0,0 +1,210 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// FIXME(EricWF): Make this test pass in C++03 with Clang once the transition +// has gotten far enough that __invoke works. +// XFAIL: c++03 + +// <functional> + +// INVOKE (f, t1, t2, ..., tN) + +//------------------------------------------------------------------------------ +// TESTING INVOKE(f, t1, t2, ..., tN) +// - Bullet 4 -- t1.*f +// - Bullet 5 -- t1.get().*f // t1 is a reference wrapper. +// - Bullet 6 -- (*t1).*f +// +// Overview: +// Bullets 4, 5 and 6 handle the case where 'f' is a pointer to member object. +// Bullet 4 only handles the cases where t1 is an object of type T or a +// type derived from 'T'. Bullet 5 handles cases where 't1' is a reference_wrapper +// and bullet 6 handles all other cases. +// +// Concerns: +// 1) The return type is always an lvalue reference. +// 2) The return type is not less cv-qualified that the object that contains it. +// 3) The return type is not less cv-qualified than object type. +// 4) The call object is perfectly forwarded. +// 5) Classes that are publicly derived from 'T' are accepted as the call object +// 6) All types that dereference to T or a type derived from T can be used +// as the call object. +// 7) Pointers to T or a type derived from T can be used as the call object. +// 8) reference_wrapper's are properly unwrapped before invoking the function. + +#include <functional> +#include <cassert> +#include <type_traits> +#include <utility> + +#include "test_macros.h" +#include "invoke_helpers.h" + +template <class Tp> +struct TestMemberObject { + TestMemberObject() : object() {} + Tp object; +private: + TestMemberObject(TestMemberObject const&); + TestMemberObject& operator=(TestMemberObject const&); +}; + +template <class ObjectType> +struct TestCase { + public: + + static void run() { TestCase().doTest(); } + +private: + typedef TestMemberObject<ObjectType> TestType; + + //========================================================================== + // TEST DISPATCH + void doTest() { + typedef DerivedFromType<TestType> Derived; + TestType obj; + TestType* obj_ptr = &obj; + Derived der; + Derived* der_ptr = &der; + DerefToType<TestType> dref; + DerefPropType<TestType> dref2; + std::reference_wrapper<TestType> rref(obj); + std::reference_wrapper<Derived> drref(der); + + { + typedef ObjectType (TestType::*MemPtr); + typedef ObjectType E; + MemPtr M = &TestType::object; + runTestDispatch<E>(M, obj, &obj.object); + runTestDispatch<E>(M, der, &der.object); + runTestDispatch<E>(M, dref2, &dref2.object.object); + runTestPropCVDispatch<E>(M, obj_ptr, &obj_ptr->object); + runTestPropCVDispatch<E>(M, der_ptr, &der_ptr->object); +#if TEST_STD_VER >= 11 + runTestPropCVDispatch<E>(M, rref, &(rref.get().object)); + runTestPropCVDispatch<E>(M, drref, &(drref.get().object)); +#endif + runTestNoPropDispatch<E>(M, dref, &dref.object.object); + } + { + typedef ObjectType const (TestType::*CMemPtr); + typedef ObjectType const E; + CMemPtr M = &TestType::object; + runTestDispatch<E>(M, obj, &obj.object); + runTestDispatch<E>(M, der, &der.object); + runTestDispatch<E>(M, dref2, &dref2.object.object); + runTestPropCVDispatch<E>(M, obj_ptr, &obj_ptr->object); + runTestPropCVDispatch<E>(M, der_ptr, &der_ptr->object); +#if TEST_STD_VER >= 11 + runTestPropCVDispatch<E>(M, rref, &(rref.get().object)); + runTestPropCVDispatch<E>(M, drref, &(drref.get().object)); +#endif + runTestNoPropDispatch<E>(M, dref, &dref.object.object); + } + { + typedef ObjectType volatile (TestType::*VMemPtr); + typedef ObjectType volatile E; + VMemPtr M = &TestType::object; + runTestDispatch<E>(M, obj, &obj.object); + runTestDispatch<E>(M, der, &der.object); + runTestDispatch<E>(M, dref2, &dref2.object.object); + runTestPropCVDispatch<E>(M, obj_ptr, &obj_ptr->object); + runTestPropCVDispatch<E>(M, der_ptr, &der_ptr->object); +#if TEST_STD_VER >= 11 + runTestPropCVDispatch<E>(M, rref, &(rref.get().object)); + runTestPropCVDispatch<E>(M, drref, &(drref.get().object)); +#endif + runTestNoPropDispatch<E>(M, dref, &dref.object.object); + } + { + typedef ObjectType const volatile (TestType::*CVMemPtr); + typedef ObjectType const volatile E; + CVMemPtr M = &TestType::object; + runTestDispatch<E>(M, obj, &obj.object); + runTestDispatch<E>(M, der, &der.object); + runTestDispatch<E>(M, dref2, &dref2.object.object); + runTestPropCVDispatch<E>(M, obj_ptr, &obj_ptr->object); + runTestPropCVDispatch<E>(M, der_ptr, &der_ptr->object); +#if TEST_STD_VER >= 11 + runTestPropCVDispatch<E>(M, rref, &(rref.get().object)); + runTestPropCVDispatch<E>(M, drref, &(drref.get().object)); +#endif + runTestNoPropDispatch<E>(M, dref, &dref.object.object); + } + } + + template <class Expect, class Fn, class T> + void runTestDispatch(Fn M, T& obj, ObjectType* expect) { + runTest<Expect &> (M, C_<T&>(obj), expect); + runTest<Expect const&> (M, C_<T const&>(obj), expect); + runTest<Expect volatile&> (M, C_<T volatile&>(obj), expect); + runTest<Expect const volatile&>(M, C_<T const volatile&>(obj), expect); +#if TEST_STD_VER >= 11 + runTest<Expect&&> (M, C_<T&&>(obj), expect); + runTest<Expect const&&> (M, C_<T const&&>(obj), expect); + runTest<Expect volatile&&> (M, C_<T volatile&&>(obj), expect); + runTest<Expect const volatile&&>(M, C_<T const volatile&&>(obj), expect); +#endif + } + + template <class Expect, class Fn, class T> + void runTestPropCVDispatch(Fn M, T& obj, ObjectType* expect) { + runTest<Expect &> (M, obj, expect); + runTest<Expect const&> (M, makeConst(obj), expect); + runTest<Expect volatile&> (M, makeVolatile(obj), expect); + runTest<Expect const volatile&>(M, makeCV(obj), expect); + } + + template <class Expect, class Fn, class T> + void runTestNoPropDispatch(Fn M, T& obj, ObjectType* expect) { + runTest<Expect&>(M, C_<T &>(obj), expect); + runTest<Expect&>(M, C_<T const&>(obj), expect); + runTest<Expect&>(M, C_<T volatile&>(obj), expect); + runTest<Expect&>(M, C_<T const volatile&>(obj), expect); +#if TEST_STD_VER >= 11 + runTest<Expect&>(M, C_<T&&>(obj), expect); + runTest<Expect&>(M, C_<T const&&>(obj), expect); + runTest<Expect&>(M, C_<T volatile&&>(obj), expect); + runTest<Expect&>(M, C_<T const volatile&&>(obj), expect); +#endif + } + + template <class Expect, class Fn, class T> + void runTest(Fn M, const T& obj, ObjectType* expect) { + static_assert((std::is_same< + decltype(std::__invoke(M, obj)), Expect + >::value), ""); + Expect e = std::__invoke(M, obj); + assert(&e == expect); + } + + template <class Expect, class Fn, class T> +#if TEST_STD_VER >= 11 + void runTest(Fn M, T&& obj, ObjectType* expect) { +#else + void runTest(Fn M, T& obj, ObjectType* expect ) { +#endif + { + static_assert((std::is_same< + decltype(std::__invoke(M, std::forward<T>(obj))), Expect + >::value), ""); + Expect e = std::__invoke(M, std::forward<T>(obj)); + assert(&e == expect); + } + } +}; + +int main(int, char**) { + TestCase<ArgType>::run(); + TestCase<ArgType const>::run(); + TestCase<ArgType volatile>::run(); + TestCase<ArgType const volatile>::run(); + TestCase<ArgType*>::run(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_7.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_7.pass.cpp new file mode 100644 index 000000000000..fb789fa0a86c --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/bullet_7.pass.cpp @@ -0,0 +1,328 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <functional> + +// INVOKE (f, t1, t2, ..., tN) + +//------------------------------------------------------------------------------ +// TESTING INVOKE(f, t1, t2, ..., tN) +// - Bullet 7 -- f(t2, ..., tN) +// +// Overview: +// Bullet 7 handles the cases where the first argument is not a member +// function. +// +// Concerns: +// 1) Different types of callable objects are supported. Including +// 1a) Free Function pointers and references. +// 1b) Classes which provide a call operator +// 1c) lambdas +// 2) The callable objects are perfect forwarded. +// 3) The arguments are perfect forwarded. +// 4) Signatures which include varargs are supported. +// 5) In C++03 3 extra arguments should be allowed. +// +// Plan: +// 1) Define a set of free functions, 'SF', and class types with call +// operators, 'SC', that address concerns 4 and 5. The free functions should +// return 'FunctionID::setUncheckedCall()' and the call operators should +// return 'MethodID::setUncheckedCall()'. +// +// 2) For each function 'f' in 'SF' and 'SC' attempt to call 'f' +// using the correct number of arguments and cv-ref qualifiers. Check that +// 'f' has been called using 'FunctionID::checkCall()' if 'f' is a free +// function and 'MethodID::checkCall()' otherwise. + + + +#include <functional> +#include <type_traits> +#include <cassert> + +#include "test_macros.h" +#include "invoke_helpers.h" + + +//============================================================================== +// freeFunction03 - A C++03 free function. +void*& freeFunction03() { + return FunctionPtrID<void*&(), freeFunction03>::setUncheckedCall(); +} + +void*& freeFunction03(...) { + return FunctionPtrID<void*&(...), freeFunction03>::setUncheckedCall(); +} + +template <class A0> +void*& freeFunction03(A0&) { + return FunctionPtrID<void*&(A0&), freeFunction03>::setUncheckedCall(); +} + + +template <class A0> +void*& freeFunction03(A0&, ...) { + return FunctionPtrID<void*&(A0&, ...), freeFunction03>::setUncheckedCall(); +} + +template <class A0, class A1> +void*& freeFunction03(A0&, A1&) { + return FunctionPtrID<void*&(A0&, A1&), freeFunction03>::setUncheckedCall(); +} + + +template <class A0, class A1> +void*& freeFunction03(A0&, A1&, ...) { + return FunctionPtrID<void*&(A0&, A1&, ...), freeFunction03>::setUncheckedCall(); +} + +template <class A0, class A1, class A2> +void*& freeFunction03(A0&, A1&, A2&) { + return FunctionPtrID<void*&(A0&, A1&, A2&), freeFunction03>::setUncheckedCall(); +} + +template <class A0, class A1, class A2> +void*& freeFunction03(A0&, A1&, A2&, ...) { + return FunctionPtrID<void*&(A0&, A1&, A2&, ...), freeFunction03>::setUncheckedCall(); +} + +//============================================================================== +// Functor03 - C++03 compatible functor object +struct Functor03 { + typedef void*& R; + typedef Functor03 C; +#define F(Args, ...) \ + __VA_ARGS__ R operator() Args { return MethodID<R(C::*) Args>::setUncheckedCall(); } \ + __VA_ARGS__ R operator() Args const { return MethodID<R(C::*) Args const>::setUncheckedCall(); } \ + __VA_ARGS__ R operator() Args volatile { return MethodID<R(C::*) Args volatile>::setUncheckedCall(); } \ + __VA_ARGS__ R operator() Args const volatile { return MethodID<R(C::*) Args const volatile>::setUncheckedCall(); } +# + F(()) + F((A0&), template <class A0>) + F((A0&, A1&), template <class A0, class A1>) + F((A0&, A1&, A2&), template <class A0, class A1, class A2>) +#undef F +public: + Functor03() {} +private: + Functor03(Functor03 const&); + Functor03& operator=(Functor03 const&); +}; + + +#if TEST_STD_VER >= 11 + +//============================================================================== +// freeFunction11 - A C++11 free function. +template <class ...Args> +void*& freeFunction11(Args&&...) { + return FunctionPtrID<void*&(Args&&...), freeFunction11>::setUncheckedCall(); +} + +template <class ...Args> +void*& freeFunction11(Args&&...,...) { + return FunctionPtrID<void*&(Args&&...,...), freeFunction11>::setUncheckedCall(); +} + +//============================================================================== +// Functor11 - C++11 reference qualified test member functions. +struct Functor11 { + typedef void*& R; + typedef Functor11 C; + +#define F(CV) \ + template <class ...Args> \ + R operator()(Args&&...) CV { return MethodID<R(C::*)(Args&&...) CV>::setUncheckedCall(); } +# + F(&) + F(const &) + F(volatile &) + F(const volatile &) + F(&&) + F(const &&) + F(volatile &&) + F(const volatile &&) +#undef F +public: + Functor11() {} +private: + Functor11(Functor11 const&); + Functor11& operator=(Functor11 const&); +}; + +#endif // TEST_STD_VER >= 11 + + +//============================================================================== +// TestCaseFunctorImp - A test case for an operator() class method. +// ClassType - The type of the call object. +// CallSig - The function signature of the call operator being tested. +// Arity - the arity of 'CallSig' +// ObjCaster - Transformation function applied to call object. +// ArgCaster - Transformation function applied to the extra arguments. +template <class ClassType, class CallSig, int Arity, + class ObjCaster, class ArgCaster = LValueCaster> +struct TestCaseFunctorImp { +public: + static void run() { + typedef MethodID<CallSig ClassType::*> MID; + BasicTest<MID, Arity, ObjCaster, ArgCaster> t; + typedef ClassType T; + typedef DerivedFromType<T> D; + T obj; + D der; + t.runTest(obj); + t.runTest(der); + } +}; + +//============================================================================== +// TestCaseFreeFunction - A test case for a free function. +// CallSig - The function signature of the free function being tested. +// FnPtr - The function being tested. +// Arity - the arity of 'CallSig' +// ArgCaster - Transformation function to be applied to the extra arguments. +template <class CallSig, CallSig* FnPtr, int Arity, class ArgCaster> +struct TestCaseFreeFunction { +public: + static void run() { + typedef FunctionPtrID<CallSig, FnPtr> FID; + BasicTest<FID, Arity, LValueCaster, ArgCaster> t; + + DerefToType<CallSig*> deref_to(FnPtr); + DerefToType<CallSig&> deref_to_ref(*FnPtr); + + t.runTest(FnPtr); + t.runTest(*FnPtr); + t.runTest(deref_to); + t.runTest(deref_to_ref); + } +}; + +//============================================================================== +// runTest Helpers +//============================================================================== +#if TEST_STD_VER >= 11 +template <class Sig, int Arity, class ArgCaster> +void runFunctionTestCase11() { + TestCaseFreeFunction<Sig, freeFunction11, Arity, ArgCaster>(); +} +#endif + +template <class Sig, int Arity, class ArgCaster> +void runFunctionTestCase() { + TestCaseFreeFunction<Sig, freeFunction03, Arity, ArgCaster>(); +#if TEST_STD_VER >= 11 + runFunctionTestCase11<Sig, Arity, ArgCaster>(); +#endif +} + +template <class Sig, int Arity, class ObjCaster, class ArgCaster> +void runFunctorTestCase() { + TestCaseFunctorImp<Functor03, Sig, Arity, ObjCaster, ArgCaster>::run(); +} + +template <class Sig, int Arity, class ObjCaster> +void runFunctorTestCase() { + TestCaseFunctorImp<Functor03, Sig, Arity, ObjCaster>::run(); +} + +#if TEST_STD_VER >= 11 +// runTestCase - Run a test case for C++11 class functor types +template <class Sig, int Arity, class ObjCaster, class ArgCaster = LValueCaster> +void runFunctorTestCase11() { + TestCaseFunctorImp<Functor11, Sig, Arity, ObjCaster, ArgCaster>::run(); +} +#endif + +// runTestCase - Run a test case for both function and functor types. +template <class Sig, int Arity, class ArgCaster> +void runTestCase() { + runFunctionTestCase<Sig, Arity, ArgCaster>(); + runFunctorTestCase <Sig, Arity, LValueCaster, ArgCaster>(); +}; + +int main(int, char**) { + typedef void*& R; + typedef ArgType A; + typedef A const CA; + + runTestCase< R(), 0, LValueCaster >(); + runTestCase< R(A&), 1, LValueCaster >(); + runTestCase< R(A&, A&), 2, LValueCaster >(); + runTestCase< R(A&, A&, A&), 3, LValueCaster >(); + runTestCase< R(CA&), 1, ConstCaster >(); + runTestCase< R(CA&, CA&), 2, ConstCaster >(); + runTestCase< R(CA&, CA&, CA&), 3, ConstCaster >(); + + runFunctionTestCase<R(...), 0, LValueCaster >(); + runFunctionTestCase<R(A&, ...), 1, LValueCaster >(); + runFunctionTestCase<R(A&, A&, ...), 2, LValueCaster >(); + runFunctionTestCase<R(A&, A&, A&, ...), 3, LValueCaster >(); + +#if TEST_STD_VER >= 11 + runFunctionTestCase11<R(A&&), 1, MoveCaster >(); + runFunctionTestCase11<R(A&&, ...), 1, MoveCaster >(); +#endif + + runFunctorTestCase<R(), 0, LValueCaster >(); + runFunctorTestCase<R() const, 0, ConstCaster >(); + runFunctorTestCase<R() volatile, 0, VolatileCaster >(); + runFunctorTestCase<R() const volatile, 0, CVCaster >(); + runFunctorTestCase<R(A&), 1, LValueCaster >(); + runFunctorTestCase<R(A&) const, 1, ConstCaster >(); + runFunctorTestCase<R(A&) volatile, 1, VolatileCaster >(); + runFunctorTestCase<R(A&) const volatile, 1, CVCaster >(); + runFunctorTestCase<R(A&, A&), 2, LValueCaster >(); + runFunctorTestCase<R(A&, A&) const, 2, ConstCaster >(); + runFunctorTestCase<R(A&, A&) volatile, 2, VolatileCaster >(); + runFunctorTestCase<R(A&, A&) const volatile, 2, CVCaster >(); + runFunctorTestCase<R(A&, A&, A&), 3, LValueCaster >(); + runFunctorTestCase<R(A&, A&, A&) const, 3, ConstCaster >(); + runFunctorTestCase<R(A&, A&, A&) volatile, 3, VolatileCaster >(); + runFunctorTestCase<R(A&, A&, A&) const volatile, 3, CVCaster >(); + { + typedef ConstCaster CC; + runFunctorTestCase<R(CA&), 1, LValueCaster, CC>(); + runFunctorTestCase<R(CA&) const, 1, ConstCaster, CC>(); + runFunctorTestCase<R(CA&) volatile, 1, VolatileCaster, CC>(); + runFunctorTestCase<R(CA&) const volatile, 1, CVCaster, CC>(); + runFunctorTestCase<R(CA&, CA&), 2, LValueCaster, CC>(); + runFunctorTestCase<R(CA&, CA&) const, 2, ConstCaster, CC>(); + runFunctorTestCase<R(CA&, CA&) volatile, 2, VolatileCaster, CC>(); + runFunctorTestCase<R(CA&, CA&) const volatile, 2, CVCaster, CC>(); + runFunctorTestCase<R(CA&, CA&, CA&), 3, LValueCaster, CC>(); + runFunctorTestCase<R(CA&, CA&, CA&) const, 3, ConstCaster, CC>(); + runFunctorTestCase<R(CA&, CA&, CA&) volatile, 3, VolatileCaster, CC>(); + runFunctorTestCase<R(CA&, CA&, CA&) const volatile, 3, CVCaster, CC>(); + } + +#if TEST_STD_VER >= 11 + runFunctorTestCase11<R() &, 0, LValueCaster >(); + runFunctorTestCase11<R() const &, 0, ConstCaster >(); + runFunctorTestCase11<R() volatile &, 0, VolatileCaster >(); + runFunctorTestCase11<R() const volatile &, 0, CVCaster >(); + runFunctorTestCase11<R() &&, 0, MoveCaster >(); + runFunctorTestCase11<R() const &&, 0, MoveConstCaster >(); + runFunctorTestCase11<R() volatile &&, 0, MoveVolatileCaster >(); + runFunctorTestCase11<R() const volatile &&, 0, MoveCVCaster >(); + { + typedef MoveCaster MC; + runFunctorTestCase11<R(A&&) &, 1, LValueCaster, MC>(); + runFunctorTestCase11<R(A&&) const &, 1, ConstCaster, MC>(); + runFunctorTestCase11<R(A&&) volatile &, 1, VolatileCaster, MC>(); + runFunctorTestCase11<R(A&&) const volatile &, 1, CVCaster, MC>(); + runFunctorTestCase11<R(A&&) &&, 1, MoveCaster, MC>(); + runFunctorTestCase11<R(A&&) const &&, 1, MoveConstCaster, MC>(); + runFunctorTestCase11<R(A&&) volatile &&, 1, MoveVolatileCaster, MC>(); + runFunctorTestCase11<R(A&&) const volatile &&, 1, MoveCVCaster, MC>(); + } +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke.pass.cpp new file mode 100644 index 000000000000..e534553a87f0 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke.pass.cpp @@ -0,0 +1,46 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// [func.require] + +#include <type_traits> +#include <functional> + +#include "test_macros.h" + +template <typename T, int N> +struct Array +{ + typedef T type[N]; +}; + +struct Type +{ + Array<char, 1>::type& f1(); + Array<char, 2>::type& f2() const; +#if TEST_STD_VER >= 11 + Array<char, 1>::type& g1() &; + Array<char, 2>::type& g2() const &; + Array<char, 3>::type& g3() &&; + Array<char, 4>::type& g4() const &&; +#endif +}; + +int main(int, char**) +{ + static_assert(sizeof(std::__invoke(&Type::f1, std::declval<Type >())) == 1, ""); + static_assert(sizeof(std::__invoke(&Type::f2, std::declval<Type const >())) == 2, ""); +#if TEST_STD_VER >= 11 + static_assert(sizeof(std::__invoke(&Type::g1, std::declval<Type &>())) == 1, ""); + static_assert(sizeof(std::__invoke(&Type::g2, std::declval<Type const &>())) == 2, ""); + static_assert(sizeof(std::__invoke(&Type::g3, std::declval<Type &&>())) == 3, ""); + static_assert(sizeof(std::__invoke(&Type::g4, std::declval<Type const&&>())) == 4, ""); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke_helpers.h b/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke_helpers.h new file mode 100644 index 000000000000..f6f418b51c48 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/function.objects/func.require/invoke_helpers.h @@ -0,0 +1,375 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef INVOKE_HELPERS_H +#define INVOKE_HELPERS_H + +#include <type_traits> +#include <cassert> +#include <functional> + +#include "test_macros.h" + +template <int I> +struct Int : public std::integral_constant<int, I> {}; + +template <bool P> +struct Bool : public std::integral_constant<bool, P> {}; + +struct Q_None { + template <class T> + struct apply { typedef T type; }; +}; + +struct Q_Const { + template <class T> + struct apply { typedef T const type; }; +}; + +struct Q_Volatile { + template <class T> + struct apply { typedef T volatile type; }; +}; + +struct Q_CV { + template <class T> + struct apply { typedef T const volatile type; }; +}; + +// Caster - A functor object that performs cv-qualifier and value category +// conversions. +// QualTag - A metafunction type that applies cv-qualifiers to its argument. +// RValue - True if the resulting object should be an RValue reference. +// False otherwise. +template <class QualTag, bool RValue = false> +struct Caster { + template <class T> + struct apply { + typedef typename std::remove_reference<T>::type RawType; + typedef typename QualTag::template apply<RawType>::type CVType; +#if TEST_STD_VER >= 11 + typedef typename std::conditional<RValue, + CVType&&, CVType& + >::type type; +#else + typedef CVType& type; +#endif + }; + + template <class T> + typename apply<T>::type + operator()(T& obj) const { + typedef typename apply<T>::type OutType; + return static_cast<OutType>(obj); + } +}; + +typedef Caster<Q_None> LValueCaster; +typedef Caster<Q_Const> ConstCaster; +typedef Caster<Q_Volatile> VolatileCaster; +typedef Caster<Q_CV> CVCaster; +typedef Caster<Q_None, true> MoveCaster; +typedef Caster<Q_Const, true> MoveConstCaster; +typedef Caster<Q_Volatile, true> MoveVolatileCaster; +typedef Caster<Q_CV, true> MoveCVCaster; + + +template <class Tp> +Tp const& makeConst(Tp& ref) { return ref; } + +template <class Tp> +Tp const* makeConst(Tp* ptr) { return ptr; } + +template <class Tp> +std::reference_wrapper<const Tp> makeConst(std::reference_wrapper<Tp>& ref) { + return std::reference_wrapper<const Tp>(ref.get()); +} + +template <class Tp> +Tp volatile& makeVolatile(Tp& ref) { return ref; } + +template <class Tp> +Tp volatile* makeVolatile(Tp* ptr) { return ptr; } + +template <class Tp> +std::reference_wrapper<volatile Tp> makeVolatile(std::reference_wrapper<Tp>& ref) { + return std::reference_wrapper<volatile Tp>(ref.get()); +} + +template <class Tp> +Tp const volatile& makeCV(Tp& ref) { return ref; } + +template <class Tp> +Tp const volatile* makeCV(Tp* ptr) { return ptr; } + +template <class Tp> +std::reference_wrapper<const volatile Tp> makeCV(std::reference_wrapper<Tp>& ref) { + return std::reference_wrapper<const volatile Tp>(ref.get()); +} + +// A shorter name for 'static_cast' +template <class QualType, class Tp> +QualType C_(Tp& v) { return static_cast<QualType>(v); }; + +//============================================================================== +// ArgType - A non-copyable type intended to be used as a dummy argument type +// to test functions. +struct ArgType { + int value; + explicit ArgType(int val = 0) : value(val) {} +private: + ArgType(ArgType const&); + ArgType& operator=(ArgType const&); +}; + +//============================================================================== +// DerivedFromBase - A type that derives from its template argument 'Base' +template <class Base> +struct DerivedFromType : public Base { + DerivedFromType() : Base() {} + template <class Tp> + explicit DerivedFromType(Tp const& t) : Base(t) {} +}; + +//============================================================================== +// DerefToType - A type that dereferences to its template argument 'To'. +// The cv-ref qualifiers of the 'DerefToType' object do not propagate +// to the resulting 'To' object. +template <class To> +struct DerefToType { + To object; + + DerefToType() {} + + template <class Up> + explicit DerefToType(Up const& val) : object(val) {} + + To& operator*() const volatile { return const_cast<To&>(object); } +}; + +//============================================================================== +// DerefPropToType - A type that dereferences to its template argument 'To'. +// The cv-ref qualifiers of the 'DerefPropToType' object propagate +// to the resulting 'To' object. +template <class To> +struct DerefPropType { + To object; + + DerefPropType() {} + + template <class Up> + explicit DerefPropType(Up const& val) : object(val) {} + +#if TEST_STD_VER < 11 + To& operator*() { return object; } + To const& operator*() const { return object; } + To volatile& operator*() volatile { return object; } + To const volatile& operator*() const volatile { return object; } +#else + To& operator*() & { return object; } + To const& operator*() const & { return object; } + To volatile& operator*() volatile & { return object; } + To const volatile& operator*() const volatile & { return object; } + To&& operator*() && { return static_cast<To &&>(object); } + To const&& operator*() const && { return static_cast<To const&&>(object); } + To volatile&& operator*() volatile && { return static_cast<To volatile&&>(object); } + To const volatile&& operator*() const volatile && { return static_cast<To const volatile&&>(object); } +#endif +}; + +//============================================================================== +// MethodID - A type that uniquely identifies a member function for a class. +// This type is used to communicate between the member functions being tested +// and the tests invoking them. +// - Test methods should call 'setUncheckedCall()' whenever they are invoked. +// - Tests consume the unchecked call using checkCall(<return-value>)` to assert +// that the method has been called and that the return value of `__invoke` +// matches what the method actually returned. +template <class T> +struct MethodID { + typedef void* IDType; + + static int dummy; // A dummy memory location. + static void* id; // The "ID" is the value of this pointer. + static bool unchecked_call; // Has a call happened that has not been checked. + + static void*& setUncheckedCall() { + assert(unchecked_call == false); + unchecked_call = true; + return id; + } + + static bool checkCalled(void*& return_value) { + bool old = unchecked_call; + unchecked_call = false; + return old && id == return_value && &id == &return_value; + } +}; + +template <class T> int MethodID<T>::dummy = 0; +template <class T> void* MethodID<T>::id = (void*)&MethodID<T>::dummy; +template <class T> bool MethodID<T>::unchecked_call = false; + + +//============================================================================== +// FunctionPtrID - Like MethodID but for free function pointers. +template <class T, T*> +struct FunctionPtrID { + static int dummy; // A dummy memory location. + static void* id; // The "ID" is the value of this pointer. + static bool unchecked_call; // Has a call happened that has not been checked. + + static void*& setUncheckedCall() { + assert(unchecked_call == false); + unchecked_call = true; + return id; + } + + static bool checkCalled(void*& return_value) { + bool old = unchecked_call; + unchecked_call = false; + return old && id == return_value && &id == &return_value; + } +}; + +template <class T, T* Ptr> int FunctionPtrID<T, Ptr>::dummy = 0; +template <class T, T* Ptr> void* FunctionPtrID<T, Ptr>::id = (void*)&FunctionPtrID<T, Ptr>::dummy; +template <class T, T* Ptr> bool FunctionPtrID<T, Ptr>::unchecked_call = false; + +//============================================================================== +// BasicTest - The basic test structure for everything except +// member object pointers. +// ID - The "Function Identifier" type used either MethodID or FunctionPtrID. +// Arity - The Arity of the call signature. +// ObjectCaster - The object transformation functor type. +// ArgCaster - The extra argument transformation functor type. +template <class ID, int Arity, class ObjectCaster = LValueCaster, + class ArgCaster = LValueCaster> +struct BasicTest { + template <class ObjectT> + void runTest(ObjectT& object) { + Int<Arity> A; + runTestImp(A, object); + } + + template <class MethodPtr, class ObjectT> + void runTest(MethodPtr ptr, ObjectT& object) { + Int<Arity> A; + runTestImp(A, ptr, object); + } + +private: + typedef void*& CallRet; + ObjectCaster object_cast; + ArgCaster arg_cast; + ArgType a0, a1, a2; + + //========================================================================== + // BULLET 1, 2 AND 3 TEST METHODS + //========================================================================== + template <class MethodPtr, class ObjectT> + void runTestImp(Int<0>, MethodPtr ptr, ObjectT& object) { + { + static_assert((std::is_same< + decltype(std::__invoke(ptr, object_cast(object))) + , CallRet>::value), ""); + assert(ID::unchecked_call == false); + CallRet ret = std::__invoke(ptr, object_cast(object)); + assert(ID::checkCalled(ret)); + } + } + + template <class MethodPtr, class ObjectT> + void runTestImp(Int<1>, MethodPtr ptr, ObjectT& object) { + { + static_assert((std::is_same< + decltype(std::__invoke(ptr, object_cast(object), arg_cast(a0))) + , CallRet>::value), ""); + assert(ID::unchecked_call == false); + CallRet ret = std::__invoke(ptr, object_cast(object), arg_cast(a0)); + assert(ID::checkCalled(ret)); + } + } + + template <class MethodPtr, class ObjectT> + void runTestImp(Int<2>, MethodPtr ptr, ObjectT& object) { + { + static_assert((std::is_same< + decltype(std::__invoke(ptr, object_cast(object), arg_cast(a0), arg_cast(a1))) + , CallRet>::value), ""); + assert(ID::unchecked_call == false); + CallRet ret = std::__invoke(ptr, object_cast(object), arg_cast(a0), arg_cast(a1)); + assert(ID::checkCalled(ret)); + } + } + + template <class MethodPtr, class ObjectT> + void runTestImp(Int<3>, MethodPtr ptr, ObjectT& object) { + { + static_assert((std::is_same< + decltype(std::__invoke(ptr, object_cast(object), arg_cast(a0), arg_cast(a1), arg_cast(a2))) + , CallRet>::value), ""); + assert(ID::unchecked_call == false); + CallRet ret = std::__invoke(ptr, object_cast(object), arg_cast(a0), arg_cast(a1), arg_cast(a2)); + assert(ID::checkCalled(ret)); + } + } + + //========================================================================== + // BULLET 7 TEST METHODS + //========================================================================== + template <class ObjectT> + void runTestImp(Int<0>, ObjectT& object) { + { + static_assert((std::is_same< + decltype(std::__invoke(object_cast(object))) + , CallRet>::value), ""); + assert(ID::unchecked_call == false); + CallRet ret = std::__invoke(object_cast(object)); + assert(ID::checkCalled(ret)); + } + } + + template <class ObjectT> + void runTestImp(Int<1>, ObjectT& object) { + { + static_assert((std::is_same< + decltype(std::__invoke(object_cast(object), arg_cast(a0))) + , CallRet>::value), ""); + assert(ID::unchecked_call == false); + CallRet ret = std::__invoke(object_cast(object), arg_cast(a0)); + assert(ID::checkCalled(ret)); + } + } + + template <class ObjectT> + void runTestImp(Int<2>, ObjectT& object) { + { + static_assert((std::is_same< + decltype(std::__invoke(object_cast(object), arg_cast(a0), arg_cast(a1))) + , CallRet>::value), ""); + assert(ID::unchecked_call == false); + CallRet ret = std::__invoke(object_cast(object), arg_cast(a0), arg_cast(a1)); + assert(ID::checkCalled(ret)); + } + } + + template <class ObjectT> + void runTestImp(Int<3>, ObjectT& object) { + { + static_assert((std::is_same< + decltype(std::__invoke(object_cast(object), arg_cast(a0), arg_cast(a1), arg_cast(a2))) + , CallRet>::value), ""); + assert(ID::unchecked_call == false); + CallRet ret = std::__invoke(object_cast(object), arg_cast(a0), arg_cast(a1), arg_cast(a2)); + assert(ID::checkCalled(ret)); + } + } +}; + +#endif // INVOKE_HELPERS_H diff --git a/libcxx/test/libcxx-03/utilities/function.objects/refwrap/layout.binary.compile.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/refwrap/layout.binary.compile.pass.cpp new file mode 100644 index 000000000000..023ed8ddbfa3 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/function.objects/refwrap/layout.binary.compile.pass.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: msvc + +// ensure that binary_function always has the same ABI + +#include <functional> + +struct S1 : std::less<int>, std::greater<int> {}; + +static_assert(sizeof(S1) == 2, ""); + +struct S2 : std::less<int> { char c; }; + +static_assert(sizeof(S2) == 1, ""); diff --git a/libcxx/test/libcxx-03/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp b/libcxx/test/libcxx-03/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp new file mode 100644 index 000000000000..11f0724f990c --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp @@ -0,0 +1,43 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Test that UBSAN doesn't generate unsigned integer overflow diagnostics +// from within the hashing internals. + +#include <cstdint> +#include <functional> +#include <limits> +#include <string> +#include <utility> + +#include "test_macros.h" + +typedef std::__murmur2_or_cityhash<std::uint32_t> Hash32; +typedef std::__murmur2_or_cityhash<std::uint64_t> Hash64; + +void test(const void* key, int len) { + for (int i=1; i <= len; ++i) { + Hash32 h1; + Hash64 h2; + DoNotOptimize(h1(key, i)); + DoNotOptimize(h2(key, i)); + } +} + +int main(int, char**) { + const std::string TestCases[] = { + "abcdaoeuaoeclaoeoaeuaoeuaousaotehu]+}sthoasuthaoesutahoesutaohesutaoeusaoetuhasoetuhaoseutaoseuthaoesutaohes", + "00000000000000000000000000000000000000000000000000000000000000000000000", + "1237546895+54+4554985416849484213464984765465464654564565645645646546456546546" + }; + const std::size_t NumCases = sizeof(TestCases)/sizeof(TestCases[0]); + for (std::size_t i=0; i < NumCases; ++i) + test(TestCases[i].data(), TestCases[i].length()); + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/is_pointer_in_range.pass.cpp b/libcxx/test/libcxx-03/utilities/is_pointer_in_range.pass.cpp new file mode 100644 index 000000000000..6c60147adfdf --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/is_pointer_in_range.pass.cpp @@ -0,0 +1,56 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <__cxx03/__utility/is_pointer_in_range.h> +#include <cassert> + +#include "test_macros.h" + +template <class T, class U> +TEST_CONSTEXPR_CXX14 void test_cv_quals() { + T i = 0; + U j = 0; + assert(!std::__is_pointer_in_range(&i, &i, &i)); + assert(std::__is_pointer_in_range(&i, &i + 1, &i)); + assert(!std::__is_pointer_in_range(&i, &i + 1, &j)); + +#if TEST_STD_VER >= 20 + { + T* arr1 = new int[4]{1, 2, 3, 4}; + U* arr2 = new int[4]{5, 6, 7, 8}; + + assert(!std::__is_pointer_in_range(arr1, arr1 + 4, arr2)); + assert(std::__is_pointer_in_range(arr1, arr1 + 4, arr1 + 3)); + assert(!std::__is_pointer_in_range(arr1, arr1, arr1 + 3)); + + delete[] arr1; + delete[] arr2; + } +#endif +} + +TEST_CONSTEXPR_CXX14 bool test() { + test_cv_quals<int, int>(); + test_cv_quals<const int, int>(); + test_cv_quals<int, const int>(); + test_cv_quals<const int, const int>(); + test_cv_quals<volatile int, int>(); + test_cv_quals<int, volatile int>(); + test_cv_quals<volatile int, volatile int>(); + + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER >= 14 + static_assert(test(), ""); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/is_valid_range.pass.cpp b/libcxx/test/libcxx-03/utilities/is_valid_range.pass.cpp new file mode 100644 index 000000000000..9ad1e89f9818 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/is_valid_range.pass.cpp @@ -0,0 +1,68 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <__cxx03/__utility/is_valid_range.h> +#include <cassert> + +#include "test_macros.h" + +template <class T, class TQualified> +TEST_CONSTEXPR_CXX14 void check_type() { + { + // We need to ensure that the addresses of i and j are ordered as &i < &j for + // the test below to work portably, so we define them in a struct. + struct { + T i = 0; + T j = 0; + } storage; + assert(std::__is_valid_range(static_cast<TQualified*>(&storage.i), static_cast<TQualified*>(&storage.i))); + assert(std::__is_valid_range(static_cast<TQualified*>(&storage.i), static_cast<TQualified*>(&storage.i + 1))); + + assert(!std::__is_valid_range(static_cast<TQualified*>(&storage.j), static_cast<TQualified*>(&storage.i))); + assert(!std::__is_valid_range(static_cast<TQualified*>(&storage.i + 1), static_cast<TQualified*>(&storage.i))); + + // We detect this as being a valid range even though it is not really valid. + assert(std::__is_valid_range(static_cast<TQualified*>(&storage.i), static_cast<TQualified*>(&storage.j))); + } + + { + T arr[3] = {1, 2, 3}; + assert(std::__is_valid_range(static_cast<TQualified*>(&arr[0]), static_cast<TQualified*>(&arr[0]))); + assert(std::__is_valid_range(static_cast<TQualified*>(&arr[0]), static_cast<TQualified*>(&arr[1]))); + assert(std::__is_valid_range(static_cast<TQualified*>(&arr[0]), static_cast<TQualified*>(&arr[2]))); + + assert(!std::__is_valid_range(static_cast<TQualified*>(&arr[1]), static_cast<TQualified*>(&arr[0]))); + assert(!std::__is_valid_range(static_cast<TQualified*>(&arr[2]), static_cast<TQualified*>(&arr[0]))); + } + +#if TEST_STD_VER >= 20 + { + T* arr = new int[4]{1, 2, 3, 4}; + assert(std::__is_valid_range(static_cast<TQualified*>(arr), static_cast<TQualified*>(arr + 4))); + delete[] arr; + } +#endif +} + +TEST_CONSTEXPR_CXX14 bool test() { + check_type<int, int>(); + check_type<int, int const>(); + check_type<int, int volatile>(); + check_type<int, int const volatile>(); + + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER >= 14 + static_assert(test(), ""); +#endif + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address.pass.cpp b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address.pass.cpp new file mode 100644 index 000000000000..60ef98ae905d --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address.pass.cpp @@ -0,0 +1,159 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// template <class T> constexpr T* __to_address(T* p) noexcept; +// template <class Ptr> constexpr auto __to_address(const Ptr& p) noexcept; + +#include <memory> +#include <cassert> +#include <utility> + +#include "test_macros.h" + +struct Irrelevant; + +struct P1 { + using element_type = Irrelevant; + TEST_CONSTEXPR explicit P1(int *p) : p_(p) { } + TEST_CONSTEXPR int *operator->() const { return p_; } + int *p_; +}; + +struct P2 { + using element_type = Irrelevant; + TEST_CONSTEXPR explicit P2(int *p) : p_(p) { } + TEST_CONSTEXPR P1 operator->() const { return p_; } + P1 p_; +}; + +struct P3 { + TEST_CONSTEXPR explicit P3(int *p) : p_(p) { } + int *p_; +}; + +template<> +struct std::pointer_traits<P3> { + static TEST_CONSTEXPR int *to_address(const P3& p) { return p.p_; } +}; + +struct P4 { + TEST_CONSTEXPR explicit P4(int *p) : p_(p) { } + int *operator->() const; // should never be called + int *p_; +}; + +template<> +struct std::pointer_traits<P4> { + static TEST_CONSTEXPR int *to_address(const P4& p) { return p.p_; } +}; + +struct P5 { + using element_type = Irrelevant; + int const* const& operator->() const; +}; + +struct P6 {}; + +template<> +struct std::pointer_traits<P6> { + static int const* const& to_address(const P6&); +}; + +// Taken from a build breakage caused in Clang +namespace P7 { + template<typename T> struct CanProxy; + template<typename T> + struct CanQual { + CanProxy<T> operator->() const { return CanProxy<T>(); } + }; + template<typename T> + struct CanProxy { + const CanProxy<T> *operator->() const { return nullptr; } + }; +} // namespace P7 + +namespace P8 { + template<class T> + struct FancyPtrA { + using element_type = Irrelevant; + T *p_; + TEST_CONSTEXPR FancyPtrA(T *p) : p_(p) {} + T& operator*() const; + TEST_CONSTEXPR T *operator->() const { return p_; } + }; + template<class T> + struct FancyPtrB { + T *p_; + TEST_CONSTEXPR FancyPtrB(T *p) : p_(p) {} + T& operator*() const; + }; +} // namespace P8 + +template<class T> +struct std::pointer_traits<P8::FancyPtrB<T> > { + static TEST_CONSTEXPR T *to_address(const P8::FancyPtrB<T>& p) { return p.p_; } +}; + +struct Incomplete; +template<class T> struct Holder { T t; }; + + +TEST_CONSTEXPR_CXX14 bool test() { + int i = 0; + ASSERT_NOEXCEPT(std::__to_address(&i)); + assert(std::__to_address(&i) == &i); + P1 p1(&i); + ASSERT_NOEXCEPT(std::__to_address(p1)); + assert(std::__to_address(p1) == &i); + P2 p2(&i); + ASSERT_NOEXCEPT(std::__to_address(p2)); + assert(std::__to_address(p2) == &i); + P3 p3(&i); + ASSERT_NOEXCEPT(std::__to_address(p3)); + assert(std::__to_address(p3) == &i); + P4 p4(&i); + ASSERT_NOEXCEPT(std::__to_address(p4)); + assert(std::__to_address(p4) == &i); + + ASSERT_SAME_TYPE(decltype(std::__to_address(std::declval<int const*>())), int const*); + ASSERT_SAME_TYPE(decltype(std::__to_address(std::declval<P5>())), int const*); + ASSERT_SAME_TYPE(decltype(std::__to_address(std::declval<P6>())), int const*); + + P7::CanQual<int>* p7 = nullptr; + assert(std::__to_address(p7) == nullptr); + ASSERT_SAME_TYPE(decltype(std::__to_address(p7)), P7::CanQual<int>*); + + Holder<Incomplete> *p8_nil = nullptr; // for C++03 compatibility + P8::FancyPtrA<Holder<Incomplete> > p8a = p8_nil; + assert(std::__to_address(p8a) == p8_nil); + ASSERT_SAME_TYPE(decltype(std::__to_address(p8a)), decltype(p8_nil)); + + P8::FancyPtrB<Holder<Incomplete> > p8b = p8_nil; + assert(std::__to_address(p8b) == p8_nil); + ASSERT_SAME_TYPE(decltype(std::__to_address(p8b)), decltype(p8_nil)); + + int p9[2] = {}; + assert(std::__to_address(p9) == p9); + ASSERT_SAME_TYPE(decltype(std::__to_address(p9)), int*); + + const int p10[2] = {}; + assert(std::__to_address(p10) == p10); + ASSERT_SAME_TYPE(decltype(std::__to_address(p10)), const int*); + + return true; +} + +int main(int, char**) { + test(); +#if TEST_STD_VER >= 14 + static_assert(test(), ""); +#endif + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_on_funcptr.verify.cpp b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_on_funcptr.verify.cpp new file mode 100644 index 000000000000..02b1676055e7 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_on_funcptr.verify.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// template <class T> constexpr T* __to_address(T* p) noexcept; +// Mandates: T is not a function type. + +#include <memory> + +int (*pf)(); + +void test() { + (void)std::__to_address(pf); // expected-error@*:* {{is a function type}} +} diff --git a/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_on_function.verify.cpp b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_on_function.verify.cpp new file mode 100644 index 000000000000..b8825a181d37 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_on_function.verify.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// template <class T> constexpr T* __to_address(T* p) noexcept; +// Mandates: T is not a function type. + +#include <memory> + +int f(); + +void test() { + (void)std::__to_address(f); // expected-error@*:* {{is a function type}} +} diff --git a/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp new file mode 100644 index 000000000000..5eed12d19c07 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp @@ -0,0 +1,56 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <memory> + +// template <class T> constexpr T* __to_address(T* p) noexcept; +// template <class Ptr> constexpr auto __to_address(const Ptr& p) noexcept; + +#include <memory> + +#include <array> +#include <cassert> +#include <span> +#include <string> +#include <string_view> +#include <valarray> +#include <vector> +#include "test_macros.h" + +template<class C> +void test_container_iterators(C c) +{ + const C& cc = c; + assert(std::__to_address(c.begin()) == c.data()); + assert(std::__to_address(c.end()) == c.data() + c.size()); + assert(std::__to_address(cc.begin()) == cc.data()); + assert(std::__to_address(cc.end()) == cc.data() + cc.size()); +} + +void test_valarray_iterators() +{ + std::valarray<int> v(100); + int *p = std::__to_address(std::begin(v)); + int *q = std::__to_address(std::end(v)); + assert(q - p == 100); +} + +int main(int, char**) { + test_container_iterators(std::array<int, 3>()); + test_container_iterators(std::vector<int>(3)); + test_container_iterators(std::string("abc")); +#if TEST_STD_VER >= 17 + test_container_iterators(std::string_view("abc")); +#endif +#if TEST_STD_VER >= 20 + test_container_iterators(std::span<const char>("abc")); +#endif + test_valarray_iterators(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp b/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp new file mode 100644 index 000000000000..093bbae28972 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp @@ -0,0 +1,190 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +// __is_referenceable_v<Tp> +// +// [defns.referenceable] defines "a referenceable type" as: +// An object type, a function type that does not have cv-qualifiers +// or a ref-qualifier, or a reference type. +// + +#include <type_traits> +#include <cassert> + +#include "test_macros.h" + +struct Foo {}; + +static_assert((!std::__libcpp_is_referenceable<void>::value), ""); +static_assert((std::__libcpp_is_referenceable<int>::value), ""); +static_assert((std::__libcpp_is_referenceable<int[3]>::value), ""); +static_assert((std::__libcpp_is_referenceable<int[]>::value), ""); +static_assert((std::__libcpp_is_referenceable<int&>::value), ""); +static_assert((std::__libcpp_is_referenceable<const int&>::value), ""); +static_assert((std::__libcpp_is_referenceable<int*>::value), ""); +static_assert((std::__libcpp_is_referenceable<const int*>::value), ""); +static_assert((std::__libcpp_is_referenceable<Foo>::value), ""); +static_assert((std::__libcpp_is_referenceable<const Foo>::value), ""); +static_assert((std::__libcpp_is_referenceable<Foo&>::value), ""); +static_assert((std::__libcpp_is_referenceable<const Foo&>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<Foo&&>::value), ""); +static_assert((std::__libcpp_is_referenceable<const Foo&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<int __attribute__((__vector_size__(8)))>::value), ""); +static_assert((std::__libcpp_is_referenceable<const int __attribute__((__vector_size__(8)))>::value), ""); +static_assert((std::__libcpp_is_referenceable<float __attribute__((__vector_size__(16)))>::value), ""); +static_assert((std::__libcpp_is_referenceable<const float __attribute__((__vector_size__(16)))>::value), ""); + +// Functions without cv-qualifiers are referenceable +static_assert((std::__libcpp_is_referenceable<void()>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((!std::__libcpp_is_referenceable<void() const>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void() &>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void() const&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void() &&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void() const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void(int)>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((!std::__libcpp_is_referenceable<void(int) const>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int) &>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int) const&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int) &&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void(int, float)>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((!std::__libcpp_is_referenceable<void(int, float) const>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float) &>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float) const&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float) &&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void(int, float, Foo&)>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&) const>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&) &>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&) const&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&) &&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void(...)>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((!std::__libcpp_is_referenceable<void(...) const>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(...) &>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(...) const&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(...) &&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(...) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void(int, ...)>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((!std::__libcpp_is_referenceable<void(int, ...) const>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, ...) &>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, ...) const&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, ...) &&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, ...) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void(int, float, ...)>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((!std::__libcpp_is_referenceable<void(int, float, ...) const>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, ...) &>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, ...) const&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, ...) &&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, ...) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void(int, float, Foo&, ...)>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&, ...) const>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&, ...) &>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&, ...) const&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&, ...) &&>::value), ""); +static_assert((!std::__libcpp_is_referenceable<void(int, float, Foo&, ...) const&&>::value), ""); +#endif + +// member functions with or without cv-qualifiers are referenceable +static_assert((std::__libcpp_is_referenceable<void (Foo::*)()>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)() const>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<void (Foo::*)() &>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)() const&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)() &&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)() const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int)>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int) const>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int) &>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int) const&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int) &&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float)>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float) const>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float) &>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float) const&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float) &&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&)>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&) const>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&) &>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&) const&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&) &&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(...)>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(...) const>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(...) &>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(...) const&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(...) &&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(...) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, ...)>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, ...) const>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, ...) &>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, ...) const&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, ...) &&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, ...) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, ...)>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, ...) const>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, ...) &>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, ...) const&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, ...) &&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, ...) const&&>::value), ""); +#endif + +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&, ...)>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&, ...) const>::value), ""); +#if TEST_STD_VER >= 11 +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&, ...) &>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&, ...) const&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&, ...) &&>::value), ""); +static_assert((std::__libcpp_is_referenceable<void (Foo::*)(int, float, Foo&, ...) const&&>::value), ""); +#endif diff --git a/libcxx/test/libcxx-03/utilities/meta/meta_base.pass.cpp b/libcxx/test/libcxx-03/utilities/meta/meta_base.pass.cpp new file mode 100644 index 000000000000..f6bddedc96ac --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/meta/meta_base.pass.cpp @@ -0,0 +1,90 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// + +#include "test_macros.h" + +TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header") +#include <__cxx03/__type_traits/conjunction.h> +#include <__cxx03/__type_traits/disjunction.h> +#include <__cxx03/__type_traits/is_valid_expansion.h> +#include <__cxx03/__type_traits/negation.h> +#include <cassert> +#include <type_traits> +#include <utility> + +struct Bomb; +template <int N, class T = Bomb > +struct BOOM { + using Explode = typename T::BOOMBOOM; +}; + +using True = std::true_type; +using False = std::false_type; + +void test_if() { + ASSERT_SAME_TYPE(std::_If<true, int, long>, int); + ASSERT_SAME_TYPE(std::_If<false, int, long>, long); +} + +void test_and() { + static_assert(std::_And<True>::value, ""); + static_assert(!std::_And<False>::value, ""); + static_assert(std::_And<True, True>::value, ""); + static_assert(!std::_And<False, BOOM<1> >::value, ""); + static_assert(!std::_And<True, True, True, False, BOOM<2> >::value, ""); +} + +void test_or() { + static_assert(std::_Or<True>::value, ""); + static_assert(!std::_Or<False>::value, ""); + static_assert(std::_Or<False, True>::value, ""); + static_assert(std::_Or<True, std::_Not<BOOM<3> > >::value, ""); + static_assert(!std::_Or<False, False>::value, ""); + static_assert(std::_Or<True, BOOM<1> >::value, ""); + static_assert(std::_Or<False, False, False, False, True, BOOM<2> >::value, ""); +} + +void test_combined() { + static_assert(std::_And<True, std::_Or<False, True, BOOM<4> > >::value, ""); + static_assert(std::_And<True, std::_Or<False, True, BOOM<4> > >::value, ""); + static_assert(std::_Not<std::_And<True, False, BOOM<5> > >::value, ""); +} + +struct MemberTest { + static int foo; + using type = long; + + void func(int); +}; +struct Empty {}; +struct MemberTest2 { + using foo = int; +}; +template <class T> +using HasFooData = decltype(T::foo); +template <class T> +using HasFooType = typename T::foo; + +template <class T, class U> +using FuncCallable = decltype(std::declval<T>().func(std::declval<U>())); +template <class T> +using BadCheck = typename T::DOES_NOT_EXIST; + +void test_is_valid_trait() { + static_assert(std::_IsValidExpansion<HasFooData, MemberTest>::value, ""); + static_assert(!std::_IsValidExpansion<HasFooType, MemberTest>::value, ""); + static_assert(!std::_IsValidExpansion<HasFooData, MemberTest2>::value, ""); + static_assert(std::_IsValidExpansion<HasFooType, MemberTest2>::value, ""); + static_assert(std::_IsValidExpansion<FuncCallable, MemberTest, int>::value, ""); + static_assert(!std::_IsValidExpansion<FuncCallable, MemberTest, void*>::value, ""); +} + +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp b/libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp new file mode 100644 index 000000000000..561654d7f31f --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/no_destroy.pass.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <__cxx03/__utility/no_destroy.h> +#include <cassert> + +#include "test_macros.h" + +#if TEST_STD_VER > 17 +// Test constexpr-constructibility. +constinit std::__no_destroy<int> nd_int_const(std::__uninitialized_tag{}); +#endif + +struct DestroyLast { + ~DestroyLast() { assert(*ptr == 5); } + + int* ptr; +} last; + +static std::__no_destroy<int> nd_int(5); + +int main(int, char**) { + last.ptr = &nd_int.__get(); + + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.non_trivial_copy_move.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.non_trivial_copy_move.pass.cpp new file mode 100644 index 000000000000..1f5dae1232e3 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.non_trivial_copy_move.pass.cpp @@ -0,0 +1,154 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// The test suite needs to define the ABI macros on the command line when +// modules are enabled. +// UNSUPPORTED: clang-modules-build + +// <utility> + +// template <class T1, class T2> struct pair + +// Test that we provide the non-trivial copy operations when _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR +// is specified. +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR +// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -Wno-invalid-offsetof + +#include <utility> +#include <type_traits> +#include <cstdlib> +#include <cstddef> +#include <cassert> + +#include "test_macros.h" + +template <class T> +struct HasNonTrivialABI : std::integral_constant<bool, + !std::is_trivially_destructible<T>::value + || (std::is_copy_constructible<T>::value && !std::is_trivially_copy_constructible<T>::value) +#if TEST_STD_VER >= 11 + || (std::is_move_constructible<T>::value && !std::is_trivially_move_constructible<T>::value) +#endif +> {}; + +#if TEST_STD_VER >= 11 +struct NonTrivialDtor { + NonTrivialDtor(NonTrivialDtor const&) = default; + ~NonTrivialDtor(); +}; +NonTrivialDtor::~NonTrivialDtor() {} +static_assert(HasNonTrivialABI<NonTrivialDtor>::value, ""); + +struct NonTrivialCopy { + NonTrivialCopy(NonTrivialCopy const&); +}; +NonTrivialCopy::NonTrivialCopy(NonTrivialCopy const&) {} +static_assert(HasNonTrivialABI<NonTrivialCopy>::value, ""); + +struct NonTrivialMove { + NonTrivialMove(NonTrivialMove const&) = default; + NonTrivialMove(NonTrivialMove&&); +}; +NonTrivialMove::NonTrivialMove(NonTrivialMove&&) {} +static_assert(HasNonTrivialABI<NonTrivialMove>::value, ""); + +struct DeletedCopy { + DeletedCopy(DeletedCopy const&) = delete; + DeletedCopy(DeletedCopy&&) = default; +}; +static_assert(!HasNonTrivialABI<DeletedCopy>::value, ""); + +struct TrivialMove { + TrivialMove(TrivialMove &&) = default; +}; +static_assert(!HasNonTrivialABI<TrivialMove>::value, ""); + +struct Trivial { + Trivial(Trivial const&) = default; +}; +static_assert(!HasNonTrivialABI<Trivial>::value, ""); +#endif + + +void test_trivial() +{ + { + typedef std::pair<int, short> P; + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(HasNonTrivialABI<P>::value, ""); + } +#if TEST_STD_VER >= 11 + { + typedef std::pair<int, short> P; + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(HasNonTrivialABI<P>::value, ""); + } + { + using P = std::pair<NonTrivialDtor, int>; + static_assert(!std::is_trivially_destructible<P>::value, ""); + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasNonTrivialABI<P>::value, ""); + } + { + using P = std::pair<NonTrivialCopy, int>; + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasNonTrivialABI<P>::value, ""); + } + { + using P = std::pair<NonTrivialMove, int>; + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasNonTrivialABI<P>::value, ""); + } + { + using P = std::pair<DeletedCopy, int>; + static_assert(!std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasNonTrivialABI<P>::value, ""); + } + { + using P = std::pair<Trivial, int>; + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasNonTrivialABI<P>::value, ""); + } + { + using P = std::pair<TrivialMove, int>; + static_assert(!std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasNonTrivialABI<P>::value, ""); + } +#endif +} + +void test_layout() { + typedef std::pair<std::pair<char, char>, char> PairT; + static_assert(sizeof(PairT) == 3, ""); + static_assert(TEST_ALIGNOF(PairT) == TEST_ALIGNOF(char), ""); + static_assert(offsetof(PairT, first) == 0, ""); +} + +int main(int, char**) { + test_trivial(); + test_layout(); + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp new file mode 100644 index 000000000000..3ec60c08b8ea --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivial_copy_move.pass.cpp @@ -0,0 +1,182 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <utility> + +// template <class T1, class T2> struct pair + +// Test that we properly provide the trivial copy operations by default. + +// FreeBSD still provides the old ABI for std::pair. +// XFAIL: freebsd +// ADDITIONAL_COMPILE_FLAGS: -Wno-invalid-offsetof + +#include <utility> +#include <type_traits> +#include <cstdlib> +#include <cstddef> +#include <cassert> + +#include "test_macros.h" + +template <class T> +struct HasTrivialABI : std::integral_constant<bool, + std::is_trivially_destructible<T>::value + && (!std::is_copy_constructible<T>::value || std::is_trivially_copy_constructible<T>::value) +#if TEST_STD_VER >= 11 + && (!std::is_move_constructible<T>::value || std::is_trivially_move_constructible<T>::value) +#endif +> {}; + +#if TEST_STD_VER >= 11 +struct NonTrivialDtor { + NonTrivialDtor(NonTrivialDtor const&) = default; + ~NonTrivialDtor(); +}; +NonTrivialDtor::~NonTrivialDtor() {} +static_assert(!HasTrivialABI<NonTrivialDtor>::value, ""); + +struct NonTrivialCopy { + NonTrivialCopy(NonTrivialCopy const&); +}; +NonTrivialCopy::NonTrivialCopy(NonTrivialCopy const&) {} +static_assert(!HasTrivialABI<NonTrivialCopy>::value, ""); + +struct NonTrivialMove { + NonTrivialMove(NonTrivialMove const&) = default; + NonTrivialMove(NonTrivialMove&&); +}; +NonTrivialMove::NonTrivialMove(NonTrivialMove&&) {} +static_assert(!HasTrivialABI<NonTrivialMove>::value, ""); + +struct DeletedCopy { + DeletedCopy(DeletedCopy const&) = delete; + DeletedCopy(DeletedCopy&&) = default; +}; +static_assert(HasTrivialABI<DeletedCopy>::value, ""); + +struct TrivialMove { + TrivialMove(TrivialMove &&) = default; +}; +static_assert(HasTrivialABI<TrivialMove>::value, ""); + +struct Trivial { + Trivial(Trivial const&) = default; +}; +static_assert(HasTrivialABI<Trivial>::value, ""); +#endif + +struct TrivialNoAssignment { + int arr[4]; + TrivialNoAssignment& operator=(const TrivialNoAssignment&) = delete; +}; + +struct TrivialNoConstruction { + int arr[4]; + TrivialNoConstruction() = default; + TrivialNoConstruction(const TrivialNoConstruction&) = delete; + TrivialNoConstruction& operator=(const TrivialNoConstruction&) = default; +}; + +void test_trivial() +{ + { + typedef std::pair<int, short> P; + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(HasTrivialABI<P>::value, ""); + } +#if TEST_STD_VER >= 11 + { + typedef std::pair<int, short> P; + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(HasTrivialABI<P>::value, ""); + } + { + using P = std::pair<NonTrivialDtor, int>; + static_assert(!std::is_trivially_destructible<P>::value, ""); + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(!HasTrivialABI<P>::value, ""); + } + { + using P = std::pair<NonTrivialCopy, int>; + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(!HasTrivialABI<P>::value, ""); + } + { + using P = std::pair<NonTrivialMove, int>; + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); + static_assert(!HasTrivialABI<P>::value, ""); + } + { + using P = std::pair<DeletedCopy, int>; + static_assert(!std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasTrivialABI<P>::value, ""); + } + { + using P = std::pair<Trivial, int>; + static_assert(std::is_copy_constructible<P>::value, ""); + static_assert(std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasTrivialABI<P>::value, ""); + } + { + using P = std::pair<TrivialMove, int>; + static_assert(!std::is_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_move_constructible<P>::value, ""); + static_assert(std::is_trivially_move_constructible<P>::value, ""); + static_assert(HasTrivialABI<P>::value, ""); + } +#endif + { + using P = std::pair<TrivialNoAssignment, int>; + static_assert(std::is_trivially_copy_constructible<P>::value, ""); + static_assert(std::is_trivially_move_constructible<P>::value, ""); +#if TEST_STD_VER >= 11 // This is https://llvm.org/PR90605 + static_assert(!std::is_trivially_copy_assignable<P>::value, ""); + static_assert(!std::is_trivially_move_assignable<P>::value, ""); +#endif // TEST_STD_VER >= 11 + static_assert(std::is_trivially_destructible<P>::value, ""); + } + { + using P = std::pair<TrivialNoConstruction, int>; +#if TEST_STD_VER >= 11 + static_assert(!std::is_trivially_copy_constructible<P>::value, ""); + static_assert(!std::is_trivially_move_constructible<P>::value, ""); +#endif // TEST_STD_VER >= 11 + static_assert(!std::is_trivially_copy_assignable<P>::value, ""); + static_assert(!std::is_trivially_move_assignable<P>::value, ""); + static_assert(std::is_trivially_destructible<P>::value, ""); + } +} + +void test_layout() { + typedef std::pair<std::pair<char, char>, char> PairT; + static_assert(sizeof(PairT) == 3, ""); + static_assert(TEST_ALIGNOF(PairT) == TEST_ALIGNOF(char), ""); + static_assert(offsetof(PairT, first) == 0, ""); +} + +int main(int, char**) { + test_trivial(); + test_layout(); + return 0; +} diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivially_copyable.compile.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivially_copyable.compile.pass.cpp new file mode 100644 index 000000000000..1132b3e5def1 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/abi.trivially_copyable.compile.pass.cpp @@ -0,0 +1,68 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// +// This test pins down the ABI of std::pair with respect to being "trivially copyable". +// + +// This test doesn't work when the deprecated ABI to turn off pair triviality is enabled. +// See libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/abi.non_trivial_copy_move.pass.cpp instead. +// UNSUPPORTED: libcpp-deprecated-abi-disable-pair-trivial-copy-ctor + +#include <type_traits> +#include <utility> + +#include "test_macros.h" + +struct trivially_copyable { + int arr[4]; +}; + +struct trivially_copyable_no_copy_assignment { + int arr[4]; + trivially_copyable_no_copy_assignment& operator=(const trivially_copyable_no_copy_assignment&) = delete; +}; +static_assert(std::is_trivially_copyable<trivially_copyable_no_copy_assignment>::value, ""); + +struct trivially_copyable_no_move_assignment { + int arr[4]; + trivially_copyable_no_move_assignment& operator=(const trivially_copyable_no_move_assignment&) = delete; +}; +static_assert(std::is_trivially_copyable<trivially_copyable_no_move_assignment>::value, ""); + +struct trivially_copyable_no_construction { + int arr[4]; + trivially_copyable_no_construction() = default; + trivially_copyable_no_construction(const trivially_copyable_no_construction&) = delete; + trivially_copyable_no_construction& operator=(const trivially_copyable_no_construction&) = default; +}; +static_assert(std::is_trivially_copyable<trivially_copyable_no_construction>::value, ""); + +static_assert(!std::is_trivially_copyable<std::pair<int&, int> >::value, ""); +static_assert(!std::is_trivially_copyable<std::pair<int, int&> >::value, ""); +static_assert(!std::is_trivially_copyable<std::pair<int&, int&> >::value, ""); + +static_assert(!std::is_trivially_copyable<std::pair<int, int> >::value, ""); +static_assert(!std::is_trivially_copyable<std::pair<int, char> >::value, ""); +static_assert(!std::is_trivially_copyable<std::pair<char, int> >::value, ""); +static_assert(!std::is_trivially_copyable<std::pair<std::pair<char, char>, int> >::value, ""); +static_assert(!std::is_trivially_copyable<std::pair<trivially_copyable, int> >::value, ""); +#if TEST_STD_VER == 03 // Known ABI difference +static_assert(!std::is_trivially_copyable<std::pair<trivially_copyable_no_copy_assignment, int> >::value, ""); +static_assert(!std::is_trivially_copyable<std::pair<trivially_copyable_no_move_assignment, int> >::value, ""); +#else +static_assert(std::is_trivially_copyable<std::pair<trivially_copyable_no_copy_assignment, int> >::value, ""); +static_assert(std::is_trivially_copyable<std::pair<trivially_copyable_no_move_assignment, int> >::value, ""); +#endif +static_assert(!std::is_trivially_copyable<std::pair<trivially_copyable_no_construction, int> >::value, ""); + +static_assert(std::is_trivially_copy_constructible<std::pair<int, int> >::value, ""); +static_assert(std::is_trivially_move_constructible<std::pair<int, int> >::value, ""); +static_assert(!std::is_trivially_copy_assignable<std::pair<int, int> >::value, ""); +static_assert(!std::is_trivially_move_assignable<std::pair<int, int> >::value, ""); +static_assert(std::is_trivially_destructible<std::pair<int, int> >::value, ""); diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp new file mode 100644 index 000000000000..16ee000cd90f --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Check that instantiating pair doesn't look up type traits "too early", before +// the contained types have been completed. +// +// This is a regression test, to prevent a reoccurrance of the issue introduced +// in 5e1de27f680591a870d78e9952b23f76aed7f456. + +#include <utility> +#include <vector> + +struct Test { + std::vector<std::pair<int, Test> > v; +}; + +std::pair<int, Test> p; diff --git a/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/pair.tuple_element.verify.cpp b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/pair.tuple_element.verify.cpp new file mode 100644 index 000000000000..7d10d8b23cee --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/pair.tuple_element.verify.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// <utility> + +// template <class T1, class T2> struct pair + +// tuple_element<I, pair<T1, T2> >::type + +#include <utility> + +void f() { + typedef std::pair<int, double> P; + std::tuple_element<2, P>::type foo; // expected-note {{requested here}} + // expected-error-re@*:* {{static assertion failed{{( due to requirement '2U[L]{0,2} < 2')?}}{{.*}}Index out of bounds in std::tuple_element<std::pair<T1, T2>>}} +} diff --git a/libcxx/test/libcxx-03/utilities/utility/private_constructor_tag.compile.pass.cpp b/libcxx/test/libcxx-03/utilities/utility/private_constructor_tag.compile.pass.cpp new file mode 100644 index 000000000000..a186098eeb29 --- /dev/null +++ b/libcxx/test/libcxx-03/utilities/utility/private_constructor_tag.compile.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// struct __private_constructor_tag{}; + +// The private constructor tag is intended to be a trivial type that can easily +// be used to mark a constructor exposition-only. +// +// Tests whether the type is trivial. + +#include <__cxx03/__utility/private_constructor_tag.h> +#include <type_traits> + +static_assert(std::is_trivially_copyable<std::__private_constructor_tag>::value, ""); +static_assert(std::is_trivially_default_constructible<std::__private_constructor_tag>::value, ""); diff --git a/libcxx/test/libcxx-03/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp b/libcxx/test/libcxx-03/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp new file mode 100644 index 000000000000..118e4e687e11 --- /dev/null +++ b/libcxx/test/libcxx-03/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: stdlib=apple-libc++ + +// Test that using -pedantic-errors doesn't turn off availability annotations. +// This used to be the case because we used __has_extension(...) to enable the +// availability annotations, and -pedantic-errors changes the behavior of +// __has_extension(...) in an incompatible way. + +// ADDITIONAL_COMPILE_FLAGS: -pedantic-errors + +#include <__config> + +#if !_LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS +# error Availability annotations should be enabled on Apple platforms in the system configuration! +#endif diff --git a/libcxx/test/libcxx-03/vendor/apple/disable-availability.sh.cpp b/libcxx/test/libcxx-03/vendor/apple/disable-availability.sh.cpp new file mode 100644 index 000000000000..f44b49b1ddfb --- /dev/null +++ b/libcxx/test/libcxx-03/vendor/apple/disable-availability.sh.cpp @@ -0,0 +1,49 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: stdlib=apple-libc++ + +// This test is dependent on the code generated by the compiler, and it doesn't +// work properly with older AppleClangs. +// UNSUPPORTED: apple-clang-15 + +// This test ensures that we retain a way to disable availability markup on Apple platforms +// in order to work around Clang bug https://llvm.org/PR134151. +// +// Once that bug has been fixed or once we've made changes to libc++'s use of availability +// that render that workaround unnecessary, the macro and this test can be removed. +// +// The test works by creating a final linked image that refers to a function marked with +// both an availability attribute and with _LIBCPP_HIDE_FROM_ABI. We then check that this +// generates a weak reference to the function -- without the bug, we'd expect a strong +// reference or no reference at all instead. + +// First, test the test. Make sure that we do (incorrectly) produce a weak definition when we +// don't define _LIBCPP_DISABLE_AVAILABILITY. Otherwise, something may have changed in libc++ +// and this test might not work anymore. +// RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -fvisibility=hidden -fvisibility-inlines-hidden -shared -o %t.1.dylib +// RUN: nm -m %t.1.dylib | c++filt | grep value > %t.1.symbols +// RUN: grep weak %t.1.symbols + +// Now, make sure that 'weak' goes away when we define _LIBCPP_DISABLE_AVAILABILITY. +// In fact, all references to the function might go away, so we just check that we don't emit +// any weak reference. +// RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -fvisibility=hidden -fvisibility-inlines-hidden -D_LIBCPP_DISABLE_AVAILABILITY -shared -o %t.2.dylib +// RUN: nm -m %t.2.dylib | c++filt | grep value > %t.2.symbols +// RUN: not grep weak %t.2.symbols + +#include <version> + +template <class T> +struct optional { + T val_; + _LIBCPP_HIDE_FROM_ABI _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE T value() const { return val_; } +}; + +using PMF = int (optional<int>::*)() const; +PMF f() { return &optional<int>::value; } diff --git a/libcxx/test/libcxx-03/vendor/apple/system-install-properties.sh.cpp b/libcxx/test/libcxx-03/vendor/apple/system-install-properties.sh.cpp new file mode 100644 index 000000000000..eeae4fc0a3c0 --- /dev/null +++ b/libcxx/test/libcxx-03/vendor/apple/system-install-properties.sh.cpp @@ -0,0 +1,46 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: stdlib=apple-libc++ + +// This file checks various properties of the installation of libc++ when built as +// a system library on Apple platforms. + +// Make sure we install the libc++ headers in the right location. +// +// RUN: stat "%{include-dir}/__config" + +// Make sure we install libc++.1.dylib and libc++experimental.a in the right location. +// +// RUN: stat "%{lib-dir}/libc++.1.dylib" +// RUN: stat "%{lib-dir}/libc++experimental.a" + +// Make sure we install a symlink from libc++.dylib to libc++.1.dylib. +// +// RUN: stat "%{lib-dir}/libc++.dylib" +// RUN: readlink "%{lib-dir}/libc++.dylib" | grep "libc++.1.dylib" + +// Make sure the install_name is /usr/lib. +// +// In particular, make sure we don't use any @rpath in the load commands. When building as +// a system library, it is important to hardcode the installation paths in the dylib, because +// various tools like dyld and ld64 will treat us specially if they recognize us as being a +// system library. +// +// RUN: otool -L "%{lib-dir}/libc++.1.dylib" | grep '/usr/lib/libc++.1.dylib' +// RUN: otool -l "%{lib-dir}/libc++.1.dylib" | grep -vE "LC_RPATH|@loader_path|@rpath" + +// Make sure the compatibility_version of libc++ is 1.0.0. +// Failure to respect this can result in applications not being able to find libc++ +// when they are loaded by dyld, if the compatibility version was bumped. +// +// RUN: otool -L "%{lib-dir}/libc++.1.dylib" | grep "libc++.1.dylib" | grep "compatibility version 1.0.0" + +// Make sure we use the libdispatch backend for the PSTL. +// +// RUN: grep "%{include-dir}/__config_site" -e '#define _LIBCPP_PSTL_BACKEND_LIBDISPATCH' diff --git a/libcxx/test/libcxx-03/vendor/clang-cl/static-lib-exports.sh.cpp b/libcxx/test/libcxx-03/vendor/clang-cl/static-lib-exports.sh.cpp new file mode 100644 index 000000000000..7ed14921b106 --- /dev/null +++ b/libcxx/test/libcxx-03/vendor/clang-cl/static-lib-exports.sh.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: msvc + +// This file checks that the built static libraries don't contain dllexport +// directives in clang-cl builds. + +// RUN: llvm-readobj --coff-directives "%{lib-dir}/libc++.lib" | not grep -i "export:" > /dev/null + +// RUN: llvm-readobj --coff-directives "%{lib-dir}/libc++experimental.lib" | not grep -i "export:" > /dev/null diff --git a/libcxx/test/libcxx-03/vendor/mingw/static-lib-exports.sh.cpp b/libcxx/test/libcxx-03/vendor/mingw/static-lib-exports.sh.cpp new file mode 100644 index 000000000000..e20269f91e48 --- /dev/null +++ b/libcxx/test/libcxx-03/vendor/mingw/static-lib-exports.sh.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: target={{.+}}-windows-gnu + +// This file checks that the built static libraries don't contain dllexport +// directives in MinGW builds. + +// RUN: llvm-readobj --coff-directives "%{lib-dir}/libc++.a" | not grep -i "export:" > /dev/null + +// RUN: llvm-readobj --coff-directives "%{lib-dir}/libc++experimental.a" | not grep -i "export:" > /dev/null diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp index 0c5ae84d9770..162a3539d230 100644 --- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp +++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp @@ -314,7 +314,7 @@ constexpr bool test() { test_copy_and_move<int*, const int*>(); // `memmove` does not support volatile pointers. - // (See also https://github.com/llvm/llvm-project/issues/28901). + // (See also https://llvm.org/PR28527). if (!std::is_constant_evaluated()) { test_both_directions<volatile int, int>(); test_both_directions<volatile int, volatile int>(); diff --git a/libcxx/test/libcxx/algorithms/bad_iterator_traits.verify.cpp b/libcxx/test/libcxx/algorithms/bad_iterator_traits.verify.cpp index a0b5b88bb9f0..63824171a25c 100644 --- a/libcxx/test/libcxx/algorithms/bad_iterator_traits.verify.cpp +++ b/libcxx/test/libcxx/algorithms/bad_iterator_traits.verify.cpp @@ -57,5 +57,5 @@ struct BadIter { // behavior when these iterators are passed to standard algorithms. void test() { std::sort(BadIter(), BadIter()); - //expected-error-re@*:* {{static assertion failed {{.*}}It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of dereferencing the iterator}} + //expected-error-re@*:* 2 {{static assertion failed {{.*}}It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of dereferencing the iterator}} } diff --git a/libcxx/test/libcxx/algorithms/callable-requirements-rvalue.compile.pass.cpp b/libcxx/test/libcxx/algorithms/callable-requirements-rvalue.compile.pass.cpp index 4a5535e71ab9..3fecad3ed647 100644 --- a/libcxx/test/libcxx/algorithms/callable-requirements-rvalue.compile.pass.cpp +++ b/libcxx/test/libcxx/algorithms/callable-requirements-rvalue.compile.pass.cpp @@ -14,8 +14,7 @@ // but not rvalue callable to algorithms. While it is technically ill-formed for users // to provide us such predicates, this test is useful for libc++ to ensure that we check // predicate requirements correctly (i.e. that we check them on lvalues and not on -// rvalues). See https://github.com/llvm/llvm-project/issues/69554 for additional -// context. +// rvalues). See https://llvm.org/PR69554 for additional context. #include <algorithm> diff --git a/libcxx/test/libcxx/algorithms/cpp17_iterator_concepts.verify.cpp b/libcxx/test/libcxx/algorithms/cpp17_iterator_concepts.verify.cpp index c4462b26f5c9..629a887c0f7e 100644 --- a/libcxx/test/libcxx/algorithms/cpp17_iterator_concepts.verify.cpp +++ b/libcxx/test/libcxx/algorithms/cpp17_iterator_concepts.verify.cpp @@ -99,10 +99,10 @@ void check_iterator_requirements() { // expected-note@*:* {{because 'not_move_assignable' does not satisfy '__cpp17_copy_assignable'}} static_assert(std::__cpp17_iterator<not_copy_assignable>); // expected-error {{static assertion failed}} - // expectted-note@*:* {{because 'not_copy_assignable' does not satisfy '__cpp17_copy_assignable'}} + // expected-note@*:* {{because 'not_copy_assignable' does not satisfy '__cpp17_copy_assignable'}} static_assert(std::__cpp17_iterator<diff_t_not_signed>); // expected-error {{static assertion failed}} - // expectted-note@*:* {{'is_signed_v<__iter_diff_t<diff_t_not_signed> >' evaluated to false}} + // expected-note-re@*:* {{because 'is_signed_v<__iter_diff_t<diff_t_not_signed>{{.*}}>' evaluated to false}} } struct not_equality_comparable : valid_iterator<not_equality_comparable> {}; diff --git a/libcxx/test/libcxx/algorithms/half_positive.pass.cpp b/libcxx/test/libcxx/algorithms/half_positive.pass.cpp index 88a18e859292..40f469741957 100644 --- a/libcxx/test/libcxx/algorithms/half_positive.pass.cpp +++ b/libcxx/test/libcxx/algorithms/half_positive.pass.cpp @@ -11,8 +11,6 @@ // __half_positive divides an integer number by 2 as unsigned number for known types. // It can be an important optimization for lower bound, for example. -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__algorithm/half_positive.h> #include <cassert> #include <cstddef> diff --git a/libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp b/libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp index 872c49a35dd7..109fc78507cc 100644 --- a/libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp +++ b/libcxx/test/libcxx/algorithms/vectorization.compile.pass.cpp @@ -9,8 +9,6 @@ // We don't know how to vectorize algorithms on GCC // XFAIL: gcc -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // We don't vectorize algorithms before C++14 // XFAIL: c++03, c++11 diff --git a/libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp b/libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp index 390c6b6db190..21e9003c30b7 100644 --- a/libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp +++ b/libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp @@ -12,8 +12,6 @@ // failures when back-deploying. // XFAIL: availability-verbose_abort-missing -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__verbose_abort> #include <cstdlib> diff --git a/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp b/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp index 803868b75779..0cc4b1e00522 100644 --- a/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp +++ b/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp @@ -9,8 +9,6 @@ // Test that the default verbose termination function aborts the program. // XFAIL: availability-verbose_abort-missing -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__verbose_abort> #include <csignal> #include <cstdlib> diff --git a/libcxx/test/libcxx/assertions/modes/none.pass.cpp b/libcxx/test/libcxx/assertions/modes/none.pass.cpp index b64290a31a12..8332848c1a8e 100644 --- a/libcxx/test/libcxx/assertions/modes/none.pass.cpp +++ b/libcxx/test/libcxx/assertions/modes/none.pass.cpp @@ -11,8 +11,6 @@ // REQUIRES: libcpp-hardening-mode=none -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__assert> #include <cassert> diff --git a/libcxx/test/libcxx/assertions/single_expression.pass.cpp b/libcxx/test/libcxx/assertions/single_expression.pass.cpp index 474edc9dc083..13253e4cb6ef 100644 --- a/libcxx/test/libcxx/assertions/single_expression.pass.cpp +++ b/libcxx/test/libcxx/assertions/single_expression.pass.cpp @@ -10,8 +10,6 @@ // This is useful so we can use them in places that require an expression, such as // in a constructor initializer list. -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__assert> #include <cassert> diff --git a/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp b/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp index 03eaa0e55ac6..da12de9eeb5d 100644 --- a/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp +++ b/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp @@ -15,9 +15,8 @@ // XFAIL: availability-synchronization_library-missing -// This is a regression test for https://github.com/llvm/llvm-project/issues/85107, which describes -// how we were using UL_COMPARE_AND_WAIT instead of UL_COMPARE_AND_WAIT64 in the implementation of -// atomic::wait, leading to potential infinite hangs. +// This is a regression test for https://llvm.org/PR85107, which describes how we were using UL_COMPARE_AND_WAIT instead +// of UL_COMPARE_AND_WAIT64 in the implementation of atomic::wait, leading to potential infinite hangs. #include <atomic> #include <cassert> @@ -36,7 +35,7 @@ int main(int, char**) { } }); - // https://github.com/llvm/llvm-project/issues/85107 + // https://llvm.org/PR85107 // [libc++] atomic_wait uses UL_COMPARE_AND_WAIT when it should use UL_COMPARE_AND_WAIT64 on Darwin constexpr std::__cxx_contention_t old_val = 0; constexpr std::__cxx_contention_t new_val = old_val + (1ll << 32); diff --git a/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp b/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp index 352e70515151..e6210786dedc 100644 --- a/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp +++ b/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp @@ -44,7 +44,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp index 222799f9fa2e..1bd5792d1d27 100644 --- a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp +++ b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <atomic> // template <class T> diff --git a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp index 3bde3ad1c338..bdd4a8371b12 100644 --- a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp +++ b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <atomic> // template <class T> diff --git a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp index 805ca346c854..105a01031325 100644 --- a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp +++ b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <atomic> // template <class T> diff --git a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp index 37a4237a9b21..1647ed3aa281 100644 --- a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp +++ b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <atomic> // template <class T> diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py index dbab2875e312..16c90c3ef713 100644 --- a/libcxx/test/libcxx/clang_tidy.gen.py +++ b/libcxx/test/libcxx/clang_tidy.gen.py @@ -6,12 +6,14 @@ # # ===----------------------------------------------------------------------===## - # Run our custom libc++ clang-tidy checks on all public headers. -# RUN: %{python} %s %{libcxx-dir}/utils +# REQUIRES: has-clang-tidy -# block Lit from interpreting a RUN/XFAIL/etc inside the generation script +# The GCC compiler flags are not always compatible with clang-tidy. +# UNSUPPORTED: gcc + +# RUN: %{python} %s %{libcxx-dir}/utils # END. import sys @@ -21,15 +23,6 @@ from libcxx.header_information import lit_header_restrictions, lit_header_undepr for header in public_headers: print(f"""\ //--- {header}.sh.cpp - -// REQUIRES: has-clang-tidy - -// The frozen headers should not be updated to the latest libc++ style, so don't test. -// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME - -// The GCC compiler flags are not always compatible with clang-tidy. -// UNSUPPORTED: gcc - {lit_header_restrictions.get(header, '')} {lit_header_undeprecations.get(header, '')} diff --git a/libcxx/test/libcxx/containers/associative/map/abi.compile.pass.cpp b/libcxx/test/libcxx/containers/associative/map/abi.compile.pass.cpp index e0598b4ff174..ca4e9747bc49 100644 --- a/libcxx/test/libcxx/containers/associative/map/abi.compile.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/map/abi.compile.pass.cpp @@ -87,6 +87,18 @@ struct user_struct { [[no_unique_address]] common_base_allocator<int> a; }; +struct TEST_ALIGNAS(32) AlignedLess {}; +struct FinalLess final {}; +struct NonEmptyLess { + int i; + char c; +}; + +static_assert(std::is_empty<std::__map_value_compare<int, std::pair<const int, int>, std::less<int> > >::value, ""); +static_assert(std::is_empty<std::__map_value_compare<int, std::pair<const int, int>, AlignedLess> >::value, ""); +static_assert(!std::is_empty<std::__map_value_compare<int, std::pair<const int, int>, FinalLess> >::value, ""); +static_assert(!std::is_empty<std::__map_value_compare<int, std::pair<const int, int>, NonEmptyLess> >::value, ""); + #if __SIZE_WIDTH__ == 64 // TODO: Fix the ABI for GCC as well once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121637 is fixed # ifdef TEST_COMPILER_GCC @@ -120,10 +132,13 @@ static_assert(TEST_ALIGNOF(map_alloc<char, test_allocator<std::pair<const char, static_assert(TEST_ALIGNOF(map_alloc<char, small_iter_allocator<std::pair<const char, char> > >) == 2, ""); static_assert(TEST_ALIGNOF(map_alloc<char, final_small_iter_allocator<std::pair<const char, char> > >) == 2, ""); -struct TEST_ALIGNAS(32) AlignedLess {}; - static_assert(sizeof(std::map<int, int, AlignedLess>) == 64, ""); +static_assert(sizeof(std::map<int, int, FinalLess>) == 32, ""); +static_assert(sizeof(std::map<int, int, NonEmptyLess>) == 32, ""); + static_assert(TEST_ALIGNOF(std::map<int, int, AlignedLess>) == 32, ""); +static_assert(TEST_ALIGNOF(std::map<int, int, FinalLess>) == 8, ""); +static_assert(TEST_ALIGNOF(std::map<int, int, NonEmptyLess>) == 8, ""); #elif __SIZE_WIDTH__ == 32 // TODO: Fix the ABI for GCC as well once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121637 is fixed @@ -158,10 +173,13 @@ static_assert(TEST_ALIGNOF(map_alloc<char, test_allocator<std::pair<const char, static_assert(TEST_ALIGNOF(map_alloc<char, small_iter_allocator<std::pair<const char, char> > >) == 2, ""); static_assert(TEST_ALIGNOF(map_alloc<char, final_small_iter_allocator<std::pair<const char, char> > >) == 2, ""); -struct TEST_ALIGNAS(32) AlignedLess {}; +static_assert(sizeof(std::map<int, int, AlignedLess>) == 64, ""); +static_assert(sizeof(std::map<int, int, FinalLess>) == 16, ""); +static_assert(sizeof(std::map<int, int, NonEmptyLess>) == 20, ""); -static_assert(sizeof(std::map<int, int, AlignedLess>) == 64); -static_assert(TEST_ALIGNOF(std::map<int, int, AlignedLess>) == 32); +static_assert(TEST_ALIGNOF(std::map<int, int, AlignedLess>) == 32, ""); +static_assert(TEST_ALIGNOF(std::map<int, int, FinalLess>) == 4, ""); +static_assert(TEST_ALIGNOF(std::map<int, int, NonEmptyLess>) == 4, ""); #else # error std::size_t has an unexpected size diff --git a/libcxx/test/libcxx/containers/associative/reference_comparator_abi.compile.pass.cpp b/libcxx/test/libcxx/containers/associative/reference_comparator_abi.compile.pass.cpp index f364fc817c16..362bf2778e91 100644 --- a/libcxx/test/libcxx/containers/associative/reference_comparator_abi.compile.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/reference_comparator_abi.compile.pass.cpp @@ -15,7 +15,7 @@ // If we decide to make reference comparators ill-formed, this test would become // unnecessary. // -// See https://github.com/llvm/llvm-project/issues/118559 for more details. +// See https://https://llvm.org/PR118559 for more details. #include <set> #include <map> diff --git a/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp index ccd84af44c3a..4fb9d8e6775a 100644 --- a/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp @@ -13,8 +13,6 @@ // void // __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__tree> #include <cassert> diff --git a/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp index d97a1c89f1f7..e6cc646f3c13 100644 --- a/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_left_rotate.pass.cpp @@ -13,8 +13,6 @@ // void // __tree_left_rotate(_NodePtr __x); -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__tree> #include <cassert> diff --git a/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp index e543c3360a68..dd9e7afcdb7d 100644 --- a/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_remove.pass.cpp @@ -13,8 +13,6 @@ // void // __tree_remove(_NodePtr __root, _NodePtr __z) -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__tree> #include <cassert> diff --git a/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp b/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp index b86446f5be10..f3297dedb64e 100644 --- a/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/tree_right_rotate.pass.cpp @@ -13,8 +13,6 @@ // void // __tree_right_rotate(_NodePtr __x); -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__tree> #include <cassert> diff --git a/libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp b/libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp index 60c3e5bf31b0..a9fafe0452ac 100644 --- a/libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp @@ -91,6 +91,33 @@ struct user_struct { [[no_unique_address]] common_base_allocator<int> a; }; +struct TEST_ALIGNAS(32) AlignedHash {}; +struct FinalHash final {}; +struct NonEmptyHash final { + int i; + char c; +}; +struct UnalignedEqualTo {}; +struct FinalEqualTo final {}; +struct NonEmptyEqualTo { + int i; + char c; +}; + +static_assert(std::is_empty<std::__unordered_map_hasher<int, std::pair<const int, int>, std::hash<int>, int> >::value, + ""); +static_assert(std::is_empty<std::__unordered_map_hasher<int, std::pair<const int, int>, AlignedHash, int> >::value, ""); +static_assert(!std::is_empty<std::__unordered_map_hasher<int, std::pair<const int, int>, FinalHash, int> >::value, ""); +static_assert(!std::is_empty<std::__unordered_map_hasher<int, std::pair<const int, int>, NonEmptyHash, int> >::value, + ""); + +static_assert(std::is_empty<std::__unordered_map_equal<int, std::pair<const int, int>, std::hash<int>, int> >::value, + ""); +static_assert(std::is_empty<std::__unordered_map_equal<int, std::pair<const int, int>, AlignedHash, int> >::value, ""); +static_assert(!std::is_empty<std::__unordered_map_equal<int, std::pair<const int, int>, FinalHash, int> >::value, ""); +static_assert(!std::is_empty<std::__unordered_map_equal<int, std::pair<const int, int>, NonEmptyHash, int> >::value, + ""); + #if __SIZE_WIDTH__ == 64 // TODO: Fix the ABI for GCC as well once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121637 is fixed # ifdef TEST_COMPILER_GCC @@ -125,8 +152,20 @@ static_assert(TEST_ALIGNOF(unordered_map_alloc<char, small_iter_allocator<std::p static_assert(TEST_ALIGNOF(unordered_map_alloc<char, final_small_iter_allocator<std::pair<const char, char> > >) == 4, ""); -struct TEST_ALIGNAS(32) AlignedHash {}; -struct UnalignedEqualTo {}; +#ifdef TEST_COMPILER_GCC +static_assert(sizeof(std::unordered_map<int, int, FinalHash, UnalignedEqualTo>) == 40, ""); +#else +static_assert(sizeof(std::unordered_map<int, int, FinalHash, UnalignedEqualTo>) == 48, ""); +#endif +static_assert(sizeof(std::unordered_map<int, int, FinalHash, FinalEqualTo>) == 48, ""); +static_assert(sizeof(std::unordered_map<int, int, NonEmptyHash, FinalEqualTo>) == 48, ""); +static_assert(sizeof(std::unordered_map<int, int, NonEmptyHash, NonEmptyEqualTo>) == 56, ""); + +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, FinalHash, UnalignedEqualTo>) == 8, ""); +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, FinalHash, FinalEqualTo>) == 8, ""); +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, NonEmptyHash, FinalEqualTo>) == 8, ""); +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, NonEmptyHash, NonEmptyEqualTo>) == 8, ""); + // TODO: Fix the ABI for GCC as well once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121637 is fixed # ifdef TEST_COMPILER_GCC static_assert(sizeof(std::unordered_map<int, int, AlignedHash, UnalignedEqualTo>) == 64, ""); @@ -169,8 +208,15 @@ static_assert(TEST_ALIGNOF(unordered_map_alloc<char, small_iter_allocator<std::p static_assert(TEST_ALIGNOF(unordered_map_alloc<char, final_small_iter_allocator<std::pair<const char, char> > >) == 4, ""); -struct TEST_ALIGNAS(32) AlignedHash {}; -struct UnalignedEqualTo {}; +static_assert(sizeof(std::unordered_map<int, int, FinalHash, UnalignedEqualTo>) == 24, ""); +static_assert(sizeof(std::unordered_map<int, int, FinalHash, FinalEqualTo>) == 28, ""); +static_assert(sizeof(std::unordered_map<int, int, NonEmptyHash, FinalEqualTo>) == 32, ""); +static_assert(sizeof(std::unordered_map<int, int, NonEmptyHash, NonEmptyEqualTo>) == 36, ""); + +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, FinalHash, UnalignedEqualTo>) == 4, ""); +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, FinalHash, FinalEqualTo>) == 4, ""); +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, NonEmptyHash, FinalEqualTo>) == 4, ""); +static_assert(TEST_ALIGNOF(std::unordered_map<int, int, NonEmptyHash, NonEmptyEqualTo>) == 4, ""); // TODO: Fix the ABI for GCC as well once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121637 is fixed # ifdef TEST_COMPILER_GCC diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/insert.temporary.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/insert.temporary.pass.cpp index c185d0c700ed..248f282209fd 100644 --- a/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/insert.temporary.pass.cpp +++ b/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/insert.temporary.pass.cpp @@ -10,7 +10,7 @@ // <flat_set> -// https://github.com/llvm/llvm-project/issues/119016 +// https://https://llvm.org/PR119016 #include <flat_set> diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/insert_range.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/insert_range.pass.cpp index d69b05a4dee5..57a581c6c5cb 100644 --- a/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/insert_range.pass.cpp +++ b/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/insert_range.pass.cpp @@ -14,7 +14,7 @@ // As an extension, libc++ flat containers support inserting a non forward range into // a pre-C++23 container that doesn't provide insert_range(...), since many containers // out there are in that situation. -// https://github.com/llvm/llvm-project/issues/136656 +// https://https://llvm.org/PR136656 #include <algorithm> #include <cassert> diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.set/insert.temporary.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.set/insert.temporary.pass.cpp index 22e0662cf2c6..bd627b68f5b8 100644 --- a/libcxx/test/libcxx/containers/container.adaptors/flat.set/insert.temporary.pass.cpp +++ b/libcxx/test/libcxx/containers/container.adaptors/flat.set/insert.temporary.pass.cpp @@ -10,7 +10,7 @@ // <flat_set> -// https://github.com/llvm/llvm-project/issues/119016 +// https://llvm.org/PR119016 #include <flat_set> diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.set/insert_range.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.set/insert_range.pass.cpp index c9dcd71127e2..5b9ddb809675 100644 --- a/libcxx/test/libcxx/containers/container.adaptors/flat.set/insert_range.pass.cpp +++ b/libcxx/test/libcxx/containers/container.adaptors/flat.set/insert_range.pass.cpp @@ -13,8 +13,7 @@ // As an extension, libc++ flat containers support inserting a non forward range into // a pre-C++23 container that doesn't provide insert_range(...), since many containers -// out there are in that situation. -// https://github.com/llvm/llvm-project/issues/136656 +// out there are in that situation. See https://llvm.org/PR136656 #include <algorithm> #include <cassert> diff --git a/libcxx/test/libcxx/containers/container_traits.compile.pass.cpp b/libcxx/test/libcxx/containers/container_traits.compile.pass.cpp index 22be21748795..1452bfbaf396 100644 --- a/libcxx/test/libcxx/containers/container_traits.compile.pass.cpp +++ b/libcxx/test/libcxx/containers/container_traits.compile.pass.cpp @@ -9,8 +9,6 @@ // <__type_traits/container_traits.h> // -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__type_traits/container_traits.h> #include <deque> diff --git a/libcxx/test/libcxx/containers/sequences/deque/segmented_iterator.compile.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/segmented_iterator.compile.pass.cpp index b050da4e36e8..1d5838abade7 100644 --- a/libcxx/test/libcxx/containers/sequences/deque/segmented_iterator.compile.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/deque/segmented_iterator.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <deque> using DequeIterator = typename std::deque<int>::iterator; diff --git a/libcxx/test/libcxx/containers/strings/basic.string/asan_turning_off.pass.cpp b/libcxx/test/libcxx/containers/strings/basic.string/asan_turning_off.pass.cpp index c8ee17c580a4..5e56769a42b3 100644 --- a/libcxx/test/libcxx/containers/strings/basic.string/asan_turning_off.pass.cpp +++ b/libcxx/test/libcxx/containers/strings/basic.string/asan_turning_off.pass.cpp @@ -16,7 +16,7 @@ // This test confirms that those allocators work after turning off annotations. // // A context to this test is a situations when memory is repurposed and destructors are not called. -// Related issue: https://github.com/llvm/llvm-project/issues/60384 +// Related issue: https://llvm.org/PR60384 // // That issue appeared in the past and was addressed here: https://reviews.llvm.org/D145628 // diff --git a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp index 53a1dd2d3fa7..8a9e1da01592 100644 --- a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp @@ -18,8 +18,6 @@ // If n <= 1, return n. If n is a power of 2, return n. // Otherwise, return the next power of 2. -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__hash_table> #include <cassert> #include <cstdint> diff --git a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp index 44b0eb96e2b9..c4daabb63e4c 100644 --- a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp @@ -16,8 +16,6 @@ // If n == 0, return 0, else return the lowest prime greater than or equal to n -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__hash_table> #include <cassert> #include <cstddef> diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_stride.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_stride.pass.cpp index cec8df8aba8d..0dcd6bd1c031 100644 --- a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_stride.pass.cpp +++ b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_stride.pass.cpp @@ -12,7 +12,7 @@ // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing // ADDITIONAL_COMPILE_FLAGS: -Wno-ctad-maybe-unsupported -// FIXME: https://github.com/llvm/llvm-project/issues/64719 +// FIXME: https://llvm.org/PR64719 // There appear to be some issues around ctad which make it // currently impossible to get this code warning free. // Thus added the additional compile flag above diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_stride.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_stride.pass.cpp index b77d964540f9..05b3349b7249 100644 --- a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_stride.pass.cpp +++ b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_stride.pass.cpp @@ -12,7 +12,7 @@ // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing // ADDITIONAL_COMPILE_FLAGS: -Wno-ctad-maybe-unsupported -// FIXME: https://github.com/llvm/llvm-project/issues/64719 +// FIXME: https://llvm.org/PR64719 // There appear to be some issues around ctad which make it // currently impossible to get this code warning free. // Thus added the additional compile flag above diff --git a/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp b/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp index 3d97446ffe82..479b46a39e96 100644 --- a/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp +++ b/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp @@ -14,8 +14,6 @@ // ADDITIONAL_COMPILE_FLAGS: -fexperimental-library -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <version> #if !_LIBCPP_HAS_EXPERIMENTAL_PSTL diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.verify.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.verify.cpp index 455c9979ae57..fcbf6497c8d7 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.verify.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.verify.cpp @@ -15,8 +15,10 @@ // UNSUPPORTED: no-wide-characters +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + #include <fstream> std::basic_filebuf<char, std::char_traits<wchar_t> > f; // expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} -// expected-error@*:* 9 {{only virtual member functions can be marked 'override'}} +// expected-error@*:* 10 {{only virtual member functions can be marked 'override'}} diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.verify.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.verify.cpp index cc52cc119d50..8eca76c037bf 100644 --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.verify.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.verify.cpp @@ -15,13 +15,15 @@ // UNSUPPORTED: no-wide-characters +// XFAIL: FROZEN-CXX03-HEADERS-FIXME + #include <fstream> std::basic_fstream<char, std::char_traits<wchar_t> > f; // expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} // expected-error-re@*:* {{static assertion failed{{.*}}traits_type::char_type must be the same type as CharT}} -// expected-error@*:* 11 {{only virtual member functions can be marked 'override'}} +// expected-error@*:* 12 {{only virtual member functions can be marked 'override'}} // FIXME: As of commit r324062 Clang incorrectly generates a diagnostic about mismatching // exception specifications for types which are already invalid for one reason or another. diff --git a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp index 38047957de8e..3ca97ae8e9a4 100644 --- a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: has-unix-headers -// UNSUPPORTED: c++03 +// UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: !libcpp-hardening-mode=debug // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing diff --git a/libcxx/test/libcxx/input.output/iostream.format/output.streams/ostream.syn/includes.compile.pass.cpp b/libcxx/test/libcxx/input.output/iostream.format/output.streams/ostream.syn/includes.compile.pass.cpp index 7a5bfb992648..20b8d187c0ac 100644 --- a/libcxx/test/libcxx/input.output/iostream.format/output.streams/ostream.syn/includes.compile.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostream.format/output.streams/ostream.syn/includes.compile.pass.cpp @@ -18,7 +18,7 @@ // However using the granularized headers so it's possible to implement // <ostream> without <format>. This would be a non-conforming implementation. // -// See https://github.com/llvm/llvm-project/issues/71925 +// See https://llvm.org/PR71925 #include <ostream> #include <vector> diff --git a/libcxx/test/libcxx/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp b/libcxx/test/libcxx/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp index 2b6c3802a56b..d6caa3389b8f 100644 --- a/libcxx/test/libcxx/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp +++ b/libcxx/test/libcxx/input.output/string.streams/stringbuf/const_sso_buffer.pass.cpp @@ -8,8 +8,6 @@ // <sstream> -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // How the constructors of basic_stringbuf initialize the buffer pointers is // not specified. For some constructors it's implementation defined whether the // pointers are set to nullptr. Libc++'s implementation directly uses the SSO diff --git a/libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp b/libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp index 33774578e233..60587d5bfe5d 100644 --- a/libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp +++ b/libcxx/test/libcxx/iterators/aliasing_iterator.pass.cpp @@ -8,8 +8,6 @@ // ADDITIONAL_COMPILE_FLAGS(clang): -Wprivate-header -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__iterator/aliasing_iterator.h> #include <cassert> diff --git a/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp index 3fc735b44167..45d0cc3b95f9 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp @@ -11,8 +11,6 @@ // // Arithmetic operators -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__iterator/bounded_iter.h> #include <cstddef> diff --git a/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp index a12b77afa0db..cef2157469c8 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp @@ -11,8 +11,6 @@ // // Comparison operators -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <concepts> #include <__iterator/bounded_iter.h> diff --git a/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp index 22ad8c6706d6..bfd779d644f5 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp @@ -11,8 +11,6 @@ // // std::pointer_traits specialization -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__iterator/bounded_iter.h> #include <cassert> #include <cstddef> diff --git a/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp index d205c5b03ee3..56ded9ae5ed2 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp @@ -11,8 +11,6 @@ // // Nested types -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__iterator/bounded_iter.h> #include <cstddef> #include <iterator> diff --git a/libcxx/test/libcxx/iterators/contiguous_iterators.conv.compile.pass.cpp b/libcxx/test/libcxx/iterators/contiguous_iterators.conv.compile.pass.cpp index 4d3690953070..372559594143 100644 --- a/libcxx/test/libcxx/iterators/contiguous_iterators.conv.compile.pass.cpp +++ b/libcxx/test/libcxx/iterators/contiguous_iterators.conv.compile.pass.cpp @@ -15,8 +15,6 @@ // Verify that libc++-wrapped iterators do not permit slicing conversion or construction. -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <array> #include <span> #include <type_traits> diff --git a/libcxx/test/libcxx/iterators/contiguous_iterators.verify.cpp b/libcxx/test/libcxx/iterators/contiguous_iterators.verify.cpp index ba2697c78986..215e77b6605e 100644 --- a/libcxx/test/libcxx/iterators/contiguous_iterators.verify.cpp +++ b/libcxx/test/libcxx/iterators/contiguous_iterators.verify.cpp @@ -11,10 +11,8 @@ // __bounded_iter<_Iter> -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // Verify that __bounded_iter does not accept non-contiguous iterators as determined by __libcpp_is_contiguous_iterator. -// static_assert should be used, see https://github.com/llvm/llvm-project/issues/115002. +// static_assert should be used, see https://llvm.org/PR115002. // __wrap_iter cannot be so handled because it may directly wrap user-defined fancy pointers in libc++'s vector. #include <deque> diff --git a/libcxx/test/libcxx/iterators/iterator.primitives/iterator.operations/prev.verify.cpp b/libcxx/test/libcxx/iterators/iterator.primitives/iterator.operations/prev.verify.cpp index ffef68772398..da0a336815a5 100644 --- a/libcxx/test/libcxx/iterators/iterator.primitives/iterator.operations/prev.verify.cpp +++ b/libcxx/test/libcxx/iterators/iterator.primitives/iterator.operations/prev.verify.cpp @@ -8,8 +8,6 @@ // std::prev -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <iterator> #include "test_iterators.h" diff --git a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp index 7ead65caf9fd..4bb42cb53207 100644 --- a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp +++ b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp @@ -21,8 +21,6 @@ // GCC doesn't support the aligned-allocation flags. // XFAIL: gcc -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // RUN: %{build} -faligned-allocation -fsized-deallocation // RUN: %{run} // RUN: %{build} -faligned-allocation -fno-sized-deallocation -DNO_SIZE diff --git a/libcxx/test/libcxx/lit.local.cfg b/libcxx/test/libcxx/lit.local.cfg new file mode 100644 index 000000000000..95847cd72ee3 --- /dev/null +++ b/libcxx/test/libcxx/lit.local.cfg @@ -0,0 +1,4 @@ + +# disable libcxx tests when running against the frozen headers. We have separate tests for C++03. +if "FROZEN-CXX03-HEADERS-FIXME" in config.available_features: + config.unsupported = True diff --git a/libcxx/test/libcxx/localization/locale.categories/__scan_keyword.pass.cpp b/libcxx/test/libcxx/localization/locale.categories/__scan_keyword.pass.cpp index 5f618e92375a..ab05ba1da811 100644 --- a/libcxx/test/libcxx/localization/locale.categories/__scan_keyword.pass.cpp +++ b/libcxx/test/libcxx/localization/locale.categories/__scan_keyword.pass.cpp @@ -35,8 +35,6 @@ // const _Ctype& __ct, ios_base::iostate& __err, // bool __case_sensitive = true); -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__locale_dir/scan_keyword.h> #include <cassert> #include <locale> diff --git a/libcxx/test/libcxx/memory/allocation_guard.pass.cpp b/libcxx/test/libcxx/memory/allocation_guard.pass.cpp index 20c05b381ef0..493ebf044187 100644 --- a/libcxx/test/libcxx/memory/allocation_guard.pass.cpp +++ b/libcxx/test/libcxx/memory/allocation_guard.pass.cpp @@ -12,8 +12,6 @@ // To allow checking that self-move works correctly. // ADDITIONAL_COMPILE_FLAGS: -Wno-self-move -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // template<class _Alloc> // struct __allocation_guard; diff --git a/libcxx/test/libcxx/memory/swap_allocator.pass.cpp b/libcxx/test/libcxx/memory/swap_allocator.pass.cpp index f70f8134d1dd..311660290eae 100644 --- a/libcxx/test/libcxx/memory/swap_allocator.pass.cpp +++ b/libcxx/test/libcxx/memory/swap_allocator.pass.cpp @@ -7,8 +7,6 @@ //===----------------------------------------------------------------------===// // -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <memory> // template <typename _Alloc> diff --git a/libcxx/test/libcxx/numerics/bit.ops.pass.cpp b/libcxx/test/libcxx/numerics/bit.ops.pass.cpp index 1bf9d3890f45..7f502d6e01d1 100644 --- a/libcxx/test/libcxx/numerics/bit.ops.pass.cpp +++ b/libcxx/test/libcxx/numerics/bit.ops.pass.cpp @@ -9,8 +9,6 @@ // Test the __XXXX routines in the <bit> header. // These are not supposed to be exhaustive tests, just sanity checks. -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__bit/bit_log2.h> #include <__bit/countl.h> #include <__bit/rotate.h> diff --git a/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp b/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp index 68d55afa1f28..aed78f9cddf8 100644 --- a/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp +++ b/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp @@ -12,8 +12,6 @@ // closest representable value for the specified integer type, or // numeric_limits<IntT>::max()/min() if the value isn't representable. -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__random/clamp_to_integral.h> #include <cassert> #include <cmath> diff --git a/libcxx/test/libcxx/numerics/complex.number/cmplx.over.pow.pass.cpp b/libcxx/test/libcxx/numerics/complex.number/cmplx.over.pow.pass.cpp index d87e259cefe3..406d8a4ccadd 100644 --- a/libcxx/test/libcxx/numerics/complex.number/cmplx.over.pow.pass.cpp +++ b/libcxx/test/libcxx/numerics/complex.number/cmplx.over.pow.pass.cpp @@ -8,14 +8,12 @@ // <complex> -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // template<class T, class U> complex<__promote_t<T, U>> pow(const complex<T>&, const U&); // template<class T, class U> complex<__promote_t<T, U>> pow(const complex<T>&, const complex<U>&); // template<class T, class U> complex<__promote_t<T, U>> pow(const T&, const complex<U>&); // Test that these additional overloads are free from catching std::complex<non-floating-point>, -// which is expected by several 3rd party libraries, see https://github.com/llvm/llvm-project/issues/109858. +// which is expected by several 3rd party libraries, see https://llvm.org/PR109858. // // Note that we reserve the right to break this in the future if we have a reason to, but for the time being, // make sure we don't break this property unintentionally. diff --git a/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp index 7b3f81e21d8a..6bfcb5d4bfcd 100644 --- a/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp +++ b/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <string> // This test ensures that the correct max_size() is returned depending on the platform. diff --git a/libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp b/libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp index 2009cbe28a91..bdc18448d03a 100644 --- a/libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp +++ b/libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp @@ -19,8 +19,6 @@ // and is_trivially_XXX_assignable), so we use some funky types to test these // corner cases. -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__string/constexpr_c_functions.h> #include <cassert> #include <cstdint> diff --git a/libcxx/test/libcxx/system_reserved_names.gen.py b/libcxx/test/libcxx/system_reserved_names.gen.py index a4f2928eda33..f8589f2beaae 100644 --- a/libcxx/test/libcxx/system_reserved_names.gen.py +++ b/libcxx/test/libcxx/system_reserved_names.gen.py @@ -29,8 +29,6 @@ for header in public_headers: {lit_header_restrictions.get(header, '')} {lit_header_undeprecations.get(header, '')} -// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME - // This is required to detect the platform we're building for below. #include <__config> diff --git a/libcxx/test/libcxx/transitive_includes.gen.py b/libcxx/test/libcxx/transitive_includes.gen.py index 6f9924043663..6ed35af7e275 100644 --- a/libcxx/test/libcxx/transitive_includes.gen.py +++ b/libcxx/test/libcxx/transitive_includes.gen.py @@ -17,8 +17,6 @@ # to avoid breaking users at every release. # RUN: %{python} %s %{libcxx-dir}/utils - -# block Lit from interpreting a RUN/XFAIL/etc inside the generation script # END. import sys @@ -90,8 +88,6 @@ else: // TODO: Figure out why <stdatomic.h> doesn't work on FreeBSD // UNSUPPORTED: LIBCXX-FREEBSD-FIXME -// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME - // RUN: mkdir %t // RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.txt // RUN: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes/to_csv.py %t/trace-includes.txt > %t/actual_transitive_includes.csv diff --git a/libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp b/libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp index 67a4dccb0f5f..51e3a8534bae 100644 --- a/libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/datasizeof.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__type_traits/datasizeof.h> #include <cstdint> #include <type_traits> diff --git a/libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp b/libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp index 4ed6d15ee9e9..9134ac027d1e 100644 --- a/libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME - // This test requires variable templates // UNSUPPORTED: gcc && c++11 diff --git a/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp b/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp index a538c52a534e..5a779c0e96e2 100644 --- a/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp @@ -14,8 +14,6 @@ // returns false when there's no constant evaluation support from the compiler. // as well as when called not in a constexpr context -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__type_traits/is_constant_evaluated.h> #include <cassert> diff --git a/libcxx/test/libcxx/type_traits/is_replaceable.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_replaceable.compile.pass.cpp index 7735538cccae..546240a6c328 100644 --- a/libcxx/test/libcxx/type_traits/is_replaceable.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_replaceable.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__type_traits/is_replaceable.h> #include <array> #include <deque> diff --git a/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp index e9b53080fcd6..e2be399456b1 100644 --- a/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_trivially_comparable.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__type_traits/conditional.h> #include <__type_traits/is_equality_comparable.h> #include <__type_traits/is_signed.h> diff --git a/libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp index 8066925f2900..c462672616f7 100644 --- a/libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__type_traits/is_trivially_relocatable.h> #include <array> #include <deque> diff --git a/libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp b/libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp index fb51a4bf4ed2..f6b8a29d3682 100644 --- a/libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp +++ b/libcxx/test/libcxx/utilities/exception_guard.odr.sh.cpp @@ -9,8 +9,6 @@ // This test relies on `typeid` and thus requires `-frtti`. // UNSUPPORTED: no-rtti -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // Make sure that we don't get ODR violations with __exception_guard when // linking together TUs compiled with different values of -f[no-]exceptions. diff --git a/libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp b/libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp index 25cc08a55a42..09ebd0069b3a 100644 --- a/libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp +++ b/libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp @@ -15,7 +15,7 @@ // // TODO(LLVM 22): Remove '0-1' from 'expected-error-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}}}' // and remove 'expected-warning-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}, which is a Microsoft extension}}' -// once LLVM 22 releases. See https://github.com/llvm/llvm-project/issues/104885. +// once LLVM 22 releases. See https://llvm.org/PR104885. // Test the mandates diff --git a/libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp b/libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp index 2dd3acd51e6e..9fd7452af64f 100644 --- a/libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp +++ b/libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp @@ -16,7 +16,7 @@ // TODO(LLVM 22): Remove '0-1' from 'expected-error-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}}}' // and remove 'expected-warning-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}, which is a Microsoft extension}}' // and remove 'expected-error-re@*:* 0-1 {{call to deleted constructor of {{.*}}}}' -// once LLVM 22 releases. See See https://github.com/llvm/llvm-project/issues/104885. +// once LLVM 22 releases. See See https://llvm.org/PR104885. // Test the mandates diff --git a/libcxx/test/libcxx/utilities/function.objects/refwrap/desugars_to.compile.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/refwrap/desugars_to.compile.pass.cpp index 1ce88feeadf2..aa6bf85a1a40 100644 --- a/libcxx/test/libcxx/utilities/function.objects/refwrap/desugars_to.compile.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/refwrap/desugars_to.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME - // This test requires variable templates // UNSUPPORTED: gcc && c++11 diff --git a/libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp b/libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp index b0a27c79287d..fc4d3a9800d1 100644 --- a/libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp +++ b/libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__utility/is_pointer_in_range.h> #include <cassert> diff --git a/libcxx/test/libcxx/utilities/is_valid_range.pass.cpp b/libcxx/test/libcxx/utilities/is_valid_range.pass.cpp index cb800aee5674..345e2feeda81 100644 --- a/libcxx/test/libcxx/utilities/is_valid_range.pass.cpp +++ b/libcxx/test/libcxx/utilities/is_valid_range.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__utility/is_valid_range.h> #include <cassert> diff --git a/libcxx/test/libcxx/utilities/meta/is_referenceable.compile.pass.cpp b/libcxx/test/libcxx/utilities/meta/is_referenceable.compile.pass.cpp index 0991de69b5ba..c230f6e16e0a 100644 --- a/libcxx/test/libcxx/utilities/meta/is_referenceable.compile.pass.cpp +++ b/libcxx/test/libcxx/utilities/meta/is_referenceable.compile.pass.cpp @@ -14,8 +14,6 @@ // or a ref-qualifier, or a reference type. // -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <type_traits> #include <cassert> diff --git a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp b/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp index 66c25b1d7563..89f08088921d 100644 --- a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp +++ b/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp @@ -7,8 +7,6 @@ //===----------------------------------------------------------------------===// // -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include "test_macros.h" TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header") diff --git a/libcxx/test/libcxx/utilities/no_destroy.pass.cpp b/libcxx/test/libcxx/utilities/no_destroy.pass.cpp index 8693bb17089d..9a874a640753 100644 --- a/libcxx/test/libcxx/utilities/no_destroy.pass.cpp +++ b/libcxx/test/libcxx/utilities/no_destroy.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <__utility/no_destroy.h> #include <cassert> diff --git a/libcxx/test/libcxx/utilities/tuple/abi.compile.pass.cpp b/libcxx/test/libcxx/utilities/tuple/abi.compile.pass.cpp new file mode 100644 index 000000000000..467214a0779d --- /dev/null +++ b/libcxx/test/libcxx/utilities/tuple/abi.compile.pass.cpp @@ -0,0 +1,124 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03 + +// UNSUPPORTED: libcpp-abi-no-compressed-pair-padding + +#include <tuple> +#include <type_traits> + +#include "test_macros.h" + +struct S {}; + +struct Final final {}; + +struct NonEmpty { + int i; + char c; +}; + +struct NonEmptyFinal final { + int i; + char c; +}; + +struct TEST_ALIGNAS(16) Overaligned {}; +struct TEST_ALIGNAS(16) OveralignedFinal final {}; + +static_assert(std::is_empty<std::tuple<>>::value, ""); +static_assert(!std::is_empty<std::tuple<S>>::value, ""); +static_assert(!std::is_empty<std::tuple<S&>>::value, ""); +static_assert(!std::is_empty<std::tuple<S&&>>::value, ""); +static_assert(!std::is_empty<std::tuple<Final>>::value, ""); +static_assert(!std::is_empty<std::tuple<NonEmpty>>::value, ""); +static_assert(!std::is_empty<std::tuple<NonEmptyFinal>>::value, ""); +static_assert(!std::is_empty<std::tuple<Overaligned>>::value, ""); +static_assert(!std::is_empty<std::tuple<OveralignedFinal>>::value, ""); + +static_assert(sizeof(std::tuple<S>) == 1, ""); +static_assert(sizeof(std::tuple<S&>) == sizeof(void*), ""); +static_assert(sizeof(std::tuple<S&&>) == sizeof(void*), ""); +static_assert(sizeof(std::tuple<Final>) == 1, ""); +static_assert(sizeof(std::tuple<NonEmpty>) == 8, ""); +static_assert(sizeof(std::tuple<NonEmptyFinal>) == 8, ""); +static_assert(sizeof(std::tuple<Overaligned>) == 16, ""); +static_assert(sizeof(std::tuple<OveralignedFinal>) == 16, ""); + +static_assert(sizeof(std::tuple<S, S>) == 2, ""); +static_assert(sizeof(std::tuple<S&, S>) == sizeof(void*), ""); +static_assert(sizeof(std::tuple<S&&, S>) == sizeof(void*), ""); +static_assert(sizeof(std::tuple<Final, S>) == 1, ""); +static_assert(sizeof(std::tuple<NonEmpty, S>) == 8, ""); +static_assert(sizeof(std::tuple<NonEmptyFinal, S>) == 8, ""); +static_assert(sizeof(std::tuple<Overaligned, S>) == 16, ""); +static_assert(sizeof(std::tuple<OveralignedFinal, S>) == 16, ""); + +static_assert(sizeof(std::tuple<S, S&>) == sizeof(void*), ""); +static_assert(sizeof(std::tuple<S&, S&>) == 2 * sizeof(void*), ""); +static_assert(sizeof(std::tuple<S&&, S&>) == 2 * sizeof(void*), ""); +static_assert(sizeof(std::tuple<Final, S&>) == 2 * sizeof(void*), ""); +static_assert(sizeof(std::tuple<NonEmpty, S&>) == 8 + sizeof(void*), ""); +static_assert(sizeof(std::tuple<NonEmptyFinal, S&>) == 8 + sizeof(void*), ""); +static_assert(sizeof(std::tuple<Overaligned, S&>) == 16, ""); +static_assert(sizeof(std::tuple<OveralignedFinal, S&>) == 32, ""); + +static_assert(sizeof(std::tuple<S, S&&>) == sizeof(void*), ""); +static_assert(sizeof(std::tuple<S&, S&&>) == 2 * sizeof(void*), ""); +static_assert(sizeof(std::tuple<S&&, S&&>) == 2 * sizeof(void*), ""); +static_assert(sizeof(std::tuple<Final, S&&>) == 2 * sizeof(void*), ""); +static_assert(sizeof(std::tuple<NonEmpty, S&&>) == 8 + sizeof(void*), ""); +static_assert(sizeof(std::tuple<NonEmptyFinal, S&&>) == 8 + sizeof(void*), ""); +static_assert(sizeof(std::tuple<Overaligned, S&&>) == 16, ""); +static_assert(sizeof(std::tuple<OveralignedFinal, S&&>) == 32, ""); + +static_assert(sizeof(std::tuple<S, Final>) == 1, ""); +static_assert(sizeof(std::tuple<S&, Final>) == 2 * sizeof(void*), ""); +static_assert(sizeof(std::tuple<S&&, Final>) == 2 * sizeof(void*), ""); +static_assert(sizeof(std::tuple<Final, Final>) == 2, ""); +static_assert(sizeof(std::tuple<NonEmpty, Final>) == 12, ""); +static_assert(sizeof(std::tuple<NonEmptyFinal, Final>) == 12, ""); +static_assert(sizeof(std::tuple<Overaligned, Final>) == 16, ""); +static_assert(sizeof(std::tuple<OveralignedFinal, Final>) == 32, ""); + +static_assert(sizeof(std::tuple<S, NonEmpty>) == 8, ""); +static_assert(sizeof(std::tuple<S&, NonEmpty>) == sizeof(void*) + 8, ""); +static_assert(sizeof(std::tuple<S&&, NonEmpty>) == sizeof(void*) + 8, ""); +static_assert(sizeof(std::tuple<Final, NonEmpty>) == 12, ""); +static_assert(sizeof(std::tuple<NonEmpty, NonEmpty>) == 16, ""); +static_assert(sizeof(std::tuple<NonEmptyFinal, NonEmpty>) == 16, ""); +static_assert(sizeof(std::tuple<Overaligned, NonEmpty>) == 16, ""); +static_assert(sizeof(std::tuple<OveralignedFinal, NonEmpty>) == 32, ""); + +static_assert(sizeof(std::tuple<S, NonEmptyFinal>) == 8, ""); +static_assert(sizeof(std::tuple<S&, NonEmptyFinal>) == sizeof(void*) + 8, ""); +static_assert(sizeof(std::tuple<S&&, NonEmptyFinal>) == sizeof(void*) + 8, ""); +static_assert(sizeof(std::tuple<Final, NonEmptyFinal>) == 12, ""); +static_assert(sizeof(std::tuple<NonEmpty, NonEmptyFinal>) == 16, ""); +static_assert(sizeof(std::tuple<NonEmptyFinal, NonEmptyFinal>) == 16, ""); +static_assert(sizeof(std::tuple<Overaligned, NonEmptyFinal>) == 16, ""); +static_assert(sizeof(std::tuple<OveralignedFinal, NonEmptyFinal>) == 32, ""); + +static_assert(sizeof(std::tuple<S, Overaligned>) == 16, ""); +static_assert(sizeof(std::tuple<S&, Overaligned>) == 16, ""); +static_assert(sizeof(std::tuple<S&&, Overaligned>) == 16, ""); +static_assert(sizeof(std::tuple<Final, Overaligned>) == 16, ""); +static_assert(sizeof(std::tuple<NonEmpty, Overaligned>) == 16, ""); +static_assert(sizeof(std::tuple<NonEmptyFinal, Overaligned>) == 16, ""); +static_assert(sizeof(std::tuple<Overaligned, Overaligned>) == 32, ""); +static_assert(sizeof(std::tuple<OveralignedFinal, Overaligned>) == 16, ""); + +static_assert(sizeof(std::tuple<S, OveralignedFinal>) == 16, ""); +static_assert(sizeof(std::tuple<S&, OveralignedFinal>) == 32, ""); +static_assert(sizeof(std::tuple<S&&, OveralignedFinal>) == 32, ""); +static_assert(sizeof(std::tuple<Final, OveralignedFinal>) == 32, ""); +static_assert(sizeof(std::tuple<NonEmpty, OveralignedFinal>) == 32, ""); +static_assert(sizeof(std::tuple<NonEmptyFinal, OveralignedFinal>) == 32, ""); +static_assert(sizeof(std::tuple<Overaligned, OveralignedFinal>) == 16, ""); +static_assert(sizeof(std::tuple<OveralignedFinal, OveralignedFinal>) == 32, ""); diff --git a/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp b/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp index 55a51c9fc26e..38d7fa19cdca 100644 --- a/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_underaligned_buffer.pass.cpp b/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_underaligned_buffer.pass.cpp index a01cdce05390..1bcf694902c1 100644 --- a/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_underaligned_buffer.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_underaligned_buffer.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp b/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp index 29e9d0345c14..3bf1e9905b1b 100644 --- a/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.pool/unsynchronized_buffer.pass.cpp b/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.pool/unsynchronized_buffer.pass.cpp index 3226efcec1b2..a133e04c2cd0 100644 --- a/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.pool/unsynchronized_buffer.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.pool/unsynchronized_buffer.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/libcxx/utilities/utility/mem.res/pmr.availability.verify.cpp b/libcxx/test/libcxx/utilities/utility/mem.res/pmr.availability.verify.cpp index 34cf178b7a22..3d1281563304 100644 --- a/libcxx/test/libcxx/utilities/utility/mem.res/pmr.availability.verify.cpp +++ b/libcxx/test/libcxx/utilities/utility/mem.res/pmr.availability.verify.cpp @@ -9,7 +9,7 @@ // UNSUPPORTED: c++03, c++11, c++14 // REQUIRES: availability-pmr-missing -// TODO: This test doesn't work until https://github.com/llvm/llvm-project/issues/40340 +// TODO: This test doesn't work until https://llvm.org/PR40995 // has been fixed, because we actually disable availability markup. // XFAIL: * diff --git a/libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp b/libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp index 1644819a02f7..7743f507b251 100644 --- a/libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/private_constructor_tag.compile.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // struct __private_constructor_tag{}; // The private constructor tag is intended to be a trivial type that can easily diff --git a/libcxx/test/libcxx/vendor/apple/disable-availability.sh.cpp b/libcxx/test/libcxx/vendor/apple/disable-availability.sh.cpp index c131f6414ed3..b09a0b7e45ca 100644 --- a/libcxx/test/libcxx/vendor/apple/disable-availability.sh.cpp +++ b/libcxx/test/libcxx/vendor/apple/disable-availability.sh.cpp @@ -9,7 +9,7 @@ // REQUIRES: stdlib=apple-libc++ // This test ensures that we retain a way to disable availability markup on Apple platforms -// in order to work around Clang bug https://github.com/llvm/llvm-project/issues/134151. +// in order to work around Clang bug https://llvm.org/PR134151. // // Once that bug has been fixed or once we've made changes to libc++'s use of availability // that render that workaround unnecessary, the macro and this test can be removed. diff --git a/libcxx/test/selftest/gen.cpp/unsupported.gen.cpp b/libcxx/test/selftest/gen.cpp/unsupported.gen.cpp new file mode 100644 index 000000000000..6f35939f2258 --- /dev/null +++ b/libcxx/test/selftest/gen.cpp/unsupported.gen.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Make sure we can mark a gen-test as UNSUPPORTED + +// We use C++03 as a random feature that we know exists. The goal is to make +// this test always unsupported. +// UNSUPPORTED: c++03 +// REQUIRES: c++03 + +// Note that an unsupported gen-test should still contain some commands, otherwise +// what are we generating? They are never executed, though. +// RUN: something-definitely-invalid diff --git a/libcxx/test/selftest/test_macros.pass.cpp b/libcxx/test/selftest/test_macros.pass.cpp index 9bcf7cf9a31f..66cb7c0b9b57 100644 --- a/libcxx/test/selftest/test_macros.pass.cpp +++ b/libcxx/test/selftest/test_macros.pass.cpp @@ -8,9 +8,6 @@ // // Test the "test_macros.h" header. -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - -#include <__config> #include "test_macros.h" #ifndef TEST_STD_VER diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp index cfcaf1c8a6dd..3c9cf9bd6100 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp @@ -114,7 +114,7 @@ TEST_CONSTEXPR_CXX20 bool test() { // Validate std::copy with std::vector<bool> iterators and custom storage types. // Ensure that assigned bits hold the intended values, while unassigned bits stay unchanged. - // Related issue: https://github.com/llvm/llvm-project/issues/131692. + // Related issue: https://llvm.org/PR131692. { //// Tests for std::copy with aligned bits diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp index def192d4d663..b921591c1962 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp @@ -116,7 +116,7 @@ TEST_CONSTEXPR_CXX20 bool test() { // Validate std::copy_backward with std::vector<bool> iterators and custom storage types. // Ensure that assigned bits hold the intended values, while unassigned bits stay unchanged. - // Related issue: https://github.com/llvm/llvm-project/issues/131718. + // Related issue: https://llvm.org/PR131718. { //// Tests for std::copy_backward with aligned bits diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp index f541c914b401..0e0fbf39602d 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp @@ -241,7 +241,7 @@ constexpr bool test() { // Validate std::ranges::copy with std::vector<bool> iterators and custom storage types. // Ensure that assigned bits hold the intended values, while unassigned bits stay unchanged. - // Related issue: https://github.com/llvm/llvm-project/issues/131692. + // Related issue: https://llvm.org/PR131692. { //// Tests for std::ranges::copy with aligned bits diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp index e7251ab905db..46beea04aa2f 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp @@ -359,7 +359,7 @@ constexpr bool test() { // Validate std::ranges::copy_backward with std::vector<bool> iterators and custom storage types. // Ensure that assigned bits hold the intended values, while unassigned bits stay unchanged. - // Related issue: https://github.com/llvm/llvm-project/issues/131718. + // Related issue: https://llvm.org/PR131718. { //// Tests for std::ranges::copy_backward with aligned bits diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp index 7bc61a9b7f71..e696dcdb3435 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp @@ -56,7 +56,7 @@ TEST_CONSTEXPR_CXX20 bool test() { } // Fix std::count for std::vector<bool> with small storage types, e.g., std::uint16_t, unsigned short. - // See https://github.com/llvm/llvm-project/issues/122528 + // See https://llvm.org/PR122528 { using Alloc = sized_allocator<bool, std::uint8_t, std::int8_t>; std::vector<bool, Alloc> in(100, true, Alloc(1)); diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp index ab9d6a09faeb..2c1346a74374 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp @@ -285,7 +285,7 @@ constexpr bool test() { } // Fix std::ranges::count for std::vector<bool> with small storage types, e.g., std::uint16_t, unsigned short. - // See https://github.com/llvm/llvm-project/issues/122528 + // See https://llvm.org/PR122528 { using Alloc = sized_allocator<bool, std::uint8_t, std::int8_t>; std::vector<bool, Alloc> in(100, true, Alloc(1)); diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp index 859532d4b79c..a041e38a4838 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp @@ -178,7 +178,7 @@ TEST_CONSTEXPR_CXX20 bool test() { } // Make sure std::equal behaves properly with std::vector<bool> iterators with custom size types. - // See issue: https://github.com/llvm/llvm-project/issues/126369. + // See issue: https://llvm.org/PR126369. { //// Tests for std::equal with aligned bits diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp index 3f3af71de6a1..8f35a3cf3458 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp @@ -446,7 +446,7 @@ constexpr bool test() { } // Make sure std::equal behaves properly with std::vector<bool> iterators with custom size types. - // See issue: https://github.com/llvm/llvm-project/issues/126369. + // See issue: https://llvm.org/PR126369. { //// Tests for std::equal with aligned bits diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp index 989edcb3f6ee..c32abce72046 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp @@ -244,7 +244,7 @@ TEST_CONSTEXPR_CXX20 bool test() { } // Verify that the std::vector<bool>::iterator optimization works properly for allocators with custom size types - // Fix https://github.com/llvm/llvm-project/issues/122528 + // Fix https://llvm.org/PR122528 { using Alloc = sized_allocator<bool, std::uint8_t, std::int8_t>; std::vector<bool, Alloc> in(100, false, Alloc(1)); diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp index d7e6be9928a2..5b4abc45b6f4 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp @@ -219,7 +219,7 @@ constexpr bool test() { } // Verify that the std::vector<bool>::iterator optimization works properly for allocators with custom size types - // See https://github.com/llvm/llvm-project/issues/122528 + // See https://llvm.org/PR122528 { using Alloc = sized_allocator<bool, std::uint8_t, std::int8_t>; std::vector<bool, Alloc> in(100, false, Alloc(1)); diff --git a/libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp index 7bdbb7f60e9a..9f45976c2968 100644 --- a/libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp +++ b/libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp @@ -123,7 +123,7 @@ constexpr bool test() { static_assert(std::is_same_v<double, decltype(res.value)>); } { - // Check aggregate initiazliation + // Check aggregate initialization out_value_result<int, int> res = {1, 2}; assert(res.out == 1); assert(res.value == 2); diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp index b3b90af0b497..687b324f3f19 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp @@ -56,7 +56,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp index 2f84f26b9f7d..e741e2283251 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp @@ -219,7 +219,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp index 5a39ec761f34..4b686a2d79ed 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp @@ -67,7 +67,7 @@ void testBasic(MemoryOrder... memory_order) { assert(a.load() == T(1.2)); // bug - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 if constexpr (!std::same_as<T, long double>) { assert(expected == T(1.2)); } @@ -235,7 +235,7 @@ int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp index d1828b1a9b74..42f00ed35f3c 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp @@ -55,7 +55,7 @@ constexpr void testOne() { constexpr bool test() { testOne<float>(); testOne<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // testOne<long double>(); return true; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp index 1e74165602d8..ba90119fb0ec 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp @@ -69,7 +69,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp index 1b426959475a..f82fdf70bb23 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: !has-64-bit-atomics -// https://github.com/llvm/llvm-project/issues/72893 +// https://llvm.org/PR72893 // XFAIL: target={{x86_64-.*}} && tsan // floating-point-type fetch_add(floating-point-type, @@ -112,7 +112,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp index cac7352646fa..72fcc868072e 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17 // XFAIL: !has-64-bit-atomics -// https://github.com/llvm/llvm-project/issues/72893 +// https://llvm.org/PR72893 // XFAIL: target={{x86_64-.*}} && tsan // floating-point-type fetch_sub(floating-point-type, @@ -113,7 +113,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp index 2648b2914c1a..695fd593b51e 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp @@ -132,7 +132,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp index 95835c0030d3..84cd0a28b08b 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp @@ -54,7 +54,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp index 1e0be68da263..cddf7788e631 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp @@ -92,7 +92,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp index 7b5e668af026..da4c69280ffe 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp @@ -76,7 +76,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp index 268f0343f3be..1f0890606574 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp @@ -52,7 +52,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp index d38a2d2ed197..ac24e2842032 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp @@ -95,7 +95,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp index c53b0320036b..b80ea2390461 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp @@ -95,7 +95,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp index ad354f6630a3..34bd09e945f9 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp @@ -106,7 +106,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp index 500bcc879efc..32c67cc4762c 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp @@ -117,7 +117,7 @@ void test() { int main(int, char**) { test<float>(); test<double>(); - // TODO https://github.com/llvm/llvm-project/issues/47978 + // TODO https://llvm.org/PR48634 // test<long double>(); return 0; diff --git a/libcxx/test/std/atomics/types.pass.cpp b/libcxx/test/std/atomics/types.pass.cpp index 8737694e2a07..c979392290b3 100644 --- a/libcxx/test/std/atomics/types.pass.cpp +++ b/libcxx/test/std/atomics/types.pass.cpp @@ -68,7 +68,7 @@ struct test_atomic<T, /*Integral=*/true, false, false> { }; template <class T> -struct test_atomic<T, false, /*Foating=*/true, false> { +struct test_atomic<T, false, /*Floating=*/true, false> { test_atomic() { using A = std::atomic<T>; A a; diff --git a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp index e01a10b679ac..56c6cdd7e1e9 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp @@ -70,7 +70,7 @@ template <class Alloc, class AllocatorInvariant = NoOp> void test_alloc(const Alloc& lhs_alloc = Alloc(), const Alloc& rhs_alloc = Alloc(), AllocatorInvariant check_alloc_invariant = NoOp()) { - { // Test empty/non-empy map combinations + { // Test empty/non-empty map combinations { // assign from a non-empty container into an empty one using V = std::pair<const int, int>; using Map = std::map<int, int, std::less<int>, Alloc>; @@ -225,7 +225,7 @@ void test_alloc(const Alloc& lhs_alloc = Alloc(), } check_alloc_invariant(); } - { // Make a somewhat larget set to exercise the algorithm a bit + { // Make a somewhat larger set to exercise the algorithm a bit using V = std::pair<const int, int>; using Map = std::map<int, int, std::less<int>, Alloc>; diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp index 0baff65f6193..dfbeb33698e6 100644 --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp @@ -13,64 +13,188 @@ // template <class InputIterator> // void insert(InputIterator first, InputIterator last); -#include <map> +#include <array> #include <cassert> +#include <map> -#include "test_macros.h" #include "test_iterators.h" #include "min_allocator.h" -int main(int, char**) { - { - typedef std::map<int, double> M; - typedef std::pair<int, double> P; - P ar[] = { - P(1, 1), - P(1, 1.5), - P(1, 2), - P(2, 1), - P(2, 1.5), - P(2, 2), - P(3, 1), - P(3, 1.5), - P(3, 2), - }; - M m; - m.insert(cpp17_input_iterator<P*>(ar), cpp17_input_iterator<P*>(ar + sizeof(ar) / sizeof(ar[0]))); - assert(m.size() == 3); - assert(m.begin()->first == 1); - assert(m.begin()->second == 1); - assert(std::next(m.begin())->first == 2); - assert(std::next(m.begin())->second == 1); - assert(std::next(m.begin(), 2)->first == 3); - assert(std::next(m.begin(), 2)->second == 1); +template <class Iter, class Alloc> +void test_alloc() { + { // Check that an empty range works correctly + { // Without elements in the container + using Map = std::map<int, int, std::less<int>, Alloc>; + + std::array<std::pair<const int, int>, 0> arr; + + Map map; + map.insert(Iter(arr.data()), Iter(arr.data() + arr.size())); + assert(map.size() == 0); + assert(map.begin() == map.end()); + } + { // With 1 element in the container + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + std::array<Pair, 0> arr; + + Map map; + map.insert(Pair(0, 0)); + map.insert(Iter(arr.data()), Iter(arr.data() + arr.size())); + assert(map.size() == 1); + assert(*std::next(map.begin(), 0) == Pair(0, 0)); + assert(std::next(map.begin(), 1) == map.end()); + } + { // With multiple elements in the container + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + std::array<Pair, 0> arr; + + Map map; + map.insert(Pair(0, 0)); + map.insert(Pair(1, 1)); + map.insert(Pair(2, 2)); + map.insert(Iter(arr.data()), Iter(arr.data() + arr.size())); + assert(map.size() == 3); + assert(*std::next(map.begin(), 0) == Pair(0, 0)); + assert(*std::next(map.begin(), 1) == Pair(1, 1)); + assert(*std::next(map.begin(), 2) == Pair(2, 2)); + assert(std::next(map.begin(), 3) == map.end()); + } } -#if TEST_STD_VER >= 11 - { - typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M; - typedef std::pair<int, double> P; - P ar[] = { - P(1, 1), - P(1, 1.5), - P(1, 2), - P(2, 1), - P(2, 1.5), - P(2, 2), - P(3, 1), - P(3, 1.5), - P(3, 2), - }; - M m; - m.insert(cpp17_input_iterator<P*>(ar), cpp17_input_iterator<P*>(ar + sizeof(ar) / sizeof(ar[0]))); - assert(m.size() == 3); - assert(m.begin()->first == 1); - assert(m.begin()->second == 1); - assert(std::next(m.begin())->first == 2); - assert(std::next(m.begin())->second == 1); - assert(std::next(m.begin(), 2)->first == 3); - assert(std::next(m.begin(), 2)->second == 1); + { // Check that 1 element is inserted correctly + { // Without elements in the container + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + Pair arr[] = {Pair(1, 1)}; + + Map map; + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 1); + assert(*std::next(map.begin(), 0) == Pair(1, 1)); + assert(std::next(map.begin(), 1) == map.end()); + } + { // With 1 element in the container - a different key + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + Pair arr[] = {Pair(1, 1)}; + + Map map; + map.insert(Pair(0, 0)); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 2); + assert(*std::next(map.begin(), 0) == Pair(0, 0)); + assert(*std::next(map.begin(), 1) == Pair(1, 1)); + assert(std::next(map.begin(), 2) == map.end()); + } + { // With 1 element in the container - the same key + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + Pair arr[] = {Pair(1, 1)}; + + Map map; + map.insert(Pair(1, 2)); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 1); + assert(*std::next(map.begin(), 0) == Pair(1, 2)); + assert(std::next(map.begin(), 1) == map.end()); + } + { // With multiple elements in the container + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + Pair arr[] = {Pair(1, 1)}; + + Map map; + map.insert(Pair(0, 0)); + map.insert(Pair(1, 1)); + map.insert(Pair(2, 2)); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 3); + assert(*std::next(map.begin(), 0) == Pair(0, 0)); + assert(*std::next(map.begin(), 1) == Pair(1, 1)); + assert(*std::next(map.begin(), 2) == Pair(2, 2)); + assert(std::next(map.begin(), 3) == map.end()); + } } -#endif + { // Check that multiple elements are inserted correctly + { // Without elements in the container + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + Pair arr[] = {Pair(1, 1), Pair(1, 1), Pair(3, 3)}; + + Map map; + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 2); + assert(*std::next(map.begin(), 0) == Pair(1, 1)); + assert(*std::next(map.begin(), 1) == Pair(3, 3)); + assert(std::next(map.begin(), 2) == map.end()); + } + { // With 1 element in the container - a different key + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + Pair arr[] = {Pair(1, 1), Pair(1, 1), Pair(3, 3)}; + + Map map; + map.insert(Pair(0, 0)); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 3); + assert(*std::next(map.begin(), 0) == Pair(0, 0)); + assert(*std::next(map.begin(), 1) == Pair(1, 1)); + assert(*std::next(map.begin(), 2) == Pair(3, 3)); + assert(std::next(map.begin(), 3) == map.end()); + } + { // With 1 element in the container - the same key + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + Pair arr[] = {Pair(1, 1), Pair(2, 2), Pair(3, 3)}; + + Map map; + map.insert(Pair(1, 1)); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 3); + assert(*std::next(map.begin(), 0) == Pair(1, 1)); + assert(*std::next(map.begin(), 1) == Pair(2, 2)); + assert(*std::next(map.begin(), 2) == Pair(3, 3)); + assert(std::next(map.begin(), 3) == map.end()); + } + { // With multiple elements in the container + using Map = std::map<int, int, std::less<int>, Alloc>; + using Pair = std::pair<const int, int>; + + Pair arr[] = {Pair(1, 1), Pair(3, 3), Pair(4, 4)}; + + Map map; + map.insert(Pair(0, 0)); + map.insert(Pair(1, 1)); + map.insert(Pair(2, 2)); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 5); + assert(*std::next(map.begin(), 0) == Pair(0, 0)); + assert(*std::next(map.begin(), 1) == Pair(1, 1)); + assert(*std::next(map.begin(), 2) == Pair(2, 2)); + assert(*std::next(map.begin(), 3) == Pair(3, 3)); + assert(*std::next(map.begin(), 4) == Pair(4, 4)); + assert(std::next(map.begin(), 5) == map.end()); + } + } +} + +void test() { + test_alloc<cpp17_input_iterator<std::pair<const int, int>*>, std::allocator<std::pair<const int, int> > >(); + test_alloc<cpp17_input_iterator<std::pair<const int, int>*>, min_allocator<std::pair<const int, int> > >(); +} + +int main(int, char**) { + test(); return 0; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp index 5830283e9b0c..e52da3a4a631 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp @@ -68,7 +68,7 @@ template <class Alloc, class AllocatorInvariant = NoOp> void test_alloc(const Alloc& lhs_alloc = Alloc(), const Alloc& rhs_alloc = Alloc(), AllocatorInvariant check_alloc_invariant = NoOp()) { - { // Test empty/non-empy multimap combinations + { // Test empty/non-empty multimap combinations { // assign from a non-empty container into an empty one using V = std::pair<const int, int>; using Map = std::multimap<int, int, std::less<int>, Alloc>; @@ -223,7 +223,7 @@ void test_alloc(const Alloc& lhs_alloc = Alloc(), } check_alloc_invariant(); } - { // Make a somewhat larget set to exercise the algorithm a bit + { // Make a somewhat larger set to exercise the algorithm a bit using V = std::pair<const int, int>; using Map = std::multimap<int, int, std::less<int>, Alloc>; diff --git a/libcxx/test/std/containers/associative/multiset/emplace.pass.cpp b/libcxx/test/std/containers/associative/multiset/emplace.pass.cpp index bddfd8f62143..97cae1c56521 100644 --- a/libcxx/test/std/containers/associative/multiset/emplace.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/emplace.pass.cpp @@ -15,12 +15,12 @@ // template <class... Args> // iterator emplace(Args&&... args); -#include <set> #include <cassert> +#include <set> -#include "test_macros.h" #include "../../Emplaceable.h" #include "DefaultOnly.h" +#include "MoveOnly.h" #include "min_allocator.h" int main(int, char**) { @@ -77,6 +77,12 @@ int main(int, char**) { assert(m.size() == 1); assert(*r == 2); } + { // We're unwrapping pairs for `{,multi}map`. Make sure we're not trying to do that for multiset. + using Set = std::multiset<std::pair<MoveOnly, MoveOnly>>; + Set set; + auto iter = set.emplace(std::pair<MoveOnly, MoveOnly>(2, 4)); + assert(set.begin() == iter); + } return 0; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp index 8511f05ab57e..0a5fe62eed69 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp @@ -68,7 +68,7 @@ template <class Alloc, class AllocatorInvariant = NoOp> void test_alloc(const Alloc& lhs_alloc = Alloc(), const Alloc& rhs_alloc = Alloc(), AllocatorInvariant check_alloc_invariant = NoOp()) { - { // Test empty/non-empy multiset combinations + { // Test empty/non-empty multiset combinations { // assign from a non-empty container into an empty one using Set = std::multiset<int, std::less<int>, Alloc>; @@ -216,7 +216,7 @@ void test_alloc(const Alloc& lhs_alloc = Alloc(), assert(std::next(orig.begin(), 3) == orig.end()); } check_alloc_invariant(); - { // Make a somewhat larget multiset to exercise the algorithm a bit + { // Make a somewhat larger multiset to exercise the algorithm a bit using Set = std::multiset<int, std::less<int>, Alloc>; Set orig(rhs_alloc); diff --git a/libcxx/test/std/containers/associative/set/emplace.pass.cpp b/libcxx/test/std/containers/associative/set/emplace.pass.cpp index e038de77d48a..e5a9f9590aad 100644 --- a/libcxx/test/std/containers/associative/set/emplace.pass.cpp +++ b/libcxx/test/std/containers/associative/set/emplace.pass.cpp @@ -15,12 +15,12 @@ // template <class... Args> // pair<iterator, bool> emplace(Args&&... args); -#include <set> #include <cassert> +#include <set> -#include "test_macros.h" #include "../../Emplaceable.h" #include "DefaultOnly.h" +#include "MoveOnly.h" #include "min_allocator.h" int main(int, char**) { @@ -84,6 +84,13 @@ int main(int, char**) { assert(m.size() == 1); assert(*r.first == 2); } + { // We're unwrapping pairs for `{,multi}map`. Make sure we're not trying to do that for set. + using Set = std::set<std::pair<MoveOnly, MoveOnly>>; + Set set; + auto res = set.emplace(std::pair<MoveOnly, MoveOnly>(2, 4)); + assert(std::get<1>(res)); + assert(set.begin() == std::get<0>(res)); + } return 0; } diff --git a/libcxx/test/std/containers/associative/set/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/associative/set/insert_iter_iter.pass.cpp index 6c9707ca31a8..8576c63a72de 100644 --- a/libcxx/test/std/containers/associative/set/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_iter_iter.pass.cpp @@ -13,38 +13,178 @@ // template <class InputIterator> // void insert(InputIterator first, InputIterator last); -#include <set> +#include <array> #include <cassert> +#include <set> -#include "test_macros.h" -#include "test_iterators.h" #include "min_allocator.h" +#include "test_iterators.h" -int main(int, char**) { - { - typedef std::set<int> M; - typedef int V; - V ar[] = {1, 1, 1, 2, 2, 2, 3, 3, 3}; - M m; - m.insert(cpp17_input_iterator<const V*>(ar), cpp17_input_iterator<const V*>(ar + sizeof(ar) / sizeof(ar[0]))); - assert(m.size() == 3); - assert(*m.begin() == 1); - assert(*std::next(m.begin()) == 2); - assert(*std::next(m.begin(), 2) == 3); +template <class Iter, class Alloc> +void test_alloc() { + { // Check that an empty range works correctly + { // Without elements in the container + using Map = std::set<int, std::less<int>, Alloc>; + + std::array<int, 0> arr; + + Map map; + map.insert(Iter(arr.data()), Iter(arr.data() + arr.size())); + assert(map.size() == 0); + assert(map.begin() == map.end()); + } + { // With 1 element in the container + using Map = std::set<int, std::less<int>, Alloc>; + + std::array<int, 0> arr; + + Map map; + map.insert(0); + map.insert(Iter(arr.data()), Iter(arr.data() + arr.size())); + assert(map.size() == 1); + assert(*std::next(map.begin(), 0) == 0); + assert(std::next(map.begin(), 1) == map.end()); + } + { // With multiple elements in the container + using Map = std::set<int, std::less<int>, Alloc>; + + std::array<int, 0> arr; + + Map map; + map.insert(0); + map.insert(1); + map.insert(2); + map.insert(Iter(arr.data()), Iter(arr.data() + arr.size())); + assert(map.size() == 3); + assert(*std::next(map.begin(), 0) == 0); + assert(*std::next(map.begin(), 1) == 1); + assert(*std::next(map.begin(), 2) == 2); + assert(std::next(map.begin(), 3) == map.end()); + } } -#if TEST_STD_VER >= 11 - { - typedef std::set<int, std::less<int>, min_allocator<int>> M; - typedef int V; - V ar[] = {1, 1, 1, 2, 2, 2, 3, 3, 3}; - M m; - m.insert(cpp17_input_iterator<const V*>(ar), cpp17_input_iterator<const V*>(ar + sizeof(ar) / sizeof(ar[0]))); - assert(m.size() == 3); - assert(*m.begin() == 1); - assert(*std::next(m.begin()) == 2); - assert(*std::next(m.begin(), 2) == 3); + { // Check that 1 element is inserted correctly + { // Without elements in the container + using Map = std::set<int, std::less<int>, Alloc>; + + int arr[] = {1}; + + Map map; + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 1); + assert(*std::next(map.begin(), 0) == 1); + assert(std::next(map.begin(), 1) == map.end()); + } + { // With 1 element in the container - a different key + using Map = std::set<int, std::less<int>, Alloc>; + + int arr[] = {1}; + + Map map; + map.insert(0); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 2); + assert(*std::next(map.begin(), 0) == 0); + assert(*std::next(map.begin(), 1) == 1); + assert(std::next(map.begin(), 2) == map.end()); + } + { // With 1 element in the container - the same key + using Map = std::set<int, std::less<int>, Alloc>; + + int arr[] = {1}; + + Map map; + map.insert(1); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 1); + assert(*std::next(map.begin(), 0) == 1); + assert(std::next(map.begin(), 1) == map.end()); + } + { // With multiple elements in the container + using Map = std::set<int, std::less<int>, Alloc>; + + int arr[] = {1}; + + Map map; + map.insert(0); + map.insert(1); + map.insert(2); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 3); + assert(*std::next(map.begin(), 0) == 0); + assert(*std::next(map.begin(), 1) == 1); + assert(*std::next(map.begin(), 2) == 2); + assert(std::next(map.begin(), 3) == map.end()); + } + } + { // Check that multiple elements are inserted correctly + { // Without elements in the container + using Map = std::set<int, std::less<int>, Alloc>; + + int arr[] = {1, 1, 3}; + + Map map; + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 2); + assert(*std::next(map.begin(), 0) == 1); + assert(*std::next(map.begin(), 1) == 3); + assert(std::next(map.begin(), 2) == map.end()); + } + { // With 1 element in the container - a different key + using Map = std::set<int, std::less<int>, Alloc>; + + int arr[] = {1, 1, 3}; + + Map map; + map.insert(0); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 3); + assert(*std::next(map.begin(), 0) == 0); + assert(*std::next(map.begin(), 1) == 1); + assert(*std::next(map.begin(), 2) == 3); + assert(std::next(map.begin(), 3) == map.end()); + } + { // With 1 element in the container - the same key + using Map = std::set<int, std::less<int>, Alloc>; + + int arr[] = {1, 2, 3}; + + Map map; + map.insert(1); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 3); + assert(*std::next(map.begin(), 0) == 1); + assert(*std::next(map.begin(), 1) == 2); + assert(*std::next(map.begin(), 2) == 3); + assert(std::next(map.begin(), 3) == map.end()); + } + { // With multiple elements in the container + using Map = std::set<int, std::less<int>, Alloc>; + + int arr[] = {1, 3, 4}; + + Map map; + map.insert(0); + map.insert(1); + map.insert(2); + map.insert(Iter(std::begin(arr)), Iter(std::end(arr))); + assert(map.size() == 5); + assert(*std::next(map.begin(), 0) == 0); + assert(*std::next(map.begin(), 1) == 1); + assert(*std::next(map.begin(), 2) == 2); + assert(*std::next(map.begin(), 3) == 3); + assert(*std::next(map.begin(), 4) == 4); + assert(std::next(map.begin(), 5) == map.end()); + } } -#endif +} + +void test() { + test_alloc<cpp17_input_iterator<int*>, std::allocator<int> >(); + test_alloc<cpp17_input_iterator<int*>, min_allocator<int> >(); +} + +int main(int, char**) { + test(); return 0; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp index 85bc4e761f2c..dd1dbc86190f 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp @@ -70,7 +70,7 @@ template <class Alloc, class AllocatorInvariant = NoOp> void test_alloc(const Alloc& lhs_alloc = Alloc(), const Alloc& rhs_alloc = Alloc(), AllocatorInvariant check_alloc_invariant = NoOp()) { - { // Test empty/non-empy set combinations + { // Test empty/non-empty set combinations { // assign from a non-empty container into an empty one using Set = std::set<int, std::less<int>, Alloc>; @@ -218,7 +218,7 @@ void test_alloc(const Alloc& lhs_alloc = Alloc(), assert(std::next(orig.begin(), 3) == orig.end()); } check_alloc_invariant(); - { // Make a somewhat larget set to exercise the algorithm a bit + { // Make a somewhat larger set to exercise the algorithm a bit using Set = std::set<int, std::less<int>, Alloc>; Set orig(rhs_alloc); diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move_assign_noexcept.compile.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move_assign_noexcept.compile.pass.cpp index 18d332cf27b5..c727f7e51eb2 100644 --- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move_assign_noexcept.compile.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move_assign_noexcept.compile.pass.cpp @@ -51,7 +51,7 @@ struct MoveThrowsComp { void test() { { - using C = std::flat_map<int, int>; + using C [[maybe_unused]] = std::flat_map<int, int>; LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable_v<C>); } { @@ -73,7 +73,7 @@ void test() { static_assert(!std::is_nothrow_move_assignable_v<C>); } { - using C = + using C [[maybe_unused]] = std::flat_map<MoveOnly, int, std::less<MoveOnly>, @@ -82,7 +82,7 @@ void test() { LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable_v<C>); } { - using C = + using C [[maybe_unused]] = std::flat_map<int, MoveOnly, std::less<int>, @@ -92,7 +92,7 @@ void test() { } { // Test with a comparator that throws on move-assignment. - using C = std::flat_map<int, int, MoveThrowsComp>; + using C [[maybe_unused]] = std::flat_map<int, int, MoveThrowsComp>; LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable_v<C>); } { diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.erasure/erase_if_exceptions.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.erasure/erase_if_exceptions.pass.cpp index 48fdec42db3f..c0e31dc38426 100644 --- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.erasure/erase_if_exceptions.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.erasure/erase_if_exceptions.pass.cpp @@ -66,7 +66,8 @@ struct ErasurePredicate { }; int main(int, char**) { - const std::pair<int, int> expected[] = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 7}, {8, 8}}; + [[maybe_unused]] const std::pair<int, int> expected[] = { + {1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 7}, {8, 8}}; { using M = std::flat_map<ThrowingAssignment, int, ThrowingComparator>; for (int first_throw = 1; first_throw < 99; ++first_throw) { diff --git a/libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons/move_assign_noexcept.compile.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons/move_assign_noexcept.compile.pass.cpp index 1aa40759fada..5f86bb336f13 100644 --- a/libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons/move_assign_noexcept.compile.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons/move_assign_noexcept.compile.pass.cpp @@ -51,7 +51,7 @@ struct MoveThrowsComp { void test() { { - using C = std::flat_multimap<int, int>; + using C [[maybe_unused]] = std::flat_multimap<int, int>; LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable_v<C>); } { @@ -73,7 +73,7 @@ void test() { static_assert(!std::is_nothrow_move_assignable_v<C>); } { - using C = + using C [[maybe_unused]] = std::flat_multimap<MoveOnly, int, std::less<MoveOnly>, @@ -82,7 +82,7 @@ void test() { LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable_v<C>); } { - using C = + using C [[maybe_unused]] = std::flat_multimap<int, MoveOnly, std::less<int>, @@ -92,7 +92,7 @@ void test() { } { // Test with a comparator that throws on move-assignment. - using C = std::flat_multimap<int, int, MoveThrowsComp>; + using C [[maybe_unused]] = std::flat_multimap<int, int, MoveThrowsComp>; LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable_v<C>); } { diff --git a/libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.erasure/erase_if_exceptions.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.erasure/erase_if_exceptions.pass.cpp index 13b57202f786..95f7e11626a4 100644 --- a/libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.erasure/erase_if_exceptions.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.erasure/erase_if_exceptions.pass.cpp @@ -68,7 +68,8 @@ struct ErasurePredicate { }; int main(int, char**) { - const std::pair<int, int> expected[] = {{1, 1}, {2, 2}, {3, 3}, {3, 3}, {5, 5}, {6, 6}, {7, 7}, {8, 8}}; + [[maybe_unused]] const std::pair<int, int> expected[] = { + {1, 1}, {2, 2}, {3, 3}, {3, 3}, {5, 5}, {6, 6}, {7, 7}, {8, 8}}; { using M = std::flat_multimap<ThrowingAssignment, int, ThrowingComparator>; for (int first_throw = 1; first_throw < 99; ++first_throw) { diff --git a/libcxx/test/std/containers/container.adaptors/flat.set/flat.set.erasure/erase_if_exceptions.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.set/flat.set.erasure/erase_if_exceptions.pass.cpp index 37b4a40f0165..11cc12aaeabf 100644 --- a/libcxx/test/std/containers/container.adaptors/flat.set/flat.set.erasure/erase_if_exceptions.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/flat.set/flat.set.erasure/erase_if_exceptions.pass.cpp @@ -66,7 +66,7 @@ struct ErasurePredicate { }; void test() { - const int expected[] = {1, 2, 3, 4, 5, 6, 7, 8}; + [[maybe_unused]] const int expected[] = {1, 2, 3, 4, 5, 6, 7, 8}; { using M = std::flat_set<ThrowingAssignment, ThrowingComparator>; for (int first_throw = 1; first_throw < 99; ++first_throw) { diff --git a/libcxx/test/std/containers/sequences/array/array.cons/initialization.pass.cpp b/libcxx/test/std/containers/sequences/array/array.cons/initialization.pass.cpp index 0bca4299c851..6d5427f3e363 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/initialization.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/initialization.pass.cpp @@ -20,7 +20,7 @@ struct NoDefault { struct test_initialization { template <typename T> TEST_CONSTEXPR_CXX14 void operator()() const { - // Check default initalization + // Check default initialization { std::array<T, 0> a0; (void)a0; diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/from_range.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/from_range.pass.cpp index cfc07ab7bc79..3b3632a3d3c6 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/from_range.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/from_range.pass.cpp @@ -28,7 +28,7 @@ int main(int, char**) { static_assert(test_constraints<std::deque, int, double>()); // TODO(varconst): `deque`'s constructors currently aren't exception-safe. - // See https://github.com/llvm/llvm-project/issues/62056. + // See https://llvm.org/PR62056. //test_exception_safety_throwing_copy<std::deque>(); //test_exception_safety_throwing_allocator<std::deque, int>(); diff --git a/libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp index d2e48b351fc7..58b73415f1a7 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp @@ -24,8 +24,6 @@ // ... // }; -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <forward_list> #include <type_traits> diff --git a/libcxx/test/std/containers/sequences/list/types.pass.cpp b/libcxx/test/std/containers/sequences/list/types.pass.cpp index 755c8bf4df29..7075f6eff0b2 100644 --- a/libcxx/test/std/containers/sequences/list/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/types.pass.cpp @@ -21,8 +21,6 @@ // typedef typename allocator_type::pointer pointer; // typedef typename allocator_type::const_pointer const_pointer; -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <list> #include <type_traits> diff --git a/libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp index 30efe047054a..665867a7bad4 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp @@ -80,7 +80,7 @@ TEST_CONSTEXPR_CXX20 bool tests() { } #if TEST_STD_VER >= 23 -// https://github.com/llvm/llvm-project/issues/95161 +// https://llvm.org/PR95161 constexpr bool test_increasing_allocator() { std::vector<bool, increasing_allocator<bool>> v; v.push_back(1); diff --git a/libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp index 95e4c18cc798..0136fb063160 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp @@ -12,7 +12,7 @@ // XFAIL: FROZEN-CXX03-HEADERS-FIXME // This test ensures that std::vector<bool> handles allocator types with small size types -// properly. Related issue: https://github.com/llvm/llvm-project/issues/121713. +// properly. Related issue: https://llvm.org/PR121713. #include <cassert> #include <cstddef> diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp index a3f44f33028e..af57e5ffc5cf 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp @@ -66,7 +66,7 @@ TEST_CONSTEXPR_CXX20 bool tests() { #if TEST_STD_VER >= 11 - // Test with various allocators and diffrent size_type + // Test with various allocators and different size_type { test(std::vector<int>()); test(std::vector<short, std::allocator<short> >()); diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp index 48eb6ed85d47..bbea48364c1f 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp @@ -74,7 +74,7 @@ TEST_CONSTEXPR_CXX20 bool tests() { } #if TEST_STD_VER >= 23 -// https://github.com/llvm/llvm-project/issues/95161 +// https://llvm.org/PR95161 constexpr bool test_increasing_allocator() { std::vector<int, increasing_allocator<int>> v; v.push_back(1); diff --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit_exceptions.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit_exceptions.pass.cpp index 521a25fdeda0..0bc3387e26b8 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit_exceptions.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit_exceptions.pass.cpp @@ -39,7 +39,7 @@ void test_allocation_exception_for_strong_guarantee(std::vector<T, Alloc>& v, co } catch (...) { } - // As shrink_to_fit may swallow any exceptions, we place the checks outisde the catch block. + // As shrink_to_fit may swallow any exceptions, we place the checks outside the catch block. assert(v.data() == old_data); assert(v.size() == old_size); assert(v.capacity() == old_cap); diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp index 6549735f7b51..1a6364a8018b 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp @@ -79,7 +79,7 @@ TEST_CONSTEXPR_CXX20 void basic_test_cases() { test<std::vector<int, safe_allocator<int> > >( random_access_iterator<const int*>(a), random_access_iterator<const int*>(an)); - // Regression test for https://github.com/llvm/llvm-project/issues/46841 + // Regression test for https://llvm.org/PR47497 { std::vector<int> v1({}, forward_iterator<const int*>{}); std::vector<int> v2(forward_iterator<const int*>{}, {}); diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp index 019f427c006a..d1eff51011c4 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp @@ -90,7 +90,7 @@ TEST_CONSTEXPR_CXX20 void basic_tests() { test<std::vector<int, safe_allocator<int> > >(a, an, alloc); } - // Regression test for https://github.com/llvm/llvm-project/issues/46841 + // Regression test for https://llvm.org/PR47497 { min_allocator<int> alloc; std::vector<int, min_allocator<int> > v1({}, forward_iterator<const int*>{}, alloc); diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp index f8a2bdd3fee7..a8a9f5fdbb42 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp @@ -91,6 +91,20 @@ int main(int, char**) { assert(c.size() == 0); assert(k == c.end()); } + { // Make sure we're properly destroying the elements when erasing + { // When erasing part of a bucket + std::unordered_multimap<int, std::string> map; + map.insert(std::make_pair(1, "This is a long string to make sure ASan can detect a memory leak")); + map.insert(std::make_pair(1, "This is another long string to make sure ASan can detect a memory leak")); + map.erase(++map.begin(), map.end()); + } + { // When erasing the whole bucket + std::unordered_multimap<int, std::string> map; + map.insert(std::make_pair(1, "This is a long string to make sure ASan can detect a memory leak")); + map.insert(std::make_pair(1, "This is another long string to make sure ASan can detect a memory leak")); + map.erase(map.begin(), map.end()); + } + } #if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, diff --git a/libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp index 886ddd74efd4..434f205f90b9 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp @@ -17,11 +17,11 @@ // template <class... Args> // iterator emplace(Args&&... args); -#include <unordered_set> #include <cassert> +#include <unordered_set> -#include "test_macros.h" #include "../../Emplaceable.h" +#include "MoveOnly.h" #include "min_allocator.h" int main(int, char**) { @@ -59,6 +59,15 @@ int main(int, char**) { assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } + { // We're unwrapping pairs for `unordered_{,multi}map`. Make sure we're not trying to do that for unordered_multiset. + struct PairHasher { + size_t operator()(const std::pair<MoveOnly, MoveOnly>& val) const { return std::hash<MoveOnly>()(val.first); } + }; + using Set = std::unordered_multiset<std::pair<MoveOnly, MoveOnly>, PairHasher>; + Set set; + auto iter = set.emplace(std::pair<MoveOnly, MoveOnly>(2, 4)); + assert(set.begin() == iter); + } return 0; } diff --git a/libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp index 8972f03f2d2a..24e85a1ab7f5 100644 --- a/libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp @@ -17,11 +17,11 @@ // template <class... Args> // pair<iterator, bool> emplace(Args&&... args); -#include <unordered_set> #include <cassert> +#include <unordered_set> -#include "test_macros.h" #include "../../Emplaceable.h" +#include "MoveOnly.h" #include "min_allocator.h" int main(int, char**) { @@ -65,6 +65,16 @@ int main(int, char**) { assert(*r.first == Emplaceable(5, 6)); assert(!r.second); } + { // We're unwrapping pairs for `unordered_{,multi}map`. Make sure we're not trying to do that for unordered_set. + struct PairHasher { + size_t operator()(const std::pair<MoveOnly, MoveOnly>& val) const { return std::hash<MoveOnly>()(val.first); } + }; + using Set = std::unordered_set<std::pair<MoveOnly, MoveOnly>, PairHasher>; + Set set; + auto res = set.emplace(std::pair<MoveOnly, MoveOnly>(2, 4)); + assert(std::get<1>(res)); + assert(set.begin() == std::get<0>(res)); + } return 0; } diff --git a/libcxx/test/std/containers/views/mdspan/aligned_accessor/access.pass.cpp b/libcxx/test/std/containers/views/mdspan/aligned_accessor/access.pass.cpp index deca1226e47c..91a910899abc 100644 --- a/libcxx/test/std/containers/views/mdspan/aligned_accessor/access.pass.cpp +++ b/libcxx/test/std/containers/views/mdspan/aligned_accessor/access.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" // We are not using MinimalElementType.h because MinimalElementType is not -// default consructible and uninitialized storage does not work in constexpr. +// default constructible and uninitialized storage does not work in constexpr. // Same as MinimalElementType but with a defaulted default constructor struct MyMinimalElementType { diff --git a/libcxx/test/std/containers/views/mdspan/aligned_accessor/offset.pass.cpp b/libcxx/test/std/containers/views/mdspan/aligned_accessor/offset.pass.cpp index 66c30da787a8..3ed8cd752017 100644 --- a/libcxx/test/std/containers/views/mdspan/aligned_accessor/offset.pass.cpp +++ b/libcxx/test/std/containers/views/mdspan/aligned_accessor/offset.pass.cpp @@ -23,7 +23,7 @@ #include "test_macros.h" // We are not using MinimalElementType.h because MinimalElementType is not -// default consructible and uninitialized storage does not work in constexpr. +// default constructible and uninitialized storage does not work in constexpr. // Same as MinimalElementType but with a defaulted default constructor struct MyMinimalElementType { diff --git a/libcxx/test/std/containers/views/mdspan/mdspan/conversion.pass.cpp b/libcxx/test/std/containers/views/mdspan/mdspan/conversion.pass.cpp index 63a673f87b41..b587d904a061 100644 --- a/libcxx/test/std/containers/views/mdspan/mdspan/conversion.pass.cpp +++ b/libcxx/test/std/containers/views/mdspan/mdspan/conversion.pass.cpp @@ -232,7 +232,7 @@ int main(int, char**) { test<t, o, t, t, t, t, t, t, conv_test_accessor_c<int, t, t, o, o>>(conv_test_accessor_nc<int, t, o>()); // FIXME: these tests trigger what appears to be a compiler bug on MINGW32 with --target=x86_64-w64-windows-gnu // https://godbolt.org/z/KK8aj5bs7 -// Bug report: https://github.com/llvm/llvm-project/issues/64077 +// Bug report: https://llvm.org/PR64077 #ifndef __MINGW32__ test<t, t, t, o, t, t, t, t, conv_test_accessor_c<int, o, t, t, t>>(conv_test_accessor_nc<int, t, t>()); test<t, t, t, t, t, t, t, t, conv_test_accessor_c<int, o, o, o, o>>(conv_test_accessor_nc<int, t, o>()); diff --git a/libcxx/test/std/containers/views/views.span/span.cons/copy.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/copy.pass.cpp index d3990fd60a45..aa284c58171f 100644 --- a/libcxx/test/std/containers/views/views.span/span.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/copy.pass.cpp @@ -95,7 +95,7 @@ constexpr bool test_all() { test<std::string>(); test<const std::string>(); - // Regression test for https://github.com/llvm/llvm-project/issues/104496 + // Regression test for https://llvm.org/PR104496 { struct Incomplete; std::span<Incomplete> x; diff --git a/libcxx/test/std/containers/views/views.span/span.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/initializer_list.pass.cpp index bc76e23fea3c..b413b71ec945 100644 --- a/libcxx/test/std/containers/views/views.span/span.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/views/views.span/span.cons/initializer_list.pass.cpp @@ -34,7 +34,7 @@ static_assert(!ConstElementType<std::span<int>>); static_assert(ConstElementType<std::span<const int, 94>>); static_assert(!ConstElementType<std::span<int, 94>>); -// Constructor constraings +// Constructor constraints template <typename I, typename T, std::size_t... N> concept HasInitializerListCtr = requires(I il) { std::span<T, N...>{il}; }; diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/lwg3629.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/lwg3629.pass.cpp index 076530b7007a..cbc002e5e7c3 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/lwg3629.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/lwg3629.pass.cpp @@ -12,7 +12,7 @@ // template <ErrorCodeEnum E> error_code(E e); -// Regression test for https://github.com/llvm/llvm-project/issues/57614 +// Regression test for https://llvm.org/PR57614 int make_error_code; // It's important that this comes before <system_error> diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/lwg3629.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/lwg3629.pass.cpp index 4bea503ec042..f327ef1fab7e 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/lwg3629.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/lwg3629.pass.cpp @@ -12,7 +12,7 @@ // template <ErrorCodeEnum E> error_code& operator=(E e); -// Regression test for https://github.com/llvm/llvm-project/issues/57614 +// Regression test for https://llvm.org/PR57614 int make_error_code; // It's important that this comes before <system_error> diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/lwg3629.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/lwg3629.pass.cpp index f1e2d9a2ba34..efada2447861 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/lwg3629.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/lwg3629.pass.cpp @@ -12,7 +12,7 @@ // template <ErrorCodeEnum E> error_condition(E e); -// Regression test for https://github.com/llvm/llvm-project/issues/57614 +// Regression test for https://llvm.org/PR57614 int make_error_condition; // It's important that this comes before <system_error> diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/lwg3629.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/lwg3629.pass.cpp index 014f14a9fd82..3292d0bb1a6c 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/lwg3629.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/lwg3629.pass.cpp @@ -12,7 +12,7 @@ // template <ErrorCodeEnum E> error_condition& operator=(E e); -// Regression test for https://github.com/llvm/llvm-project/issues/57614 +// Regression test for https://llvm.org/PR57614 int make_error_condition; // It's important that this comes before <system_error> diff --git a/libcxx/test/std/double_include.gen.py b/libcxx/test/std/double_include.gen.py index fcf3b9a8fa2e..f019710be55b 100644 --- a/libcxx/test/std/double_include.gen.py +++ b/libcxx/test/std/double_include.gen.py @@ -8,9 +8,10 @@ # Test that we can include each header in two TU's and link them together. -# RUN: %{python} %s %{libcxx-dir}/utils +# We're using compiler-specific flags in this test +# REQUIRES: (gcc || clang) -# Block Lit from interpreting a RUN/XFAIL/etc inside the generation script. +# RUN: %{python} %s %{libcxx-dir}/utils # END. import sys @@ -28,9 +29,6 @@ for header in public_headers: {lit_header_restrictions.get(header, '')} {lit_header_undeprecations.get(header, '')} -// We're using compiler-specific flags in this test -// REQUIRES: (gcc || clang) - // RUN: %{{cxx}} -c %s -o %t.first.o %{{flags}} %{{compile_flags}} // RUN: %{{cxx}} -c %s -o %t.second.o -DWITH_MAIN %{{flags}} %{{compile_flags}} // RUN: %{{cxx}} -o %t.exe %t.first.o %t.second.o %{{flags}} %{{link_flags}} diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp index b64b86f1b05e..4f9f26cb4587 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp @@ -11,6 +11,7 @@ #include <experimental/type_traits> #include <string> +#include <utility> #include "test_macros.h" diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp index 4a977917f1ec..6960c71abb33 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp @@ -11,6 +11,7 @@ #include <experimental/type_traits> #include <string> +#include <utility> #include "test_macros.h" diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp index 6906461f1edc..de1d223b9189 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp @@ -11,6 +11,7 @@ #include <experimental/type_traits> #include <string> +#include <utility> #include "test_macros.h" diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp index 500187e86dd0..2161c11e7d2c 100644 --- a/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp +++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp @@ -11,6 +11,7 @@ #include <experimental/type_traits> #include <string> +#include <utility> #include "test_macros.h" diff --git a/libcxx/test/std/header_inclusions.gen.py b/libcxx/test/std/header_inclusions.gen.py index 8ff93810069f..cebff94fdd1a 100644 --- a/libcxx/test/std/header_inclusions.gen.py +++ b/libcxx/test/std/header_inclusions.gen.py @@ -9,6 +9,11 @@ # Test that all headers include all the other headers they're supposed to, as # prescribed by the Standard. +# UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME + +# TODO: This is currently a libc++-specific way of testing the includes, but is a requirement for all implementation +# REQUIRES: stdlib=libc++ + # RUN: %{python} %s %{libcxx-dir}/utils # END. @@ -46,11 +51,6 @@ for header in public_headers: print( f"""\ //--- {header}.compile.pass.cpp -// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME - -// TODO: This is currently a libc++-specific way of testing the includes, but is a requirement for all implementation -// REQUIRES: stdlib=libc++ - {lit_header_restrictions.get(header, '')} {lit_header_undeprecations.get(header, '')} diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap_min.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap_min.pass.cpp index 6981360cef4f..0e86a399f4dc 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap_min.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap_min.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // This tests that swapping filebufs works correctly even when the small buffer -// optimization is in use (https://github.com/llvm/llvm-project/issues/49282). +// optimization is in use (https://llvm.org/PR49938). // <fstream> diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp index 8008901802e9..f6378e7998ee 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp @@ -29,7 +29,6 @@ int main(int, char**) | std::ios_base::trunc) != 0); assert(f.is_open()); f.sputn("abcdefghijklmnopqrstuvwxyz", 26); - LIBCPP_ASSERT(buf[0] == 'v'); pos_type p = f.pubseekoff(-15, std::ios_base::cur); assert(p == 11); assert(f.sgetc() == 'l'); diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp index 4e3afc17ad49..9d14abcedd42 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp @@ -13,7 +13,7 @@ // basic_streambuf<charT, traits>* setbuf(char_type* s, streamsize n) override; -// This test requires the fix to https://github.com/llvm/llvm-project/issues/60509 in the dylib, +// This test requires the fix to https://llvm.org/PR60509 in the dylib, // which landed in 5afb937d8a30445642ccaf33866ee4cdd0713222. // XFAIL: using-built-library-before-llvm-19 diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/xsputn.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/xsputn.pass.cpp new file mode 100644 index 000000000000..2d6be5cf527a --- /dev/null +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/xsputn.pass.cpp @@ -0,0 +1,149 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03 + +// <fstream> + +// streamsize xsputn(const char_type*, streamsize) override; + +// This isn't a required override by the standard, but most implementations override it, since it allows for +// significantly improved performance in some cases. All of this code is required to work, so this isn't a libc++ +// extension + +#include <algorithm> +#include <cassert> +#include <codecvt> +#include <cstring> +#include <fstream> +#include <locale> +#include <vector> + +#include "test_macros.h" + +typedef std::filebuf::pos_type pos_type; +typedef std::filebuf::off_type off_type; + +void sputn_seekoff(char* buf, + const size_t buf_size, + const std::streamsize chunk_size1, + const off_type offset1, + const std::streamsize chunk_size2) { + std::string data{"abcdefghijklmnopqrstuvwxyz"}; + const std::streamsize data_size = static_cast<std::streamsize>(data.size()); + assert(chunk_size1 <= data_size); + assert(chunk_size2 <= data_size); + // vector with expected data in the file to be written + std::size_t result_size = 5 + chunk_size1 + chunk_size2 + 1; + if (offset1 > 0) { + result_size += offset1; + } + std::vector<char> result(result_size, 0); + { + std::filebuf f; + f.pubsetbuf(buf, buf_size); + assert(f.open("sputn_seekoff.dat", std::ios_base::out) != 0); + assert(f.is_open()); + + assert(f.pubseekoff(off_type(5), std::ios_base::beg) = off_type(5)); + + std::vector<char> chunk(data.begin() + 5, data.begin() + 5 + chunk_size1); + std::copy(chunk.begin(), chunk.end(), result.begin() + 5); + const std::streamsize len1 = f.sputn(chunk.data(), chunk_size1); + assert(len1 == chunk_size1); + // check that nothing in the original chunk was modified by sputn() + assert(std::strncmp(chunk.data(), data.substr(5, len1).c_str(), len1) == 0); + + pos_type p1 = f.pubseekoff(offset1, std::ios_base::cur); + char c; + if (p1 < 0) { + p1 = f.pubseekoff(0, std::ios_base::beg); + assert(p1 == 0); + c = '^'; + } else { + assert(p1 == 5 + len1 + offset1); + if (p1 > data_size) { + c = '_'; + } else { + c = data[p1]; + } + } + + result[p1] = c; + assert(f.sputc(c) == c); + + f.pubseekpos(std::ios_base::beg); + result[0] = 'A'; + assert(f.sputc(toupper(data[0])) == 'A'); + + pos_type end_pos = f.pubseekoff(off_type(0), std::ios_base::end); + assert(f.sputc(toupper(data[data_size - 1])) == 'Z'); + result[end_pos] = 'Z'; + + assert(f.pubseekpos(p1) == p1); + result[p1] = toupper(c); + assert(f.sputc(toupper(c)) == toupper(c)); + + pos_type new_pos = result_size - chunk_size2; + pos_type p2 = f.pubseekoff(new_pos, std::ios_base::beg); + assert(p2 == new_pos); + chunk = std::vector<char>(data.end() - chunk_size2, data.end()); + std::copy(chunk.begin(), chunk.end(), result.begin() + p2); + const std::streamsize len2 = f.sputn(chunk.data(), chunk_size2); + assert(len2 == chunk_size2); + assert(std::strncmp(chunk.data(), data.substr(data_size - chunk_size2, chunk_size2).c_str(), len2) == 0); + f.close(); + } + std::filebuf f; + assert(f.open("sputn_seekoff.dat", std::ios_base::in) != 0); + assert(f.is_open()); + std::vector<char> check(result.size(), -1); + const std::size_t len = f.sgetn(check.data(), check.size()); + assert(len == result.size()); + for (size_t i = 0; i < len; ++i) { + assert(check[i] == result[i]); + } +} + +void sputn_not_open() { + std::vector<char> data(10, 'a'); + std::filebuf f; + std::streamsize len = f.sputn(data.data(), data.size()); + assert(len == 0); + assert(std::strncmp(data.data(), "aaaaaaaaaa", 10) == 0); +} + +#ifndef TEST_HAS_NO_WIDE_CHARACTERS +void sputn_not_open_wchar() { + std::vector<wchar_t> data(10, L'a'); + std::wfilebuf f; + std::streamsize len = f.sputn(data.data(), data.size()); + assert(len == 0); + assert(std::wcsncmp(data.data(), L"aaaaaaaaaa", 10) == 0); +} +#endif + +int main(int, char**) { + sputn_not_open(); +#ifndef TEST_HAS_NO_WIDE_CHARACTERS + sputn_not_open_wchar(); +#endif + + sputn_seekoff(nullptr, 10, 21, -27, 1); + sputn_seekoff(nullptr, 10, 1, -27, 1); + sputn_seekoff(nullptr, 10, 10, 14, 12); + sputn_seekoff(nullptr, 10, 1, -2, 1); + sputn_seekoff(nullptr, 10, 10, -4, 12); + sputn_seekoff(nullptr, 10, 11, -12, 3); + sputn_seekoff(nullptr, 10, 7, 3, 8); + sputn_seekoff(nullptr, 10, 5, -5, 12); + sputn_seekoff(nullptr, 10, 1, 1, 1); + sputn_seekoff(nullptr, 10, 9, 0, 1); + + return 0; +} diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp index 3bebf38a2a7c..56e35736d4f7 100644 --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp @@ -132,7 +132,7 @@ void test_compare_basic() { AssertOrderReturn<std::strong_ordering, path>(); #endif - // check comarison results + // check comparison results assert(testComparisons(p1, p2, /*isEqual*/ E == 0, /*isLess*/ E < 0)); #if TEST_STD_VER > 17 assert(testOrder(p1, p2, E <=> 0)); diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/cache_refresh_iter.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/cache_refresh_iter.pass.cpp index 3d45828968de..ff7035096e70 100644 --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/cache_refresh_iter.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/cache_refresh_iter.pass.cpp @@ -147,7 +147,7 @@ static void test_cached_values_in_iteration() { const std::set<fs::path> dir_contents(static_env.RecDirIterationList.begin(), static_env.RecDirIterationList.end()); dir_entries = get_directory_entries_for(testDir, dir_contents); } - // Testing folder should be deleted after destoying static_test_env. + // Testing folder should be deleted after destroying static_test_env. for (const auto& dir_entry : dir_entries) { // During iteration Windows provides information only about symlink itself diff --git a/libcxx/test/std/input.output/iostream.format/print.fun/includes.compile.pass.cpp b/libcxx/test/std/input.output/iostream.format/print.fun/includes.compile.pass.cpp index 38e4e4d3fb9e..7d17d5066613 100644 --- a/libcxx/test/std/input.output/iostream.format/print.fun/includes.compile.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/print.fun/includes.compile.pass.cpp @@ -18,7 +18,7 @@ // using the granularized headers so it's possible to implement <print> without // <format>. This would be a non-conforming implementation. // -// See https://github.com/llvm/llvm-project/issues/71925 +// See https://llvm.org/PR71925 #include <print> #include <vector> diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/fpos.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/fpos.pass.cpp index c3d3e0cfc411..8e2f84fba0de 100644 --- a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/fpos.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/fpos.pass.cpp @@ -14,6 +14,7 @@ #include <cassert> #include <ios> #include <type_traits> +#include <utility> #include "test_macros.h" diff --git a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.global.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.global.pass.cpp index ac6a7213bb72..9046f0885a10 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.global.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.global.pass.cpp @@ -8,7 +8,7 @@ #include <iostream> -// FIXME: Remove after issue https://github.com/llvm/llvm-project/issues/127348 resolved. +// FIXME: Remove after issue https://llvm.org/PR127348 resolved. extern "C" const char* __asan_default_options() { return "check_initialization_order=true:strict_init_order=true"; } // Test that ios used from globals constructors doesn't trigger Asan initialization-order-fiasco. diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.allocator_propagation.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.allocator_propagation.pass.cpp index ab41103aa856..0effb69be227 100644 --- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.allocator_propagation.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.allocator_propagation.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // This test ensures that we properly propagate allocators from istringstream's diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.allocator_propagation.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.allocator_propagation.pass.cpp index a5ee2afab11e..dc57c912121d 100644 --- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.allocator_propagation.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.allocator_propagation.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // This test ensures that we properly propagate allocators from ostringstream's diff --git a/libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/str.allocator_propagation.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/str.allocator_propagation.pass.cpp index 46a9213eaf91..7aa51254974f 100644 --- a/libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/str.allocator_propagation.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/str.allocator_propagation.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // This test ensures that we properly propagate allocators from stringstream's diff --git a/libcxx/test/std/iterators/iterator.range/mandatory_inclusions.gen.py b/libcxx/test/std/iterators/iterator.range/mandatory_inclusions.gen.py index 46290b1ed52a..34ede107e5ed 100644 --- a/libcxx/test/std/iterators/iterator.range/mandatory_inclusions.gen.py +++ b/libcxx/test/std/iterators/iterator.range/mandatory_inclusions.gen.py @@ -12,6 +12,8 @@ # <list>, <map>, <regex>, <set>, <span>, <string>, <string_view>, <unordered_map>, # <unordered_set>, <vector>. +# UNSUPPORTED: c++03 + # RUN: %{python} %s %{libcxx-dir}/utils # END. @@ -53,7 +55,6 @@ for header in headers: //--- {header}.pass.cpp {lit_header_restrictions.get(header, '')} {lit_header_undeprecations.get(header, '')} -// UNSUPPORTED: c++03 #include <{header}> #include <cassert> diff --git a/libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_result_t.compile.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_result_t.compile.pass.cpp index 1dfdc609e636..e999b20345a5 100644 --- a/libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_result_t.compile.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/indirectcallable/indirectinvocable/indirect_result_t.compile.pass.cpp @@ -34,8 +34,6 @@ static_assert(!has_indirect_result<int, int*>); // int isn't invocable // Test ADL-proofing (P2538R1) #if TEST_STD_VER >= 26 || defined(_LIBCPP_VERSION) -// TODO: Enable this on GCC once this bug is fixed: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111419 -#ifndef TEST_COMPILER_GCC struct Incomplete; template<class T> struct Holder { T t; }; static_assert(std::same_as<std::indirect_result_t<int (&)(int), int*>, int>); @@ -45,4 +43,3 @@ static_assert(std::same_as<std::indirect_result_t<int (&)(Holder< static_assert(std::same_as<std::indirect_result_t<Holder<Incomplete>&(&)(Holder<Incomplete>*), Holder<Incomplete>**>, Holder<Incomplete>&>); static_assert(std::same_as<std::indirect_result_t<Holder<Incomplete>*(&)(Holder<Incomplete>*), Holder<Incomplete>**>, Holder<Incomplete>*>); #endif -#endif diff --git a/libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected.compile.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected.compile.pass.cpp index 06d1171c370a..7ab92660fb06 100644 --- a/libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected.compile.pass.cpp +++ b/libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected.compile.pass.cpp @@ -61,4 +61,4 @@ constexpr bool projectable = requires { static_assert(!projectable<int, void (*)(int)>); // int isn't indirectly_readable static_assert(!projectable<S, void (*)(int)>); // S isn't weakly_incrementable -static_assert(!projectable<int*, void(int)>); // void(int) doesn't satisfy indirectly_regular_unary_invcable +static_assert(!projectable<int*, void(int)>); // void(int) doesn't satisfy indirectly_regular_unary_invocable diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp index 050f4ac7cc6d..7474a8d3dde9 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp @@ -27,9 +27,9 @@ TEST_CONSTEXPR_CXX14 bool test_constexpr() { return true; } -struct thowing_copy_constructor { - thowing_copy_constructor() {} - thowing_copy_constructor(const thowing_copy_constructor&) TEST_NOEXCEPT_FALSE {} +struct throwing_copy_constructor { + throwing_copy_constructor() {} + throwing_copy_constructor(const throwing_copy_constructor&) TEST_NOEXCEPT_FALSE {} }; int main(int, char**) @@ -43,11 +43,11 @@ int main(int, char**) #endif } { - std::istream_iterator<thowing_copy_constructor> io; - std::istream_iterator<thowing_copy_constructor> i = io; - assert(i == std::istream_iterator<thowing_copy_constructor>()); + std::istream_iterator<throwing_copy_constructor> io; + std::istream_iterator<throwing_copy_constructor> i = io; + assert(i == std::istream_iterator<throwing_copy_constructor>()); #if TEST_STD_VER >= 11 - static_assert(!std::is_nothrow_copy_constructible<std::istream_iterator<thowing_copy_constructor>>::value, ""); + static_assert(!std::is_nothrow_copy_constructible<std::istream_iterator<throwing_copy_constructor>>::value, ""); #endif } { diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_overlong.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_overlong.pass.cpp index 8fe74cdaca5e..0b7a38e5104c 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_overlong.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_overlong.pass.cpp @@ -16,8 +16,6 @@ // Ensure that money_get::do_get correct works when the input doesn't fit into the stack buffer // (100 characters currently). -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <cassert> #include <cstddef> #include <ios> diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp index 06a974ad1bee..8db40b9e0dcb 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp @@ -1858,7 +1858,7 @@ void test2() { // 64 mantissa bits are grouped by nibble as they are stored in the long // double representation (nibble aligned at the end of the least significant // bits). This makes 1.0L to be formatted as "0x8p-3" (where the leading - // bit of the mantissa is the higest bit in the 0x8 nibble), and makes + // bit of the mantissa is the highest bit in the 0x8 nibble), and makes // __LDBL_MAX__ be formatted as "0xf.fffffffffffffffp+16380". // // FreeBSD normalizes/aligns the leading bit of the mantissa as a separate diff --git a/libcxx/test/std/numerics/c.math/cmath.pass.cpp b/libcxx/test/std/numerics/c.math/cmath.pass.cpp index 1f7c697784c1..e02ac3446e82 100644 --- a/libcxx/test/std/numerics/c.math/cmath.pass.cpp +++ b/libcxx/test/std/numerics/c.math/cmath.pass.cpp @@ -1210,7 +1210,7 @@ void test_hypot() assert(std::hypot(1,4,8) == 9); // Check for undue over-/underflows of intermediate results. - // See discussion at https://github.com/llvm/llvm-project/issues/92782. + // See discussion at https://llvm.org/PR92782. types::for_each(types::floating_point_types(), TestHypot3()); #endif } diff --git a/libcxx/test/std/numerics/c.math/hermite.pass.cpp b/libcxx/test/std/numerics/c.math/hermite.pass.cpp index f1a37c5ddc15..290595094258 100644 --- a/libcxx/test/std/numerics/c.math/hermite.pass.cpp +++ b/libcxx/test/std/numerics/c.math/hermite.pass.cpp @@ -319,7 +319,7 @@ void test() { static_assert(sizeof(double) == 8); for (unsigned n = 0; n < get_maximal_order<Real>(); ++n) { // Q: Why n=111 and x=300? - // A: Both are chosen s.t. the first overlow occurs for some `n<get_maximal_order<Real>()`. + // A: Both are chosen s.t. the first overflow occurs for some `n<get_maximal_order<Real>()`. if (n < 111) { assert(std::isfinite(std::hermite(n, +300.0))); assert(std::isfinite(std::hermite(n, -300.0))); diff --git a/libcxx/test/std/numerics/complex.number/complex.special/gh_101960_ambiguous_ctor.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/gh_101960_ambiguous_ctor.pass.cpp index bffe8764386a..2bff5808852a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/gh_101960_ambiguous_ctor.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/gh_101960_ambiguous_ctor.pass.cpp @@ -8,8 +8,7 @@ // <complex> -// Regression test for https://github.com/llvm/llvm-project/issues/101960 where we used to -// trigger an ambiguous constructor. +// Regression test for https://llvm.org/PR101960 where we used to trigger an ambiguous constructor. #include <complex> #include <cassert> diff --git a/libcxx/test/std/numerics/complex.number/complex/bit_cast.pass.cpp b/libcxx/test/std/numerics/complex.number/complex/bit_cast.pass.cpp index c35d4d6c6329..e2aaf416f0e4 100644 --- a/libcxx/test/std/numerics/complex.number/complex/bit_cast.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex/bit_cast.pass.cpp @@ -8,8 +8,7 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17 -// Make sure that std::bit_cast works with std::complex. Test case extracted from -// https://github.com/llvm/llvm-project/issues/94620. +// Make sure that std::bit_cast works with std::complex. Test case extracted from https://llvm.org/PR94620. #include <bit> #include <complex> diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp index 15a2b03bf84b..594b99bc0958 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp @@ -21,7 +21,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // Validate the function works for valarray, the proxies, and __val_expr. diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp index e4fe675a9ec3..8c1fb2afd96f 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp @@ -21,7 +21,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // Validate the function works for valarray, the proxies, and __val_expr. diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp index 54aa7fd4c269..6e13d2618b6b 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp @@ -21,7 +21,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // Validate the function works for valarray, the proxies, and __val_expr. diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp index e52097ae68e2..1246ab35547b 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp @@ -21,7 +21,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // Validate the function works for valarray, the proxies, and __val_expr. diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp index 429953e272b6..9387fccbf153 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp @@ -21,7 +21,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // Validate the function works for valarray, the proxies, and __val_expr. diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp index 6aacf4f68b98..d1737a016e53 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp @@ -21,7 +21,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // Validate the function works for valarray, the proxies, and __val_expr. diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp index 3ff264308f88..cb1af636cde5 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp @@ -19,7 +19,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // Validate the function works for valarray, the proxies, and __val_expr. diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp index 140ec4dad5f4..11bbf01ea687 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp @@ -19,7 +19,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // valarray& operator>>=(const valarray& v); diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp index 58361fa697b6..10333ee91029 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp @@ -19,7 +19,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // valarray& operator*=(const valarray& v); diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp index 0b3ffe4f9324..484189e806be 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp @@ -19,7 +19,7 @@ // // The const overloads of // valarray::operator[](...) const -// return propxy objects. These proxies are implicitly convertible to +// return proxy objects. These proxies are implicitly convertible to // std::valarray. // // valarray& operator^=(const valarray& v); diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp index edd6d9fef0d7..11329207f185 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp @@ -149,7 +149,7 @@ int main(int argc, char**) assert(res1 == 1324997410816LL); } - // https://github.com/llvm/llvm-project/issues/96196 + // https://llvm.org/PR96196 { assert(test_limits<unsigned int>()); assert(test_limits<std::uint32_t>()); diff --git a/libcxx/test/std/ranges/range.adaptors/range.as.rvalue/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.as.rvalue/adaptor.pass.cpp index dbe15238ebc8..12ae84c3fb34 100644 --- a/libcxx/test/std/ranges/range.adaptors/range.as.rvalue/adaptor.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.as.rvalue/adaptor.pass.cpp @@ -48,6 +48,18 @@ struct move_iterator_range { static_assert(!std::ranges::view<move_iterator_range>); static_assert(std::ranges::range<move_iterator_range>); +// LWG4083: views::as_rvalue should reject non-input ranges +struct I { + int operator*(); + using difference_type = int; + I& operator++(); + void operator++(int); +}; +static_assert(!std::is_invocable_v<decltype(std::views::as_rvalue), + decltype(std::ranges::subrange{I{}, std::unreachable_sentinel})>); +static_assert( + !HasPipe<decltype(std::ranges::subrange{I{}, std::unreachable_sentinel}), decltype(std::views::as_rvalue)>); + constexpr bool test() { { // view | views::as_rvalue DefaultConstructibleView v{{}, 3}; diff --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h index 5cd400d495c8..41b49974d97b 100644 --- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h +++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h @@ -60,7 +60,7 @@ struct ForwardDiffView : std::ranges::view_base { constexpr explicit ForwardDiffView() = default; constexpr ForwardDiffView(const char* ptr) : ForwardDiffView(std::string_view(ptr)) {} constexpr ForwardDiffView(std::string_view v) { - // Workaround https://github.com/llvm/llvm-project/issues/55867 + // Workaround https://llvm.org/PR55867 buffer_ = v; } constexpr ForwardDiffView(ForwardDiffView&&) = default; @@ -144,7 +144,7 @@ struct InputView : std::ranges::view_base { constexpr InputView() = default; constexpr InputView(const char* s) : InputView(std::string_view(s)) {} constexpr InputView(std::string_view v) { - // Workaround https://github.com/llvm/llvm-project/issues/55867 + // Workaround https://llvm.org/PR55867 buffer_ = v; } diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip.transform/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip.transform/general.pass.cpp index 3c35de27deb6..4b057946abba 100644 --- a/libcxx/test/std/ranges/range.adaptors/range.zip.transform/general.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.zip.transform/general.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 -// Some basic examples of how zip_tranform_view might be used in the wild. This is a general +// Some basic examples of how zip_transform_view might be used in the wild. This is a general // collection of sample algorithms and functions that try to mock general usage of // this view. diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp index b894bc542be1..8563b85f65db 100644 --- a/libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp @@ -91,7 +91,7 @@ constexpr bool test() { } // Make sure iota_view<short, short> works properly. For details, - // see https://github.com/llvm/llvm-project/issues/67551. + // see https://llvm.org/PR67551. { static_assert(std::ranges::sized_range<std::ranges::iota_view<short, short>>); std::ranges::iota_view<short, short> io(10, 20); diff --git a/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp index 202b5bba451c..0643ee6b192b 100644 --- a/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp @@ -146,7 +146,7 @@ static_assert(!std::ranges::enable_view<const PrivateInherit>); static_assert(!std::ranges::enable_view<volatile PrivateInherit>); static_assert(!std::ranges::enable_view<const volatile PrivateInherit>); -// https://github.com/llvm/llvm-project/issues/132577 +// https://llvm.org/PR132577 // enable_view<view_interface<T>> should be false. static_assert(!std::ranges::enable_view<std::ranges::view_interface<V1>>); static_assert(!std::ranges::enable_view<const std::ranges::view_interface<V1>>); diff --git a/libcxx/test/std/ranges/ranges_robust_against_no_unique_address.pass.cpp b/libcxx/test/std/ranges/ranges_robust_against_no_unique_address.pass.cpp index 06186656f012..505ed2e77ae3 100644 --- a/libcxx/test/std/ranges/ranges_robust_against_no_unique_address.pass.cpp +++ b/libcxx/test/std/ranges/ranges_robust_against_no_unique_address.pass.cpp @@ -9,7 +9,7 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17 // Test that views that use __movable_box do not overwrite overlapping subobjects. -// https://github.com/llvm/llvm-project/issues/70506 +// https://llvm.org/PR70506 #include <cassert> #include <ranges> diff --git a/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp index ac660d8fe994..45a52acab464 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp @@ -8,8 +8,6 @@ // UNSUPPORTED: no-exceptions -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <string> // size_type max_size() const; // constexpr since C++20 diff --git a/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp index a3b16c8da16c..230852445e92 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp @@ -63,7 +63,7 @@ TEST_CONSTEXPR_CXX20 bool test() { #if TEST_STD_VER >= 23 { // Make sure shrink_to_fit never increases capacity - // See: https://github.com/llvm/llvm-project/issues/95161 + // See: https://llvm.org/PR95161 std::basic_string<char, std::char_traits<char>, increasing_allocator<char>> s{ "String does not fit in the internal buffer"}; std::size_t capacity = s.capacity(); diff --git a/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp index b0045cb4afbb..c4fd5afe83a4 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp @@ -65,16 +65,6 @@ template <typename T, typename U> bool operator!=(const poca_alloc<T>& lhs, const poca_alloc<U>& rhs) { return lhs.imp != rhs.imp; } - -template <class S> -TEST_CONSTEXPR_CXX20 void test_assign(S& s1, const S& s2) { - try { - s1 = s2; - } catch (std::bad_alloc&) { - return; - } - assert(false); -} #endif template <class S> @@ -122,7 +112,11 @@ TEST_CONSTEXPR_CXX20 bool test() { assert(s2 == p2); imp2.deactivate(); - test_assign(s1, s2); + try { + s1 = s2; + assert(false); + } catch (std::bad_alloc&) { + } assert(s1 == p1); assert(s2 == p2); } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp index 425a481b7163..8a13f11cf156 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <string> // basic_string<charT,traits,Allocator>& diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string.string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string.string_view.pass.cpp index 388b9ffd3b16..0f1c7fde4770 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string.string_view.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string.string_view.pass.cpp @@ -120,9 +120,9 @@ constexpr void test(const CharT* x, const CharT* y, const CharT* expected) { } // string_view + string&& { - // TODO: Remove workaround once https://github.com/llvm/llvm-project/issues/92382 is fixed. + // TODO: Remove workaround once https://llvm.org/PR92382 is fixed. // Create a `basic_string` to workaround clang bug: - // https://github.com/llvm/llvm-project/issues/92382 + // https://llvm.org/PR92382 // Comparison between pointers to a string literal and some other object results in constant evaluation failure. if constexpr (std::same_as<StringViewT<CharT, TraitsT>, std::basic_string_view<CharT, TraitsT>>) { std::basic_string<CharT, TraitsT, AllocT> st_{x, allocator}; diff --git a/libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp b/libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp index 4e087fd4226d..70009589e985 100644 --- a/libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp @@ -8,7 +8,7 @@ // // UNSUPPORTED: no-threads, no-exceptions -// ASan seems to try to create threadsm which obviouly doesn't work in this test. +// ASan seems to try to create threadsm which obviously doesn't work in this test. // UNSUPPORTED: asan, hwasan // UNSUPPORTED: c++03 diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/type.verify.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/type.verify.cpp index 72171c99a612..7deaffd4d2d7 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/type.verify.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/type.verify.cpp @@ -12,7 +12,7 @@ // <future> // Verify that the non-conforming extension packaged_task::result_type is removed. -// See https://github.com/llvm/llvm-project/issues/112856. +// See https://llvm.org/PR112856. #include <future> diff --git a/libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp b/libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp index fd5a1705c56a..8527af1344e2 100644 --- a/libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp +++ b/libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp @@ -112,7 +112,7 @@ int main(int, char**) { assert(j1.get_id() == j2Id); } - // LWG3788: self-assignement + // LWG3788: self-assignment { std::jthread j = support::make_test_jthread([] {}); auto oldId = j.get_id(); diff --git a/libcxx/test/std/thread/thread.jthread/join.deadlock.pass.cpp b/libcxx/test/std/thread/thread.jthread/join.deadlock.pass.cpp index 21fbacde36cb..d71f80296e9b 100644 --- a/libcxx/test/std/thread/thread.jthread/join.deadlock.pass.cpp +++ b/libcxx/test/std/thread/thread.jthread/join.deadlock.pass.cpp @@ -10,7 +10,7 @@ // it would dead lock the test // UNSUPPORTED: windows -// TSAN bug: https://github.com/llvm/llvm-project/issues/66537 +// TSAN bug: https://llvm.org/PR66537 // UNSUPPORTED: tsan // UNSUPPORTED: no-threads diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp index ea5b63d2804a..121705f2e3a9 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp @@ -8,8 +8,6 @@ // UNSUPPORTED: no-threads -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - // <mutex> // struct once_flag; diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/cmp.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/cmp.pass.cpp index 7be937aa948c..2ef27ce60fc9 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/cmp.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/cmp.pass.cpp @@ -51,7 +51,7 @@ int main(int, char**) { assert(testOrder(id1, id3, isLess ? std::strong_ordering::less : std::strong_ordering::greater)); #endif - // Regression tests for https://github.com/llvm/llvm-project/issues/56187 + // Regression tests for https://llvm.org/PR56187 // libc++ previously declared the comparison operators as hidden friends // which was non-conforming. assert(std::operator==(id1, id2)); diff --git a/libcxx/test/std/time/time.duration/time.duration.nonmember/ostream.pass.cpp b/libcxx/test/std/time/time.duration/time.duration.nonmember/ostream.pass.cpp index a25711fc970c..4e84db9a84d7 100644 --- a/libcxx/test/std/time/time.duration/time.duration.nonmember/ostream.pass.cpp +++ b/libcxx/test/std/time/time.duration/time.duration.nonmember/ostream.pass.cpp @@ -215,7 +215,7 @@ static void test_units() { template <class CharT> static void test_unsigned_types() { - // Reported in https://github.com/llvm/llvm-project/issues/96820 + // Reported in https://llvm.org/PR96820 using namespace std::literals::chrono_literals; // C locale diff --git a/libcxx/test/std/time/time.hms/time.hms.nonmembers/ostream.pass.cpp b/libcxx/test/std/time/time.hms/time.hms.nonmembers/ostream.pass.cpp index 6ee419fc07c0..e281098de55d 100644 --- a/libcxx/test/std/time/time.hms/time.hms.nonmembers/ostream.pass.cpp +++ b/libcxx/test/std/time/time.hms/time.hms.nonmembers/ostream.pass.cpp @@ -63,7 +63,7 @@ template <class CharT> static void test() { // Note std::atto can't be tested since the ratio conversion from std::atto // std::chrono::seconds to std::chrono::hours overflows when intmax_t is a - // 64-bit type. This is a limitiation in the constructor of + // 64-bit type. This is a limitation in the constructor of // std::chrono::hh_mm_ss. // C locale - integral power of 10 ratios diff --git a/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp b/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp index 20918927bf24..973bce8f81d4 100644 --- a/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp +++ b/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp @@ -1163,7 +1163,7 @@ static void test_pr62082() { template <class CharT> static void test_unsigned_duration() { - // Reported in https://github.com/llvm/llvm-project/issues/96820 + // Reported in https://llvm.org/PR96820 using namespace std::literals::chrono_literals; check(SV("1as"), SV("{}"), std::chrono::duration<unsigned short, std::atto>(1)); diff --git a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.local_time.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.local_time.pass.cpp index 76dd8bc746fc..1d0234468f41 100644 --- a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.local_time.pass.cpp +++ b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.local_time.pass.cpp @@ -1017,8 +1017,8 @@ static void test_europe_dublin() { static void test_america_st_johns() { // A more typical entry, - // Uses letters both when DST is ative and not and has multiple - // letters. Uses negetive offsets. + // Uses letters both when DST is active and not and has multiple + // letters. Uses negative offsets. // Switches several times between their own and Canadian rules // Switches the stdoff from -3:30:52 to -3:30 while observing the same rule diff --git a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.sys_time.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.sys_time.pass.cpp index 1a1705d5ae59..1924af4bd671 100644 --- a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.sys_time.pass.cpp +++ b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.sys_time.pass.cpp @@ -34,7 +34,7 @@ // The data in the tests can be validated by using the zdump tool. For // example // zdump -v Asia/Hong_Kong -// show all transistions in the Hong Kong time zone. Or +// show all transitions in the Hong Kong time zone. Or // zdump -c1970,1980 -v Asia/Hong_Kong // shows all transitions in Hong Kong between 1970 and 1980. @@ -177,7 +177,7 @@ static void test_antarctica_syowa() { // This change uses an ON field with a day number // // There don't seem to be rule-less zones that use last day or a - // contrained day + // constrained day // Z Antarctica/Syowa 0 - -00 1957 Ja 29 // 3 - +03 @@ -605,8 +605,8 @@ static void test_europe_berlin() { static void test_america_st_johns() { // A more typical entry, - // Uses letters both when DST is ative and not and has multiple - // letters. Uses negetive offsets. + // Uses letters both when DST is active and not and has multiple + // letters. Uses negative offsets. // Switches several times between their own and Canadian rules // Switches the stdoff from -3:30:52 to -3:30 while observing the same rule @@ -1036,7 +1036,7 @@ static void test_africa_freetown() { using namespace std::literals::chrono_literals; const std::chrono::time_zone* tz = std::chrono::locate_zone("Africa/Freetown"); - // When a continuation has a named rule, the tranisition time determined by + // When a continuation has a named rule, the transition time determined by // the active rule can be wrong. The next continuation may set the clock to an // earlier time. This is tested for San Luis. This tests the rule is not used // when the rule is not a named rule. diff --git a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys_choose.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys_choose.pass.cpp index 1147c9fadf9a..b2dbdb1bb66b 100644 --- a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys_choose.pass.cpp +++ b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys_choose.pass.cpp @@ -141,7 +141,7 @@ static void test_ambiguous() { assert(tz->to_sys(time + 0ms, std::chrono::choose::earliest) == earlier); assert(tz->to_sys(time + 0s, std::chrono::choose::latest) == later); - // Test times in the ambigious hour + // Test times in the ambiguous hour assert(tz->to_sys(time + 1s, std::chrono::choose::earliest) == earlier + 1s); assert(tz->to_sys(time + 1min, std::chrono::choose::latest) == later + 1min); assert(tz->to_sys(time + 30min, std::chrono::choose::earliest) == earlier + 30min); diff --git a/libcxx/test/std/time/time.zone/time.zone.zonedtime/types.compile.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.zonedtime/types.compile.pass.cpp index 497da859265c..96f17b38f862 100644 --- a/libcxx/test/std/time/time.zone/time.zone.zonedtime/types.compile.pass.cpp +++ b/libcxx/test/std/time/time.zone/time.zone.zonedtime/types.compile.pass.cpp @@ -58,7 +58,7 @@ static_assert(std::is_copy_assignable_v<std::chrono::zoned_time<std::chrono::day static_assert(std::is_move_assignable_v<std::chrono::zoned_time<std::chrono::days, int>>); // Test with a move only type, since the copy constructor is defined, no move -// constuctor is generated. +// constructor is generated. static_assert(!std::is_copy_constructible_v<std::chrono::zoned_time< std::chrono::days, std::unique_ptr<int>>>); static_assert(!std::is_move_constructible_v<std::chrono::zoned_time< std::chrono::days, std::unique_ptr<int>>>); static_assert(!std::is_copy_assignable_v<std::chrono::zoned_time< std::chrono::days, std::unique_ptr<int>>>); diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp index 1135eadbb95f..73b2ad513ead 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp @@ -112,7 +112,7 @@ int main(int, char**) { ""); } { - // Test construction from convertible-to-allocator types (https://github.com/llvm/llvm-project/issues/78754) + // Test construction from convertible-to-allocator types (https://llvm.org/PR78754) typedef std::scoped_allocator_adaptor<A1<int>, A1<int>> A; A a(A1<char>(4), A1<char>(5)); assert(a.outer_allocator() == A1<int>(4)); diff --git a/libcxx/test/std/utilities/allocator.adaptor/base-is-uglified.compile.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/base-is-uglified.compile.pass.cpp index 2581ac079dc5..dc53e2a63277 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/base-is-uglified.compile.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/base-is-uglified.compile.pass.cpp @@ -13,7 +13,7 @@ // This test ensures that we don't use a non-uglified name 'base' in the // implementation of scoped_allocator_adaptor. // -// See https://github.com/llvm/llvm-project/issues/78754. +// See https://llvm.org/PR78754. #include <memory> #include <scoped_allocator> diff --git a/libcxx/test/std/utilities/charconv/charconv.from.chars/floating_point.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.from.chars/floating_point.pass.cpp index 6faf0499c4c9..a02c7ac466f0 100644 --- a/libcxx/test/std/utilities/charconv/charconv.from.chars/floating_point.pass.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.from.chars/floating_point.pass.cpp @@ -396,7 +396,7 @@ struct test_fixed { assert(x == F(-0.5)); } - { // double deciamal point + { // double decimal point const char* s = "1.25.78"; // This number is halfway between two float values. @@ -405,7 +405,7 @@ struct test_fixed { assert(r.ptr == s + 4); assert(x == F(1.25)); } - { // exponenent no sign + { // exponent no sign const char* s = "1.5e10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::fixed); @@ -413,7 +413,7 @@ struct test_fixed { assert(r.ptr == s + 3); assert(x == F(1.5)); } - { // exponenent capitalized no sign + { // exponent capitalized no sign const char* s = "1.5E10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::fixed); @@ -421,7 +421,7 @@ struct test_fixed { assert(r.ptr == s + 3); assert(x == F(1.5)); } - { // exponenent + sign + { // exponent + sign const char* s = "1.5e+10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::fixed); @@ -429,7 +429,7 @@ struct test_fixed { assert(r.ptr == s + 3); assert(x == F(1.5)); } - { // exponenent - sign + { // exponent - sign const char* s = "1.5e-10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::fixed); @@ -739,7 +739,7 @@ struct test_scientific { assert(x == F(1.0)); } - { // double deciamal point + { // double decimal point const char* s = "1.25e0.78"; // This number is halfway between two float values. @@ -749,7 +749,7 @@ struct test_scientific { assert(x == F(1.25)); } - { // exponenent no sign + { // exponent no sign const char* s = "1.5e10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::scientific); @@ -757,7 +757,7 @@ struct test_scientific { assert(r.ptr == s + 6); assert(x == F(1.5e10)); } - { // exponenent capitalized no sign + { // exponent capitalized no sign const char* s = "1.5E10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::scientific); @@ -765,7 +765,7 @@ struct test_scientific { assert(r.ptr == s + 6); assert(x == F(1.5e10)); } - { // exponenent + sign + { // exponent + sign const char* s = "1.5e+10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::scientific); @@ -773,7 +773,7 @@ struct test_scientific { assert(r.ptr == s + 7); assert(x == F(1.5e10)); } - { // exponenent - sign + { // exponent - sign const char* s = "1.5e-10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::scientific); @@ -958,7 +958,7 @@ struct test_general { assert(r.ptr == s + 3); assert(x == F(-0.5)); } - { // double deciamal point + { // double decimal point const char* s = "1.25.78"; // This number is halfway between two float values. @@ -967,7 +967,7 @@ struct test_general { assert(r.ptr == s + 4); assert(x == F(1.25)); } - { // exponenent no sign + { // exponent no sign const char* s = "1.5e10"; r = std::from_chars(s, s + std::strlen(s), x); @@ -975,7 +975,7 @@ struct test_general { assert(r.ptr == s + 6); assert(x == F(1.5e10)); } - { // exponenent capitalized no sign + { // exponent capitalized no sign const char* s = "1.5E10"; r = std::from_chars(s, s + std::strlen(s), x); @@ -983,7 +983,7 @@ struct test_general { assert(r.ptr == s + 6); assert(x == F(1.5e10)); } - { // exponenent + sign + { // exponent + sign const char* s = "1.5e+10"; r = std::from_chars(s, s + std::strlen(s), x); @@ -991,7 +991,7 @@ struct test_general { assert(r.ptr == s + 7); assert(x == F(1.5e10)); } - { // exponenent - sign + { // exponent - sign const char* s = "1.5e-10"; r = std::from_chars(s, s + std::strlen(s), x); @@ -1278,7 +1278,7 @@ struct test_hex { assert(r.ptr == s + 3); assert(x == F(-0x0.5p0)); } - { // double deciamal point + { // double decimal point const char* s = "1.25.78"; // This number is halfway between two float values. @@ -1287,7 +1287,7 @@ struct test_hex { assert(r.ptr == s + 4); assert(x == F(0x1.25p0)); } - { // exponenent no sign + { // exponent no sign const char* s = "1.5p10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::hex); @@ -1295,7 +1295,7 @@ struct test_hex { assert(r.ptr == s + 6); assert(x == F(0x1.5p10)); } - { // exponenent capitalized no sign + { // exponent capitalized no sign const char* s = "1.5P10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::hex); @@ -1303,7 +1303,7 @@ struct test_hex { assert(r.ptr == s + 6); assert(x == F(0x1.5p10)); } - { // exponenent + sign + { // exponent + sign const char* s = "1.5p+10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::hex); @@ -1311,7 +1311,7 @@ struct test_hex { assert(r.ptr == s + 7); assert(x == F(0x1.5p10)); } - { // exponenent - sign + { // exponent - sign const char* s = "1.5p-10"; r = std::from_chars(s, s + std::strlen(s), x, std::chars_format::hex); diff --git a/libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.copy.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.copy.pass.cpp index 028655412c92..f8975a677674 100644 --- a/libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.copy.pass.cpp +++ b/libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.copy.pass.cpp @@ -123,7 +123,7 @@ constexpr bool test() { { // TODO: Drop this once AppleClang is upgraded #ifndef TEST_COMPILER_APPLE_CLANG - // https://github.com/llvm/llvm-project/issues/92676 + // https://llvm.org/PR92676 std::expected<Any, int> e1; auto e2 = e1; assert(e2.has_value()); diff --git a/libcxx/test/std/utilities/expected/expected.expected/observers/has_value.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/observers/has_value.pass.cpp index 6111d7a35113..43ca96eb1156 100644 --- a/libcxx/test/std/utilities/expected/expected.expected/observers/has_value.pass.cpp +++ b/libcxx/test/std/utilities/expected/expected.expected/observers/has_value.pass.cpp @@ -56,7 +56,7 @@ constexpr bool test() { // The other tests use a synthetic struct that clobbers its tail padding // on construction, making the issue easier to reproduce. // - // See https://github.com/llvm/llvm-project/issues/68552 and the linked PR. + // See https://llvm.org/PR68552 and the linked PR. { auto f1 = []() -> std::expected<std::optional<int>, long> { return 0; }; diff --git a/libcxx/test/std/utilities/expected/types.h b/libcxx/test/std/utilities/expected/types.h index df73ebdfe495..ff5fc2e4c814 100644 --- a/libcxx/test/std/utilities/expected/types.h +++ b/libcxx/test/std/utilities/expected/types.h @@ -157,7 +157,7 @@ struct MoveOnlyErrorType { // tail padding. With this type we can check that `std::expected` handles // the case where the "has value" flag is an overlapping subobject correctly. // -// See https://github.com/llvm/llvm-project/issues/68552 for details. +// See https://llvm.org/PR68552 for details. template <int Constant> struct TailClobberer { constexpr TailClobberer() noexcept { @@ -200,9 +200,8 @@ static_assert(std::is_nothrow_move_constructible_v<TailClobbererNonTrivialMove<0 static_assert(!std::is_nothrow_move_constructible_v<TailClobbererNonTrivialMove<0, false>>); // The `CheckForInvalidWrites` class recreates situations where other objects -// may be placed into a `std::expected`'s tail padding (see -// https://github.com/llvm/llvm-project/issues/70494). With a template -// parameter `WithPaddedExpected` two cases can be tested: +// may be placed into a `std::expected`'s tail padding (see https://llvm.org/PR70494). +// With a template parameter `WithPaddedExpected` two cases can be tested: // // 1. The `std::expected<T, E>` itself has padding, because `T`/`E` _don't_ // have tail padding. This is modelled by `CheckForInvalidWrites<true>` diff --git a/libcxx/test/std/utilities/format/format.functions/bug_81590.compile.pass.cpp b/libcxx/test/std/utilities/format/format.functions/bug_81590.compile.pass.cpp index c2508fdee092..23dd9fe841b9 100644 --- a/libcxx/test/std/utilities/format/format.functions/bug_81590.compile.pass.cpp +++ b/libcxx/test/std/utilities/format/format.functions/bug_81590.compile.pass.cpp @@ -11,7 +11,7 @@ // XFAIL: availability-fp_to_chars-missing // The sample code is based on the bug report -// https://github.com/llvm/llvm-project/issues/81590 +// https://llvm.org/PR81590 // // Tests whether this formatter does not fail to compile due to nested concept // evaluation. diff --git a/libcxx/test/std/utilities/format/format.functions/format_tests.h b/libcxx/test/std/utilities/format/format.functions/format_tests.h index 60abd4ac4e22..4cba83afd429 100644 --- a/libcxx/test/std/utilities/format/format.functions/format_tests.h +++ b/libcxx/test/std/utilities/format/format.functions/format_tests.h @@ -3190,7 +3190,7 @@ void format_tests(TestFunction check, ExceptionTest check_exception) { check(SV("hello 09azAZ!"), SV("hello {}"), data); } { - // https://github.com/llvm/llvm-project/issues/115935 + // https://llvm.org/PR115935 // Contents after the embedded null character are discarded. CharT buffer[] = {CharT('a'), CharT('b'), CharT('c'), 0, CharT('d'), CharT('e'), CharT('f'), 0}; check(SV("hello abc"), SV("hello {}"), buffer); diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/compare.three_way.refwrap.const_ref.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/compare.three_way.refwrap.const_ref.pass.cpp index 4a2ae963e3bd..4a2ae963e3bd 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/compare.three_way.refwrap.const_ref.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/compare.three_way.refwrap.const_ref.pass.cpp diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/compare.three_way.refwrap.refwrap.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/compare.three_way.refwrap.refwrap.pass.cpp index 3d72459bc5a1..3d72459bc5a1 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/compare.three_way.refwrap.refwrap.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/compare.three_way.refwrap.refwrap.pass.cpp diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/compare.three_way.refwrap.refwrap_const.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/compare.three_way.refwrap.refwrap_const.pass.cpp index 1ae22b4ac58e..1ae22b4ac58e 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/compare.three_way.refwrap.refwrap_const.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/compare.three_way.refwrap.refwrap_const.pass.cpp diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/equal.refwrap.const_ref.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/equal.refwrap.const_ref.pass.cpp index 316ff7c30331..316ff7c30331 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/equal.refwrap.const_ref.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/equal.refwrap.const_ref.pass.cpp diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/equal.refwrap.refwrap.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/equal.refwrap.refwrap.pass.cpp index 70e79d399861..70e79d399861 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/equal.refwrap.refwrap.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/equal.refwrap.refwrap.pass.cpp diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/equal.refwrap.refwrap_const.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/equal.refwrap.refwrap_const.pass.cpp index c68ad5c4aa52..c68ad5c4aa52 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparissons/equal.refwrap.refwrap_const.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.comparisons/equal.refwrap.refwrap_const.pass.cpp diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp index fd1fbe5f113b..05a19329f909 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp @@ -21,6 +21,10 @@ #include "test_macros.h" +#if TEST_STD_VER >= 11 +# include "poisoned_hash_helper.h" +#endif + enum class Colors { red, orange, yellow, green, blue, indigo, violet }; enum class Cardinals { zero, one, two, three, five=5 }; enum class LongColors : short { red, orange, yellow, green, blue, indigo, violet }; @@ -33,6 +37,12 @@ template <class T> void test() { +#if TEST_STD_VER >= 11 + test_hash_disabled<const T>(); + test_hash_disabled<volatile T>(); + test_hash_disabled<const volatile T>(); +#endif + typedef std::hash<T> H; #if TEST_STD_VER <= 17 static_assert((std::is_same<typename H::argument_type, T>::value), ""); diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp index b8f85e193dc8..f6c31d068b23 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp @@ -27,10 +27,20 @@ #include "test_macros.h" +#if TEST_STD_VER >= 11 +# include "poisoned_hash_helper.h" +#endif + template <class T> void test() { +#if TEST_STD_VER >= 11 + test_hash_disabled<const T>(); + test_hash_disabled<volatile T>(); + test_hash_disabled<const volatile T>(); +#endif + typedef std::hash<T> H; #if TEST_STD_VER <= 17 static_assert((std::is_same<typename H::argument_type, T>::value), ""); diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp index 14af7093c1e3..c798b3aa77ea 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp @@ -26,10 +26,20 @@ #include "test_macros.h" +#if TEST_STD_VER >= 11 +# include "poisoned_hash_helper.h" +#endif + template <class T> void test() { +#if TEST_STD_VER >= 11 + test_hash_disabled<const T>(); + test_hash_disabled<volatile T>(); + test_hash_disabled<const volatile T>(); +#endif + typedef std::hash<T> H; #if TEST_STD_VER <= 17 static_assert((std::is_same<typename H::argument_type, T>::value), ""); diff --git a/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.construction/uses_allocator_construction_args.pass.cpp b/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.construction/uses_allocator_construction_args.pass.cpp index 235a93987fe4..93a445d7c9e0 100644 --- a/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.construction/uses_allocator_construction_args.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.uses/allocator.uses.construction/uses_allocator_construction_args.pass.cpp @@ -123,7 +123,7 @@ constexpr void testOne() { } { // Tests for ensuring forward declarations of uses_allocator_construction_args - // See https://github.com/llvm/llvm-project/issues/66714. + // See https://llvm.org/PR66714. { using NestedPairType = std::pair<int, std::pair<int, UsesAllocArgT>>; std::same_as<std::tuple< diff --git a/libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp b/libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp index 9ed0eeefcff8..d0a8c07b726d 100644 --- a/libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp +++ b/libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp @@ -153,7 +153,7 @@ constexpr bool test() { assert(std::to_address(&p11) == &p11); ASSERT_SAME_TYPE(decltype(std::to_address(&p11)), int(**)()); - // See https://github.com/llvm/llvm-project/issues/67449 + // See https://llvm.org/PR67449 { struct S { }; S* p = nullptr; diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/overload_compare_iterator.h b/libcxx/test/std/utilities/memory/specialized.algorithms/overload_compare_iterator.h index f3b37292e717..094dd8e683ff 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/overload_compare_iterator.h +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/overload_compare_iterator.h @@ -19,7 +19,7 @@ // An iterator type that overloads operator== and operator!= without any constraints, which // can trip up some algorithms if we compare iterators against types that we're not allowed to. // -// See https://github.com/llvm/llvm-project/issues/69334 for details. +// See https://llvm.org/PR69334 for details. template <class Iterator> struct overload_compare_iterator { static_assert( diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp index 36b3aa8955ca..86e08284a03c 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp @@ -52,10 +52,7 @@ struct VirtualCountedBase { struct VirtualCountedDerived : VirtualCountedBase { constexpr VirtualCountedDerived(int& count_ref) : VirtualCountedBase(count_ref) {} - - // Without a definition, GCC gives an error when the destructor is invoked in a constexpr context (see - // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93413). - constexpr ~VirtualCountedDerived() override {} + constexpr ~VirtualCountedDerived() override = default; }; constexpr bool test() { diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/pr40459.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/pr40459.pass.cpp index 326c2193f592..ee001f060550 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/pr40459.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/pr40459.pass.cpp @@ -13,7 +13,7 @@ // template<class Y> weak_ptr(const weak_ptr<Y>& r); // template<class Y> weak_ptr(weak_ptr<Y>&& r); // -// Regression test for https://github.com/llvm/llvm-project/issues/40459 +// Regression test for https://llvm.org/PR41114 // Verify that these constructors never attempt a derived-to-virtual-base // conversion on a dangling weak_ptr. diff --git a/libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp index b96c9b11e296..804650fde3f3 100644 --- a/libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp @@ -117,12 +117,9 @@ int main(int, char**) // Non-referencable function type static_assert((!std::is_convertible<ConstFunction, Function>::value), ""); -// TODO(LLVM-19): Re-enable this once we switch to GCC 14. This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109680 -#ifndef TEST_COMPILER_GCC static_assert((!std::is_convertible<ConstFunction, Function*>::value), ""); static_assert((!std::is_convertible<ConstFunction, Function&>::value), ""); static_assert((!std::is_convertible<ConstFunction, Function&&>::value), ""); -#endif static_assert((!std::is_convertible<Function*, ConstFunction>::value), ""); static_assert((!std::is_convertible<Function&, ConstFunction>::value), ""); static_assert((!std::is_convertible<ConstFunction, ConstFunction>::value), ""); diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp index bd7da40daf2b..0836ebb6c5c8 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp @@ -95,7 +95,7 @@ void test() { test<true, char[][2]>(); test<true, char[][2][3]>(); - // Important test case for https://github.com/llvm/llvm-project/issues/95311. + // Important test case for https://llvm.org/PR95311. // Note that the order is important here, we want to instantiate the array // variants before the non-array ones, otherwise we don't trigger the bug. { diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp index b7fd0937eb21..a68f3f40e364 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp @@ -35,10 +35,10 @@ enum class UnsignedEnumClass : unsigned int {}; struct EmptyStruct {}; struct IncompleteStruct; -struct NoEligibleTrivialContructor { - NoEligibleTrivialContructor() {}; - NoEligibleTrivialContructor(const NoEligibleTrivialContructor&) {} - NoEligibleTrivialContructor(NoEligibleTrivialContructor&&) {} +struct NoEligibleTrivialConstructor { + NoEligibleTrivialConstructor() {}; + NoEligibleTrivialConstructor(const NoEligibleTrivialConstructor&) {} + NoEligibleTrivialConstructor(NoEligibleTrivialConstructor&&) {} }; struct OnlyDefaultConstructorIsTrivial { @@ -47,22 +47,22 @@ struct OnlyDefaultConstructorIsTrivial { OnlyDefaultConstructorIsTrivial(OnlyDefaultConstructorIsTrivial&&) {} }; -struct AllContstructorsAreTrivial { - AllContstructorsAreTrivial() = default; - AllContstructorsAreTrivial(const AllContstructorsAreTrivial&) = default; - AllContstructorsAreTrivial(AllContstructorsAreTrivial&&) = default; +struct AllConstructorsAreTrivial { + AllConstructorsAreTrivial() = default; + AllConstructorsAreTrivial(const AllConstructorsAreTrivial&) = default; + AllConstructorsAreTrivial(AllConstructorsAreTrivial&&) = default; }; -struct InheritedNoEligibleTrivialConstructor : NoEligibleTrivialContructor { - using NoEligibleTrivialContructor::NoEligibleTrivialContructor; +struct InheritedNoEligibleTrivialConstructor : NoEligibleTrivialConstructor { + using NoEligibleTrivialConstructor::NoEligibleTrivialConstructor; }; struct InheritedOnlyDefaultConstructorIsTrivial : OnlyDefaultConstructorIsTrivial { using OnlyDefaultConstructorIsTrivial::OnlyDefaultConstructorIsTrivial; }; -struct InheritedAllContstructorsAreTrivial : AllContstructorsAreTrivial { - using AllContstructorsAreTrivial::AllContstructorsAreTrivial; +struct InheritedAllConstructorsAreTrivial : AllConstructorsAreTrivial { + using AllConstructorsAreTrivial::AllConstructorsAreTrivial; }; struct UserDeclaredDestructor { @@ -136,7 +136,7 @@ constexpr void test_is_implicit_lifetime() { test_is_implicit_lifetime<T[94], true>(); } -struct AritmeticTypesTest { +struct ArithmeticTypesTest { template <class T> constexpr void operator()() { test_is_implicit_lifetime<T>(); @@ -152,7 +152,7 @@ constexpr bool test() { test_is_implicit_lifetime<const void, false>(); test_is_implicit_lifetime<volatile void, false>(); - types::for_each(types::arithmetic_types(), AritmeticTypesTest{}); + types::for_each(types::arithmetic_types(), ArithmeticTypesTest{}); test_is_implicit_lifetime<Enum>(); test_is_implicit_lifetime<SignedEnum>(); @@ -184,17 +184,17 @@ constexpr bool test() { test_is_implicit_lifetime<UserProvidedDestructor, false>(); - test_is_implicit_lifetime<NoEligibleTrivialContructor, false>(); + test_is_implicit_lifetime<NoEligibleTrivialConstructor, false>(); test_is_implicit_lifetime<OnlyDefaultConstructorIsTrivial, true>(); - test_is_implicit_lifetime<AllContstructorsAreTrivial, true>(); + test_is_implicit_lifetime<AllConstructorsAreTrivial, true>(); test_is_implicit_lifetime<InheritedNoEligibleTrivialConstructor, false>(); test_is_implicit_lifetime<InheritedOnlyDefaultConstructorIsTrivial, true>(); - test_is_implicit_lifetime<InheritedAllContstructorsAreTrivial, true>(); + test_is_implicit_lifetime<InheritedAllConstructorsAreTrivial, true>(); test_is_implicit_lifetime<UserDeletedDestructorInAggregate, true>(); diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/gh_101960_internal_ctor.compile.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/gh_101960_internal_ctor.compile.pass.cpp index 1a1d6f52a5fe..8f332b98c100 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/gh_101960_internal_ctor.compile.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/gh_101960_internal_ctor.compile.pass.cpp @@ -10,7 +10,7 @@ // <optional> -// Regression test for https://github.com/llvm/llvm-project/issues/101960 where a constructor +// Regression test for https://llvm.org/PR101960 where a constructor // of std::optional that should have been private was instead publicly available. #include <optional> diff --git a/libcxx/test/std/utilities/smartptr/adapt/inout_ptr/inout_ptr.general.pass.cpp b/libcxx/test/std/utilities/smartptr/adapt/inout_ptr/inout_ptr.general.pass.cpp index d55a0c2abd46..864b5f444fd8 100644 --- a/libcxx/test/std/utilities/smartptr/adapt/inout_ptr/inout_ptr.general.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/adapt/inout_ptr/inout_ptr.general.pass.cpp @@ -54,7 +54,7 @@ void test_replace_int_p() { replace_int_p(std::inout_ptr(uPtr, std::move(del))); assert(*uPtr == 84); - assert(uPtr.get_deleter().wasMoveInitilized == true); + assert(uPtr.get_deleter().wasMoveInitialized == true); } // pointer-like ConstructiblePtr diff --git a/libcxx/test/std/utilities/smartptr/adapt/out_ptr/out_ptr.general.pass.cpp b/libcxx/test/std/utilities/smartptr/adapt/out_ptr/out_ptr.general.pass.cpp index a78e22f69abc..3186b6c75758 100644 --- a/libcxx/test/std/utilities/smartptr/adapt/out_ptr/out_ptr.general.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/adapt/out_ptr/out_ptr.general.pass.cpp @@ -49,7 +49,7 @@ void test_get_int_p() { get_int_p(std::out_ptr(uPtr, std::move(del))); assert(*uPtr == 84); - assert(uPtr.get_deleter().wasMoveInitilized == true); + assert(uPtr.get_deleter().wasMoveInitialized == true); } // std::shared_ptr diff --git a/libcxx/test/std/utilities/smartptr/adapt/types.h b/libcxx/test/std/utilities/smartptr/adapt/types.h index 0da6007ba394..886bb88cbbeb 100644 --- a/libcxx/test/std/utilities/smartptr/adapt/types.h +++ b/libcxx/test/std/utilities/smartptr/adapt/types.h @@ -21,12 +21,12 @@ struct MoveOnlyDeleter { MoveOnlyDeleter() = default; MoveOnlyDeleter(const MoveOnlyDeleter&) = delete; MoveOnlyDeleter& operator=(const MoveOnlyDeleter&) = delete; - MoveOnlyDeleter(MoveOnlyDeleter&&) : wasMoveInitilized{true} {} + MoveOnlyDeleter(MoveOnlyDeleter&&) : wasMoveInitialized{true} {} MoveOnlyDeleter& operator=(MoveOnlyDeleter&&) = default; void operator()(T* p) const { delete p; } - bool wasMoveInitilized = false; + bool wasMoveInitialized = false; }; // Custom pointer types. diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp index 4f9cdaeb38c0..ca7df36737bf 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp @@ -73,7 +73,7 @@ TEST_CONSTEXPR_CXX23 void test_char_pointer_ctor() assert(v[i] == false); } // Verify that this constructor doesn't read over the given bound. - // See https://github.com/llvm/llvm-project/issues/143684 + // See https://llvm.org/PR143684 { const char not_null_terminated[] = {'1', '0', '1', '0', '1', '0', '1', '0', '1', '0'}; std::bitset<N> v(not_null_terminated, 10); diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp index bb7e10afc62e..d1bf5b2c5d99 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp @@ -8,8 +8,6 @@ // constexpr bool operator[](size_t pos) const; // constexpr since C++23 -// XFAIL: FROZEN-CXX03-HEADERS-FIXME - #include <bitset> #include <cassert> #include <cstddef> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/nonstdmem.uglified.compile.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/nonstdmem.uglified.compile.pass.cpp index 582eb31647ae..15a379de4a14 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/nonstdmem.uglified.compile.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/nonstdmem.uglified.compile.pass.cpp @@ -11,10 +11,8 @@ // This test ensures that we don't use a non-uglified name 'base', 'iterator', // 'const_iterator', and `const_reference` in the implementation of bitset. // -// See https://github.com/llvm/llvm-project/issues/111125. -// See https://github.com/llvm/llvm-project/issues/121618. - -// XFAIL: FROZEN-CXX03-HEADERS-FIXME +// See https://llvm.org/PR111125. +// See https://llvm.org/PR121618. #include <cstddef> #include <bitset> diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp index 4b5adb7141a8..6e7e4312b5da 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp @@ -31,7 +31,7 @@ template<typename ...Ts> void forward_as_tuple(Ts...) = delete; } -// https://github.com/llvm/llvm-project/issues/41034 +// https://llvm.org/PR41689 struct Unconstrained { int data; template <typename Arg> @@ -312,7 +312,7 @@ int main(int, char**) assert(std::get<0>(t).i == 1); assert(std::get<0>(t2).i == 1); } - // See https://github.com/llvm/llvm-project/issues/41034 + // See https://llvm.org/PR41689 { test_tuple_cat_with_unconstrained_constructor(); #if TEST_STD_VER >= 14 diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.class.general/equality.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.class.general/equality.pass.cpp index 6ce851524158..410b0e04a51c 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.class.general/equality.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.class.general/equality.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/assign.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/assign.pass.cpp index faa832815f7e..8268e2c5d640 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/assign.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/assign.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/copy.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/copy.pass.cpp index ed7e4299b50a..a862653b9b08 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/copy.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/copy.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/default.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/default.pass.cpp index e4000a1c15e1..6321fe3bb8c1 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/default.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/default.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/memory_resource_convert.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/memory_resource_convert.pass.cpp index 886d9dd39a1c..29da3630aa57 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/memory_resource_convert.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/memory_resource_convert.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/other_alloc.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/other_alloc.pass.cpp index 5c36f5a993ae..ef9962c47254 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/other_alloc.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/other_alloc.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/equal.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/equal.pass.cpp index a77ed6fbdaec..43f03d15001e 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/equal.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/equal.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/not_equal.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/not_equal.pass.cpp index 78e6b70a1aad..5e0b36613053 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/not_equal.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/not_equal.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp index b050c8e335f1..31b1606f4ce8 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp index cc7882460f01..527ba13f6c7f 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_object.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_object.pass.cpp index e9da1ace7942..cda3ae6b2f84 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_object.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_object.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp index da978151a411..f296a4b0f7b1 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp index 4cb0151ea923..7bc80b430597 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_rvalue.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_rvalue.pass.cpp index bb589b525f7f..f1b2b6c07555 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_rvalue.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_rvalue.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_values.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_values.pass.cpp index f84fac9b5a46..b5e74a225798 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_values.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_values.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp index 4f23dfa9e7f6..cdc5398e7d1a 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair_evil.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair_evil.pass.cpp index 701381fde5ad..b77734c28e12 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair_evil.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair_evil.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_types.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_types.pass.cpp index 38b004dc4eb6..a546fcfbe1fc 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_types.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_types.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp index 67a6aa18a35c..a980a5d29730 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/destroy.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/destroy.pass.cpp index 5bf50f889540..c8b18665346e 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/destroy.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/destroy.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/new_delete_object.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/new_delete_object.pass.cpp index b3a79eb2b404..9e46128cd714 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/new_delete_object.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/new_delete_object.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/resource.pass.cpp index 22cb72414e97..652a930e5f1d 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/resource.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/select_on_container_copy_construction.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/select_on_container_copy_construction.pass.cpp index ccac1178fe51..5666d698c630 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/select_on_container_copy_construction.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/select_on_container_copy_construction.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop.pass.cpp index af3b62185621..e5cf9e928153 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <deque> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop2.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop2.pass.cpp index 80e958d43a73..c7a30520f09b 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop2.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop2.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <deque> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_forward_list_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_forward_list_synop.pass.cpp index 8c1372eb497f..ca16f08c79c6 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_forward_list_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_forward_list_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <forward_list> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop.pass.cpp index a56c69055cc0..b518521bc4a2 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <list> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop2.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop2.pass.cpp index 8a59e9c1ee76..39936aa9490a 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop2.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop2.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <list> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop.pass.cpp index 6b80432f65cd..6058835d9afe 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <map> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop2.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop2.pass.cpp index 5229805ee931..d127f0f71bb9 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop2.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop2.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <map> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_regex_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_regex_synop.pass.cpp index a86db6b1e3fd..8df303d30c58 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_regex_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_regex_synop.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: no-localization -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <regex> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop.pass.cpp index 99ded7c35b7a..60ad57e3ca5b 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <set> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop2.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop2.pass.cpp index ce97e178e9bb..ad8b63760663 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop2.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop2.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <set> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop.pass.cpp index 751994f91ab8..0a2a94121d08 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <string> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop2.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop2.pass.cpp index d27ca9ea7ab9..c86130df5032 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop2.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop2.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <string> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop.pass.cpp index 957c5063c8e8..4244250a3673 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <unordered_map> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop2.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop2.pass.cpp index df9dd55de020..ccb3e1761967 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop2.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop2.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <unordered_map> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop.pass.cpp index 273cffd8a647..228b8bfa5724 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <unordered_set> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop2.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop2.pass.cpp index 510297d72316..1d753087dca0 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop2.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop2.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <unordered_set> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop.pass.cpp index 121e2bb73443..6b2476758c75 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <vector> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop2.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop2.pass.cpp index c6126c60dcb0..2f5a5574eb69 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop2.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop2.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <vector> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/default_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/default_resource.pass.cpp index 26981871c670..9add5244707a 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/default_resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/default_resource.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp index 7b3107029d4d..b58024f494c8 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp index fc8a9e455a4b..2e3da871a9b6 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/copy_move.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/copy_move.pass.cpp index 8adf6ca9378b..87078d0817ff 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/copy_move.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/copy_move.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/with_default_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/with_default_resource.pass.cpp index d45a0bcde8a6..cd9e902f52e8 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/with_default_resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/with_default_resource.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/without_buffer.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/without_buffer.pass.cpp index 1d681386987a..215b5b335587 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/without_buffer.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/without_buffer.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_deallocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_deallocate.pass.cpp index bf025999ea61..333b8fe795e0 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_deallocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_deallocate.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp index 90ee12186650..5390b8063814 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: no-exceptions -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_initial_buffer.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_initial_buffer.pass.cpp index 918c81033fa3..f1e2b9988d3b 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_initial_buffer.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_initial_buffer.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_zero_sized_buffer.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_zero_sized_buffer.pass.cpp index e0fb1c463aa2..874a7ee65c5c 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_zero_sized_buffer.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_zero_sized_buffer.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp index 7892b182297e..ead927d9fc6c 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp index ad967798747a..95c6b36b71f9 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp index 73a8a571179d..bd3dd86b2115 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp index 0637a43a6b99..d79a89333d1e 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/ctor_does_not_allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/ctor_does_not_allocate.pass.cpp index 23fd311baecf..c971ac81e100 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/ctor_does_not_allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/ctor_does_not_allocate.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/sync_with_default_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/sync_with_default_resource.pass.cpp index caca759d2ed9..1c2f20b6f3c3 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/sync_with_default_resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/sync_with_default_resource.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/unsync_with_default_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/unsync_with_default_resource.pass.cpp index 4d23a05e5fea..b6499125b784 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/unsync_with_default_resource.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/unsync_with_default_resource.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp index b3988572d891..88e3fa7f855c 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate.pass.cpp index 9f5edf28c612..2543be0fba28 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp index f3e1e4c026ef..ce39a4fc6a0e 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp index 9327ef3859a7..a21c8aba314a 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp index f55ab1d1aa5c..6656bbc48dd1 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: no-exceptions // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate.pass.cpp index 838658d5536b..3f281205f3a3 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp index 5153a54ef3f1..82f75fb44344 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp index 582bc6edc4e0..be0967354223 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp index a0e86f82e9b2..dacfa950bd1f 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: no-exceptions // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/construct.verify.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/construct.verify.cpp index 8889f8d56fb1..00437bd52f7f 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/construct.verify.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/construct.verify.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/equal.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/equal.pass.cpp index 4fa05c656942..e40d05c7fd03 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/equal.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/equal.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/not_equal.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/not_equal.pass.cpp index 4a10c759afa1..d2540b1a449d 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/not_equal.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/not_equal.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/private_members.verify.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/private_members.verify.cpp index 205476cb8bdd..bf21467a7b8c 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/private_members.verify.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/private_members.verify.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/protected_members.verify.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/protected_members.verify.cpp index 1a503a918d4e..e19d7e93ca35 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/protected_members.verify.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/protected_members.verify.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // <memory_resource> diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/allocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/allocate.pass.cpp index 9c8f9fb9c9a7..7d8b61050dc5 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/allocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/allocate.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/deallocate.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/deallocate.pass.cpp index e24f90a298b6..a4f5d617dccd 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/deallocate.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/deallocate.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/dtor.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/dtor.pass.cpp index 35ea2e4e8722..d4325d16e7cd 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/dtor.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/dtor.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/is_equal.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/is_equal.pass.cpp index 5bebb7f028a2..d6ee0b663aaa 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/is_equal.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/is_equal.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // test_memory_resource requires RTTI for dynamic_cast diff --git a/libcxx/test/std/utilities/utility/mem.res/nodiscard.verify.cpp b/libcxx/test/std/utilities/utility/mem.res/nodiscard.verify.cpp index f10616694a54..068218fe1920 100644 --- a/libcxx/test/std/utilities/utility/mem.res/nodiscard.verify.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/nodiscard.verify.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// TODO: Change to XFAIL once https://github.com/llvm/llvm-project/issues/40340 is fixed +// TODO: Change to XFAIL once https://llvm.org/PR40995 is fixed // UNSUPPORTED: availability-pmr-missing // check that functions are marked [[nodiscard]] diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_like.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_like.pass.cpp index 3ff416ed5737..135045d831d9 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_like.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_like.pass.cpp @@ -45,7 +45,7 @@ struct std::tuple_element<N, my_ns::MyPairLike> { using type = int; }; -// https://github.com/llvm/llvm-project/issues/65620 +// https://llvm.org/PR65620 // This used to be a hard error static_assert(!std::is_constructible_v<std::pair<int,int>, my_ns::MyPairLike const&>); diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp index 16ee000cd90f..2c670d7432ac 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp @@ -9,7 +9,7 @@ // Check that instantiating pair doesn't look up type traits "too early", before // the contained types have been completed. // -// This is a regression test, to prevent a reoccurrance of the issue introduced +// This is a regression test, to prevent a reoccurrence of the issue introduced // in 5e1de27f680591a870d78e9952b23f76aed7f456. #include <utility> diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp index 6111138726db..6b500a8c5ecf 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp @@ -186,7 +186,7 @@ int main(int, char**) { test_construction_with_repeated_types(); test_vector_bool(); - { // Check that the constraints are evaluated lazily (see https://github.com/llvm/llvm-project/issues/151328) + { // Check that the constraints are evaluated lazily (see llvm.org/PR151328) struct Matcher { Matcher() {} Matcher(std::variant<ConvertibleFromAny>) {} diff --git a/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp b/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp index 8093af0aba58..90320ae518c3 100644 --- a/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp @@ -208,7 +208,7 @@ void test_exceptions() { #endif } -// See https://bugs.llvm.org/show_bug.cgi?id=31916 +// See https://llvm.org/PR31916 template <typename ReturnType> void test_caller_accepts_nonconst() { struct A {}; diff --git a/libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp b/libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp index d26c785c0374..e47911f97210 100644 --- a/libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp @@ -349,7 +349,7 @@ void test_exceptions() { #endif } -// See https://bugs.llvm.org/show_bug.cgi?id=31916 +// See https://llvm.org/PR31916 template <typename ReturnType> void test_caller_accepts_nonconst() { struct A {}; diff --git a/libcxx/test/support/any_helpers.h b/libcxx/test/support/any_helpers.h index 0e5563142d58..66f393b108cc 100644 --- a/libcxx/test/support/any_helpers.h +++ b/libcxx/test/support/any_helpers.h @@ -9,9 +9,10 @@ #ifndef ANY_HELPERS_H #define ANY_HELPERS_H +#include <cassert> #include <typeinfo> #include <type_traits> -#include <cassert> +#include <utility> namespace std { namespace experimental {} } diff --git a/libcxx/test/support/is_transparent.h b/libcxx/test/support/is_transparent.h index 4b2a458f574a..9d3791d68a86 100644 --- a/libcxx/test/support/is_transparent.h +++ b/libcxx/test/support/is_transparent.h @@ -37,7 +37,7 @@ struct transparent_less_not_referenceable }; // Prevent regression when empty base class optimization is not suitable. -// See https://github.com/llvm/llvm-project/issues/152543. +// See llvm.org/PR152543. struct transparent_less_nonempty { template <class T, class U> constexpr bool operator()(T&& t, U&& u) const { diff --git a/libcxx/utils/cat_files.py b/libcxx/utils/cat_files.py deleted file mode 100755 index 77127cb98c8a..000000000000 --- a/libcxx/utils/cat_files.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python -# ===----------------------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -# ===----------------------------------------------------------------------===## - -from argparse import ArgumentParser -import sys - - -def print_and_exit(msg): - sys.stderr.write(msg + "\n") - sys.exit(1) - - -def main(): - parser = ArgumentParser(description="Concatenate two files into a single file") - parser.add_argument( - "-o", - "--output", - dest="output", - required=True, - help="The output file. stdout is used if not given", - type=str, - action="store", - ) - parser.add_argument( - "files", metavar="files", nargs="+", help="The files to concatenate" - ) - - args = parser.parse_args() - - if len(args.files) < 2: - print_and_exit("fewer than 2 inputs provided") - data = "" - for filename in args.files: - with open(filename, "r") as f: - data += f.read() - if len(data) != 0 and data[-1] != "\n": - data += "\n" - assert len(data) > 0 and "cannot cat empty files" - with open(args.output, "w") as f: - f.write(data) - - -if __name__ == "__main__": - main() - sys.exit(0) diff --git a/libcxx/utils/ci/BOT_OWNERS.txt b/libcxx/utils/ci/BOT_OWNERS.txt index 2d01b96d72a6..90f827251087 100644 --- a/libcxx/utils/ci/BOT_OWNERS.txt +++ b/libcxx/utils/ci/BOT_OWNERS.txt @@ -18,6 +18,6 @@ E: powerllvm@ca.ibm.com D: AIX, ppc64le N: Android libc++ -E: rprichard@google.com -H: rprichard +E: pirama@google.com, sharjeelkhan@google.com +G: pirama-arumuga-nainar, Sharjeel-Khan D: Emulator-based x86[-64] libc++ CI testing diff --git a/libcxx/utils/ci/docker-compose.yml b/libcxx/utils/ci/docker-compose.yml index d8ba8e5fba2b..e89623d2a847 100644 --- a/libcxx/utils/ci/docker-compose.yml +++ b/libcxx/utils/ci/docker-compose.yml @@ -37,4 +37,4 @@ services: ANDROID_CLANG_VERSION: r563880 ANDROID_CLANG_PREBUILTS_COMMIT: 6ae4184bb8706f9731569b9a0a82be3fcdcb951c ANDROID_SYSROOT_COMMIT: f8b85cc5262c6e5cbc9a92c1bab2b18b32a4c63f - <<: *compiler_versions + <<: [*image_versions, *compiler_versions] diff --git a/libcxx/utils/ci/vendor/android/run-buildbot-container b/libcxx/utils/ci/vendor/android/run-buildbot-container index 7b5d9a4cc3fe..81c719b1f8b9 100755 --- a/libcxx/utils/ci/vendor/android/run-buildbot-container +++ b/libcxx/utils/ci/vendor/android/run-buildbot-container @@ -27,5 +27,5 @@ if [ -S /var/run/docker.sock ]; then DOCKER_OPTIONS+=(--volume /var/run/docker.sock:/var/run/docker.sock) fi -docker run "${DOCKER_OPTIONS[@]}" ghcr.io/libcxx/android-buildkite-builder \ +docker run "${DOCKER_OPTIONS[@]}" ghcr.io/llvm/libcxx-android-builder \ bash -c 'git config --global --add safe.directory /llvm; (/opt/android/container-setup.sh && exec bash)' diff --git a/libcxx/utils/compare-benchmarks b/libcxx/utils/compare-benchmarks new file mode 100755 index 000000000000..9bda5f1a2794 --- /dev/null +++ b/libcxx/utils/compare-benchmarks @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 + +import argparse +import re +import statistics +import sys + +import plotly +import tabulate + +def parse_lnt(lines): + """ + Parse lines in LNT format and return a dictionnary of the form: + + { + 'benchmark1': { + 'metric1': [float], + 'metric2': [float], + ... + }, + 'benchmark2': { + 'metric1': [float], + 'metric2': [float], + ... + }, + ... + } + + Each metric may have multiple values. + """ + results = {} + for line in lines: + line = line.strip() + if not line: + continue + + (identifier, value) = line.split(' ') + (name, metric) = identifier.split('.') + if name not in results: + results[name] = {} + if metric not in results[name]: + results[name][metric] = [] + results[name][metric].append(float(value)) + return results + +def plain_text_comparison(benchmarks, baseline, candidate): + """ + Create a tabulated comparison of the baseline and the candidate. + """ + headers = ['Benchmark', 'Baseline', 'Candidate', 'Difference', '% Difference'] + fmt = (None, '.2f', '.2f', '.2f', '.2f') + table = [] + for (bm, base, cand) in zip(benchmarks, baseline, candidate): + diff = (cand - base) if base and cand else None + percent = 100 * (diff / base) if base and cand else None + row = [bm, base, cand, diff, percent] + table.append(row) + return tabulate.tabulate(table, headers=headers, floatfmt=fmt, numalign='right') + +def create_chart(benchmarks, baseline, candidate): + """ + Create a bar chart comparing 'baseline' and 'candidate'. + """ + figure = plotly.graph_objects.Figure() + figure.add_trace(plotly.graph_objects.Bar(x=benchmarks, y=baseline, name='Baseline')) + figure.add_trace(plotly.graph_objects.Bar(x=benchmarks, y=candidate, name='Candidate')) + return figure + +def prepare_series(baseline, candidate, metric, aggregate=statistics.median): + """ + Prepare the data for being formatted or displayed as a chart. + + Metrics that have more than one value are aggregated using the given aggregation function. + """ + all_benchmarks = sorted(list(set(baseline.keys()) | set(candidate.keys()))) + baseline_series = [] + candidate_series = [] + for bm in all_benchmarks: + baseline_series.append(aggregate(baseline[bm][metric]) if bm in baseline and metric in baseline[bm] else None) + candidate_series.append(aggregate(candidate[bm][metric]) if bm in candidate and metric in candidate[bm] else None) + return (all_benchmarks, baseline_series, candidate_series) + +def main(argv): + parser = argparse.ArgumentParser( + prog='compare-benchmarks', + description='Compare the results of two sets of benchmarks in LNT format.', + epilog='This script requires the `tabulate` and the `plotly` Python modules.') + parser.add_argument('baseline', type=argparse.FileType('r'), + help='Path to a LNT format file containing the benchmark results for the baseline.') + parser.add_argument('candidate', type=argparse.FileType('r'), + help='Path to a LNT format file containing the benchmark results for the candidate.') + parser.add_argument('--metric', type=str, default='execution_time', + help='The metric to compare. LNT data may contain multiple metrics (e.g. code size, execution time, etc) -- ' + 'this option allows selecting which metric is being analyzed. The default is "execution_time".') + parser.add_argument('--output', '-o', type=argparse.FileType('w'), default=sys.stdout, + help='Path of a file where to output the resulting comparison. Default to stdout.') + parser.add_argument('--filter', type=str, required=False, + help='An optional regular expression used to filter the benchmarks included in the comparison. ' + 'Only benchmarks whose names match the regular expression will be included.') + parser.add_argument('--format', type=str, choices=['text', 'chart'], default='text', + help='Select the output format. "text" generates a plain-text comparison in tabular form, and "chart" ' + 'generates a self-contained HTML graph that can be opened in a browser. The default is text.') + args = parser.parse_args(argv) + + baseline = parse_lnt(args.baseline.readlines()) + candidate = parse_lnt(args.candidate.readlines()) + + if args.filter is not None: + regex = re.compile(args.filter) + baseline = {k: v for (k, v) in baseline.items() if regex.search(k)} + candidate = {k: v for (k, v) in candidate.items() if regex.search(k)} + + (benchmarks, baseline_series, candidate_series) = prepare_series(baseline, candidate, args.metric) + + if args.format == 'chart': + figure = create_chart(benchmarks, baseline_series, candidate_series) + plotly.io.write_html(figure, file=args.output) + else: + diff = plain_text_comparison(benchmarks, baseline_series, candidate_series) + args.output.write(diff) + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/libcxx/utils/consolidate-benchmarks b/libcxx/utils/consolidate-benchmarks new file mode 100755 index 000000000000..c84607f1991c --- /dev/null +++ b/libcxx/utils/consolidate-benchmarks @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 + +import argparse +import pathlib +import sys + +def main(argv): + parser = argparse.ArgumentParser( + prog='consolidate-benchmarks', + description='Consolidate benchmark result files (in LNT format) into a single LNT-format file.') + parser.add_argument('files_or_directories', type=str, nargs='+', + help='Path to files or directories containing LNT data to consolidate. Directories are searched ' + 'recursively for files with a .lnt extension.') + parser.add_argument('--output', '-o', type=argparse.FileType('w'), default=sys.stdout, + help='Where to output the result. Default to stdout.') + args = parser.parse_args(argv) + + files = [] + for arg in args.files_or_directories: + path = pathlib.Path(arg) + if path.is_dir(): + for p in path.rglob('*.lnt'): + files.append(p) + else: + files.append(path) + + for file in files: + for line in file.open().readlines(): + line = line.strip() + if not line: + continue + args.output.write(line) + args.output.write('\n') + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index 8d57a07b8836..c1e579c77574 100644 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -569,7 +569,7 @@ feature_test_macros = [ "headers": ["format"], # Trying to use `std::format` where to_chars floating-point is not # available causes compilation errors, even with non floating-point types. - # https://github.com/llvm/llvm-project/issues/125353 + # https://llvm.org/PR125353 "test_suite_guard": "!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT", "libcxx_guard": "_LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT", }, @@ -1053,7 +1053,7 @@ feature_test_macros = [ "headers": ["ostream", "print"], # Trying to use `std::print` where to_chars floating-point is not # available causes compilation errors, even with non floating-point types. - # https://github.com/llvm/llvm-project/issues/125353 + # https://llvm.org/PR125353 "test_suite_guard": "!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT", "libcxx_guard": "_LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT", }, diff --git a/libcxx/utils/generate_libcxx_cppm_in.py b/libcxx/utils/generate_libcxx_cppm_in.py index 39076a61b55b..26d680a0db31 100644 --- a/libcxx/utils/generate_libcxx_cppm_in.py +++ b/libcxx/utils/generate_libcxx_cppm_in.py @@ -9,11 +9,19 @@ import os.path import sys -from libcxx.header_information import module_c_headers, module_headers, header_restrictions, headers_not_available, libcxx_root +from libcxx.header_information import ( + module_c_headers, + module_headers, + header_restrictions, + headers_not_available, + libcxx_root, +) def write_file(module): - with open(libcxx_root / "modules" / f"{module}.cppm.in", "w") as module_cpp_in: + with open( + libcxx_root / "modules" / f"{module}.cppm.in", "w", encoding="utf-8" + ) as module_cpp_in: module_cpp_in.write( """\ // -*- C++ -*- diff --git a/libcxx/utils/libcxx-benchmark-json b/libcxx/utils/libcxx-benchmark-json deleted file mode 100755 index 7f743c32caf4..000000000000 --- a/libcxx/utils/libcxx-benchmark-json +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -set -e - -PROGNAME="$(basename "${0}")" -MONOREPO_ROOT="$(realpath $(dirname "${PROGNAME}"))" -function usage() { -cat <<EOF -Usage: -${PROGNAME} [-h|--help] <build-directory> benchmarks... - -Print the path to the JSON files containing benchmark results for the given benchmarks. - -This requires those benchmarks to have already been run, i.e. this only resolves the path -to the benchmark .json file within the build directory. - -<build-directory> The path to the build directory. -benchmarks... Paths of the benchmarks to extract the results for. Those paths are relative to '<monorepo-root>'. - -Example -======= -$ cmake -S runtimes -B build/ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -$ libcxx-lit build/ -sv libcxx/test/benchmarks/algorithms/for_each.bench.cpp -$ less \$(${PROGNAME} build/ libcxx/test/benchmarks/algorithms/for_each.bench.cpp) -EOF -} - -if [[ "${1}" == "-h" || "${1}" == "--help" ]]; then - usage - exit 0 -fi - -if [[ $# -lt 1 ]]; then - usage - exit 1 -fi - -build_dir="${1}" -shift - -for benchmark in ${@}; do - # Normalize the paths by turning all benchmarks paths into absolute ones and then making them - # relative to the root of the monorepo. - benchmark="$(realpath ${benchmark})" - relative=$(python -c "import os; import sys; print(os.path.relpath(sys.argv[1], sys.argv[2]))" "${benchmark}" "${MONOREPO_ROOT}") - - # Extract components of the benchmark path - directory="$(dirname ${relative})" - file="$(basename ${relative})" - - # Reconstruct the (slightly weird) path to the benchmark json file. This should be kept in sync - # whenever the test suite changes. - json="${build_dir}/${directory}/Output/${file}.dir/benchmark-result.json" - if [[ -f "${json}" ]]; then - echo "${json}" - fi -done diff --git a/libcxx/utils/libcxx-compare-benchmarks b/libcxx/utils/libcxx-compare-benchmarks deleted file mode 100755 index 08c53b2420c8..000000000000 --- a/libcxx/utils/libcxx-compare-benchmarks +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash - -set -e - -PROGNAME="$(basename "${0}")" -MONOREPO_ROOT="$(realpath $(dirname "${PROGNAME}"))" -function usage() { -cat <<EOF -Usage: -${PROGNAME} [-h|--help] <baseline-build> <candidate-build> benchmarks... [-- gbench-args...] - -Compare the given benchmarks between the baseline and the candidate build directories. - -This requires those benchmarks to have already been generated in both build directories. - -<baseline-build> The path to the build directory considered the baseline. -<candidate-build> The path to the build directory considered the candidate. -benchmarks... Paths of the benchmarks to compare. Those paths are relative to '<monorepo-root>'. -[-- gbench-args...] Any arguments provided after '--' will be passed as-is to GoogleBenchmark's compare.py tool. - -Example -======= -$ libcxx-lit build1/ -sv libcxx/test/benchmarks/algorithms/for_each.bench.cpp -$ libcxx-lit build2/ -sv libcxx/test/benchmarks/algorithms/for_each.bench.cpp -$ ${PROGNAME} build1/ build2/ libcxx/test/benchmarks/algorithms/for_each.bench.cpp -EOF -} - -if [[ "${1}" == "-h" || "${1}" == "--help" ]]; then - usage - exit 0 -fi - -if [[ $# -lt 1 ]]; then - usage - exit 1 -fi - -baseline="${1}" -candidate="${2}" -shift; shift - -GBENCH="${MONOREPO_ROOT}/third-party/benchmark" - -python3 -m venv /tmp/libcxx-compare-benchmarks-venv -source /tmp/libcxx-compare-benchmarks-venv/bin/activate -pip3 install -r ${GBENCH}/tools/requirements.txt - -benchmarks="" -while [[ $# -gt 0 ]]; do - if [[ "${1}" == "--" ]]; then - shift - break - fi - benchmarks+=" ${1}" - shift -done - -for benchmark in ${benchmarks}; do - base="$(${MONOREPO_ROOT}/libcxx/utils/libcxx-benchmark-json ${baseline} ${benchmark})" - cand="$(${MONOREPO_ROOT}/libcxx/utils/libcxx-benchmark-json ${candidate} ${benchmark})" - - if [[ ! -e "${base}" ]]; then - echo "Benchmark ${benchmark} does not exist in the baseline" - continue - fi - if [[ ! -e "${cand}" ]]; then - echo "Benchmark ${benchmark} does not exist in the candidate" - continue - fi - - "${GBENCH}/tools/compare.py" benchmarks "${base}" "${cand}" ${@} -done diff --git a/libcxx/utils/libcxx/sym_check/util.py b/libcxx/utils/libcxx/sym_check/util.py index fc7ba4244ab5..dbc886f29dde 100644 --- a/libcxx/utils/libcxx/sym_check/util.py +++ b/libcxx/utils/libcxx/sym_check/util.py @@ -95,7 +95,7 @@ def is_xcoff_or_big_ar(filename): with open(filename, "rb") as f: magic_bytes = f.read(7) return ( - magic_bytes[:4] in [b"\x01DF", b"\x01F7"] # XCOFF32 # XCOFF64 + magic_bytes[:2] in [b"\x01\xDF", b"\x01\xF7"] # XCOFF32 # XCOFF64 or magic_bytes == b"<bigaf>" ) diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py index 0cb81546665d..a964f3bdeeb4 100644 --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -176,7 +176,7 @@ DEFAULT_FEATURES = [ when=lambda cfg: hasCompileFlag(cfg, "-Xclang -verify-ignore-unexpected"), ), Feature( - name="add-latomic-workaround", # https://github.com/llvm/llvm-project/issues/73361 + name="add-latomic-workaround", # https://llvm.org/PR73361 when=lambda cfg: sourceBuilds( cfg, "int main(int, char**) { return 0; }", ["-latomic"] ), diff --git a/libcxx/utils/libcxx/test/format.py b/libcxx/utils/libcxx/test/format.py index 59d0fffd3781..5765afec399c 100644 --- a/libcxx/utils/libcxx/test/format.py +++ b/libcxx/utils/libcxx/test/format.py @@ -12,6 +12,8 @@ import lit.formats import os import re +THIS_FILE = os.path.abspath(__file__) +LIBCXX_UTILS = os.path.dirname(os.path.dirname(os.path.dirname(THIS_FILE))) def _getTempPaths(test): """ @@ -34,11 +36,14 @@ def _checkBaseSubstitutions(substitutions): def _executeScriptInternal(test, litConfig, commands): """ - Returns (stdout, stderr, exitCode, timeoutInfo, parsedCommands) + Returns (stdout, stderr, exitCode, timeoutInfo, parsedCommands), or an appropriate lit.Test.Result + in case of an error while parsing the script. TODO: This really should be easier to access from Lit itself """ parsedCommands = parseScript(test, preamble=commands) + if isinstance(parsedCommands, lit.Test.Result): + return parsedCommands _, tmpBase = _getTempPaths(test) execDir = os.path.dirname(test.getExecPath()) @@ -65,7 +70,8 @@ def parseScript(test, preamble): """ Extract the script from a test, with substitutions applied. - Returns a list of commands ready to be executed. + Returns a list of commands ready to be executed, or an appropriate lit.Test.Result in case of error + while parsing the script (this includes the script being unsupported). - test The lit.Test to parse. @@ -349,7 +355,11 @@ class CxxStandardLibraryTest(lit.formats.FileBasedTest): ] if "enable-benchmarks=run" in test.config.available_features: steps += ["%dbg(EXECUTED AS) %{exec} %t.exe --benchmark_out=%T/benchmark-result.json --benchmark_out_format=json"] + parse_results = os.path.join(LIBCXX_UTILS, 'parse-google-benchmark-results') + steps += [f"{parse_results} %T/benchmark-result.json --output-format=lnt > %T/results.lnt"] return self._executeShTest(test, litConfig, steps) + elif re.search('[.]gen[.][^.]+$', filename): # This only happens when a generator test is not supported + return self._executeShTest(test, litConfig, []) else: return lit.Test.Result( lit.Test.UNRESOLVED, "Unknown test suffix for '{}'".format(filename) @@ -381,11 +391,19 @@ class CxxStandardLibraryTest(lit.formats.FileBasedTest): generatorExecDir = os.path.dirname(testSuite.getExecPath(pathInSuite)) os.makedirs(generatorExecDir, exist_ok=True) - # Run the generator test + # Run the generator test. It's possible for this to fail for two reasons: the generator test + # is unsupported or the generator ran but failed at runtime -- handle both. In the first case, + # we return the generator test itself, since it should produce the same result when run after + # test suite generation. In the second case, it's a true error so we report it. steps = [] # Steps must already be in the script - (out, err, exitCode, _, _) = _executeScriptInternal(generator, litConfig, steps) + result = _executeScriptInternal(generator, litConfig, steps) + if isinstance(result, lit.Test.Result): + yield generator + return + + (out, err, exitCode, _, _) = result if exitCode != 0: - raise RuntimeError(f"Error while trying to generate gen test\nstdout:\n{out}\n\nstderr:\n{err}") + raise RuntimeError(f"Error while trying to generate gen test {'/'.join(pathInSuite)}\nstdout:\n{out}\n\nstderr:\n{err}") # Split the generated output into multiple files and generate one test for each file for subfile, content in self._splitFile(out): diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index 81c613421a46..6f013a75195a 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -375,6 +375,17 @@ DEFAULT_PARAMETERS = [ actions=lambda mode: [AddFeature(f"enable-benchmarks={mode}")], ), Parameter( + name="spec_dir", + type=str, + default="none", + help="Path to the SPEC benchmarks. This is required in order to run the SPEC benchmarks as part of " + "the libc++ test suite. If provided, the appropriate SPEC toolset must already be built and installed.", + actions=lambda spec_dir: [ + AddSubstitution("%{spec_dir}", spec_dir), + AddFeature('enable-spec-benchmarks') + ] if spec_dir != "none" else [], + ), + Parameter( name="long_tests", choices=[True, False], type=bool, diff --git a/libcxx/utils/parse-google-benchmark-results b/libcxx/utils/parse-google-benchmark-results new file mode 100755 index 000000000000..280c8045db6c --- /dev/null +++ b/libcxx/utils/parse-google-benchmark-results @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 + +import argparse +import csv +import json +import sys + +def main(argv): + parser = argparse.ArgumentParser( + prog='parse-google-benchmark-results', + description='Parse Google Benchmark result files (in JSON format) into CSV or LNT compatible output.') + parser.add_argument('filename', type=argparse.FileType('r'), nargs='+', + help='One of more JSON files to extract the results from. The results parsed from each ' + 'file are concatenated together.') + parser.add_argument('--timing', type=str, choices=['real_time', 'cpu_time'], default='real_time', + help='The timing to extract from the Google Benchmark results. This can either be the ' + '"real time" or the "CPU time". Default is "real time".') + parser.add_argument('--output-format', type=str, choices=['csv', 'lnt'], default='csv', + help='The desired output format for the data. `csv` is CSV format and `lnt` is a format compatible with ' + '`lnt importreport` (see https://llvm.org/docs/lnt/importing_data.html#importing-data-in-a-text-file).') + args = parser.parse_args(argv) + + # Parse the data from all files, aggregating the results + headers = ['Benchmark', args.timing] + rows = [] + for file in args.filename: + js = json.load(file) + for bm in js['benchmarks']: + row = [bm['name'], bm[args.timing]] + rows.append(row) + + # Print the results in the right format + if args.output_format == 'csv': + writer = csv.writer(sys.stdout) + writer.writerow(headers) + for row in rows: + writer.writerow(row) + elif args.output_format == 'lnt': + benchmark = headers.index('Benchmark') + time = headers.index(args.timing) + for row in rows: + print(f'{row[benchmark].replace(".", "_")}.execution_time {row[time]}') + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/libcxx/utils/parse-spec-results b/libcxx/utils/parse-spec-results new file mode 100755 index 000000000000..3aff206f8959 --- /dev/null +++ b/libcxx/utils/parse-spec-results @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 + +import argparse +import csv +import sys + +def parse_table(rows, table_title): + """ + Parse a CSV table out of an iterator over rows. + + Return a tuple containing (extracted headers, extracted rows). + """ + in_table = False + rows_iter = iter(rows) + extracted = [] + headers = None + while True: + try: + row = next(rows_iter) + except StopIteration: + break + + if not in_table and row == [table_title]: + in_table = True + next_row = next(rows_iter) + assert next_row == [], f'There should be an empty row after the title of the table, found {next_row}' + headers = next(rows_iter) # Extract the headers + continue + + elif in_table and row == []: # An empty row marks the end of the table + in_table = False + break + + elif in_table: + extracted.append(row) + + assert len(extracted) != 0, f'Could not extract rows from the table, this is suspicious. Table title was {table_title}' + assert headers is not None, f'Could not extract headers from the table, this is suspicious. Table title was {table_title}' + + return (headers, extracted) + +def main(argv): + parser = argparse.ArgumentParser( + prog='parse-spec-results', + description='Parse SPEC result files (in CSV format) and extract the selected result table, in the selected format.') + parser.add_argument('filename', type=argparse.FileType('r'), nargs='+', + help='One of more CSV files to extract the results from. The results parsed from each file are concatenated ' + 'together.') + parser.add_argument('--table', type=str, choices=['full', 'selected'], default='full', + help='The name of the table to extract from SPEC results. `full` means extracting the Full Results Table ' + 'and `selected` means extracting the Selected Results Table. Default is `full`.') + parser.add_argument('--output-format', type=str, choices=['csv', 'lnt'], default='csv', + help='The desired output format for the data. `csv` is CSV format and `lnt` is a format compatible with ' + '`lnt importreport` (see https://llvm.org/docs/lnt/importing_data.html#importing-data-in-a-text-file).') + parser.add_argument('--extract', type=str, + help='A comma-separated list of headers to extract from the table. If provided, only the data associated to ' + 'those headers will be present in the resulting data. Invalid header names are diagnosed. Please make ' + 'sure to use appropriate quoting for header names that contain spaces. This option only makes sense ' + 'when the output format is CSV.') + parser.add_argument('--keep-not-run', action='store_true', + help='Keep entries whose \'Base Status\' is marked as \'NR\', aka \'Not Run\'. By default, such entries are discarded.') + args = parser.parse_args(argv) + + if args.table == 'full': + table_title = 'Full Results Table' + elif args.table == 'selected': + table_title = 'Selected Results Table' + + # Parse the headers and the rows in each file, aggregating all the results + headers = None + rows = [] + for file in args.filename: + reader = csv.reader(file) + (parsed_headers, parsed_rows) = parse_table(reader, table_title) + assert headers is None or headers == parsed_headers, f'Found files with different headers: {headers} and {parsed_headers}' + headers = parsed_headers + rows.extend(parsed_rows) + + # Remove rows that were not run unless we were asked to keep them + if not args.keep_not_run: + not_run = headers.index('Base Status') + rows = [row for row in rows if row[not_run] != 'NR'] + + if args.extract is not None: + if args.output_format != 'csv': + raise RuntimeError('Passing --extract requires the output format to be csv') + for h in args.extract.split(','): + if h not in headers: + raise RuntimeError(f'Header name {h} was not present in the parsed headers {headers}') + + extracted_fields = [headers.index(h) for h in args.extract.split(',')] + headers = [headers[i] for i in extracted_fields] + rows = [[row[i] for i in extracted_fields] for row in rows] + + # Print the results in the right format + if args.output_format == 'csv': + writer = csv.writer(sys.stdout) + writer.writerow(headers) + for row in rows: + writer.writerow(row) + elif args.output_format == 'lnt': + benchmark = headers.index('Benchmark') + time = headers.index('Est. Base Run Time') + for row in rows: + print(f'{row[benchmark].replace(".", "_")}.execution_time {row[time]}') + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/libcxx/utils/requirements.txt b/libcxx/utils/requirements.txt new file mode 100644 index 000000000000..de6e123eec54 --- /dev/null +++ b/libcxx/utils/requirements.txt @@ -0,0 +1,2 @@ +plotly +tabulate diff --git a/libcxx/utils/synchronize_csv_status_files.py b/libcxx/utils/synchronize_csv_status_files.py index 5dbd734de7fb..66cc100a8eee 100755 --- a/libcxx/utils/synchronize_csv_status_files.py +++ b/libcxx/utils/synchronize_csv_status_files.py @@ -154,6 +154,12 @@ class PaperInfo: First version of LLVM in which this paper/issue was resolved. """ + github_issue: Optional[str] + """ + Optional number of the Github issue tracking the implementation status of this paper. + This is used to cross-reference rows in the status pages with Github issues. + """ + notes: Optional[str] """ Optional plain text string representing notes to associate to the paper. @@ -170,6 +176,7 @@ class PaperInfo: status: PaperStatus, meeting: Optional[str] = None, first_released_version: Optional[str] = None, + github_issue: Optional[str] = None, notes: Optional[str] = None, original: Optional[object] = None): self.paper_number = paper_number @@ -177,16 +184,18 @@ class PaperInfo: self.status = status self.meeting = meeting self.first_released_version = first_released_version + self.github_issue = github_issue self.notes = notes self.original = original - def for_printing(self) -> Tuple[str, str, str, str, str, str]: + def for_printing(self) -> Tuple[str, str, str, str, str, str, str]: return ( f'`{self.paper_number} <https://wg21.link/{self.paper_number}>`__', self.paper_name, self.meeting if self.meeting is not None else '', self.status.to_csv_entry(), self.first_released_version if self.first_released_version is not None else '', + f'`#{self.github_issue} <https://github.com/llvm/llvm-project/issues/{self.github_issue}>`__' if self.github_issue is not None else '', self.notes if self.notes is not None else '', ) @@ -203,13 +212,19 @@ class PaperInfo: if match is None: raise RuntimeError(f"Can't parse paper/issue number out of row: {row}") + # Match the issue number if present + github_issue = re.search(r'#([0-9]+)', row[5]) + if github_issue: + github_issue = github_issue.group(1) + return PaperInfo( paper_number=match.group(1), paper_name=row[1], status=PaperStatus.from_csv_entry(row[3]), meeting=row[2] or None, first_released_version=row[4] or None, - notes=row[5] or None, + github_issue=github_issue, + notes=row[6] or None, original=row, ) @@ -235,6 +250,7 @@ class PaperInfo: status=PaperStatus.from_github_issue(issue), meeting=issue.get('meeting Voted', None), first_released_version=None, # TODO + github_issue=str(issue['content']['number']), notes=notes, original=issue, ) @@ -252,19 +268,24 @@ def merge(paper: PaperInfo, gh: PaperInfo) -> PaperInfo: is not useful. In case we don't update the CSV row's status, we still take any updated notes coming - from the Github issue. + from the Github issue and we add a link to the Github issue if it was previously missing. """ + took_gh_in_full = False # Whether we updated the entire PaperInfo from the Github version if paper.status == PaperStatus(PaperStatus.TODO) and gh.status == PaperStatus(PaperStatus.IN_PROGRESS): result = copy.deepcopy(paper) - result.notes = gh.notes elif paper.status < gh.status: result = copy.deepcopy(gh) + took_gh_in_full = True elif paper.status == gh.status: result = copy.deepcopy(paper) - result.notes = gh.notes else: print(f"We found a CSV row and a Github issue with different statuses:\nrow: {paper}\nGithub issue: {gh}") result = copy.deepcopy(paper) + + # If we didn't take the Github issue in full, make sure to update the notes, the link and anything else. + if not took_gh_in_full: + result.github_issue = gh.github_issue + result.notes = gh.notes return result def load_csv(file: pathlib.Path) -> List[Tuple]: @@ -285,6 +306,8 @@ def create_github_issue(paper: PaperInfo, labels: List[str]) -> None: """ Create a new Github issue representing the given PaperInfo. """ + assert paper.github_issue is None, "Trying to create a Github issue for a paper that is already tracked" + paper_name = paper.paper_name.replace('``', '`').replace('\\', '') create_cli = ['gh', 'issue', 'create', '--repo', 'llvm/llvm-project', @@ -363,6 +386,17 @@ def sync_csv(rows: List[Tuple], from_github: List[PaperInfo], create_new: bool, results.append(row) continue + # Validate the Github issue associated to the CSV row, if any + if paper.github_issue is not None: + if len(tracking) == 0: + print(f"Found row claiming to have a tracking issue, but failed to find a tracking issue on Github: {row}") + results.append(row) + continue + if len(tracking) == 1 and paper.github_issue != tracking[0].github_issue: + print(f"Found row with incorrect tracking issue: {row}\ntracked by: {tracking[0]}") + results.append(row) + continue + # If there is no tracking issue for that row and we are creating new issues, do that. # Otherwise just log that we're missing an issue. if len(tracking) == 0: |
