diff --git a/libcxx/docs/Cxx2aStatus.rst b/libcxx/docs/Cxx2aStatus.rst --- a/libcxx/docs/Cxx2aStatus.rst +++ b/libcxx/docs/Cxx2aStatus.rst @@ -43,7 +43,7 @@ .. [#note-P0600] P0600: The missing bits in P0600 are in |sect|\ [mem.res.class], |sect|\ [mem.poly.allocator.class], and |sect|\ [container.node.overview]. .. [#note-P0966] P0966: It was previously erroneously marked as complete in version 8.0. See `bug 45368 `__. - .. [#note-P0619] P0619: Only ``std::allocator`` part is implemented. + .. [#note-P0619] P0619: Only sections D.9 and D.10 are implemented. Section D.8 is partly implemented. Sections D.4, D.7, D.11, D.12, and D.14 remain undone. .. _issues-status-cxx2a: @@ -56,4 +56,4 @@ :header-rows: 1 :widths: auto -Last Updated: 24-Nov-2020 +Last Updated: 24-May-2021 diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1372,6 +1372,12 @@ #define _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS #endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES +#if defined(_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES) +#define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS +#define _LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS +#define _LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR +#endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES + #if !defined(__cpp_deduction_guides) || __cpp_deduction_guides < 201611 #define _LIBCPP_HAS_NO_DEDUCTION_GUIDES #endif diff --git a/libcxx/include/__memory/raw_storage_iterator.h b/libcxx/include/__memory/raw_storage_iterator.h --- a/libcxx/include/__memory/raw_storage_iterator.h +++ b/libcxx/include/__memory/raw_storage_iterator.h @@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER <= 17 +#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR) template class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 raw_storage_iterator @@ -62,7 +62,7 @@ #endif }; -#endif // _LIBCPP_STD_VER <= 17 +#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/functional b/libcxx/include/functional --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -192,7 +192,7 @@ struct identity; // C++20 template -class unary_negate // deprecated in C++17 +class unary_negate // deprecated in C++17, removed in C++20 : public unary_function { public: @@ -200,11 +200,11 @@ bool operator()(const typename Predicate::argument_type& x) const; }; -template // deprecated in C++17 +template // deprecated in C++17, removed in C++20 unary_negate not1(const Predicate& pred); template -class binary_negate // deprecated in C++17 +class binary_negate // deprecated in C++17, removed in C++20 : public binary_function @@ -215,7 +215,7 @@ const typename Predicate::second_argument_type& y) const; }; -template // deprecated in C++17 +template // deprecated in C++17, removed in C++20 binary_negate not2(const Predicate& pred); template @@ -1008,6 +1008,7 @@ }; #endif +#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS) template class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 unary_negate : public unary_function @@ -1048,6 +1049,7 @@ _LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY binary_negate<_Predicate> not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);} +#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS) #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) template diff --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp --- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: clang-4.0 // UNSUPPORTED: c++03, c++11, c++14 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS #include diff --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp --- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp @@ -10,6 +10,7 @@ // binary_negate +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS #include diff --git a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp --- a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: clang-4.0 // UNSUPPORTED: c++03, c++11, c++14 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS #include diff --git a/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp --- a/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp @@ -10,6 +10,7 @@ // not1 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS #include diff --git a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp --- a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: clang-4.0 // UNSUPPORTED: c++03, c++11, c++14 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS #include diff --git a/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp --- a/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp @@ -10,6 +10,7 @@ // not2 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS #include diff --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp --- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp @@ -13,6 +13,7 @@ // UNSUPPORTED: clang-4.0 // UNSUPPORTED: c++03, c++11, c++14 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS #include diff --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp --- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp @@ -10,6 +10,7 @@ // unary_negate +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS #include