From bc395882d711d942067b288527a60d57f7e111b8 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Fri, 24 Mar 2023 09:25:19 +0800 Subject: [PATCH 1/2] Implement LWG-3887 And make `__cpp_lib_allocate_at_least` not dependent on concept support. --- stl/inc/yvals_core.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index da3870dedf5..5e091c91698 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -1694,11 +1694,7 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect // C++23 #if _HAS_CXX23 #define __cpp_lib_adaptor_iterator_pair_constructor 202106L - -#ifdef __cpp_lib_concepts -#define __cpp_lib_allocate_at_least 202106L -#endif // __cpp_lib_concepts - +#define __cpp_lib_allocate_at_least 202302L #define __cpp_lib_associative_heterogeneous_erasure 202110L #define __cpp_lib_bind_back 202202L #define __cpp_lib_byteswap 202110L From 26f6e43e0f72f50776cd2f840b23ca6718e98a72 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Fri, 24 Mar 2023 09:27:04 +0800 Subject: [PATCH 2/2] Test change for LWG-3887 --- .../VSO_0157762_feature_test_macros/test.compile.pass.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp b/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp index 0aa3e9b765a..1c7169a2eb5 100644 --- a/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp +++ b/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp @@ -42,13 +42,13 @@ STATIC_ASSERT(__cpp_lib_algorithm_iterator_requirements == 202207L); #endif #endif -#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395 +#if _HAS_CXX23 #ifndef __cpp_lib_allocate_at_least #error __cpp_lib_allocate_at_least is not defined -#elif __cpp_lib_allocate_at_least != 202106L -#error __cpp_lib_allocate_at_least is not 202106L +#elif __cpp_lib_allocate_at_least != 202302L +#error __cpp_lib_allocate_at_least is not 202302L #else -STATIC_ASSERT(__cpp_lib_allocate_at_least == 202106L); +STATIC_ASSERT(__cpp_lib_allocate_at_least == 202302L); #endif #else #ifdef __cpp_lib_allocate_at_least