diff options
Diffstat (limited to 'libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.compile.pass.cpp')
-rw-r--r-- | libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.compile.pass.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.compile.pass.cpp index 3e65b14..4dcc477 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.compile.pass.cpp @@ -16,6 +16,7 @@ // Test the feature test macros defined by <variant> /* Constant Value + __cpp_lib_constrained_equality 202403L [C++26] __cpp_lib_freestanding_variant 202311L [C++26] __cpp_lib_variant 202102L [C++17] */ @@ -25,6 +26,10 @@ #if TEST_STD_VER < 14 +# ifdef __cpp_lib_constrained_equality +# error "__cpp_lib_constrained_equality should not be defined before c++26" +# endif + # ifdef __cpp_lib_freestanding_variant # error "__cpp_lib_freestanding_variant should not be defined before c++26" # endif @@ -35,6 +40,10 @@ #elif TEST_STD_VER == 14 +# ifdef __cpp_lib_constrained_equality +# error "__cpp_lib_constrained_equality should not be defined before c++26" +# endif + # ifdef __cpp_lib_freestanding_variant # error "__cpp_lib_freestanding_variant should not be defined before c++26" # endif @@ -45,6 +54,10 @@ #elif TEST_STD_VER == 17 +# ifdef __cpp_lib_constrained_equality +# error "__cpp_lib_constrained_equality should not be defined before c++26" +# endif + # ifdef __cpp_lib_freestanding_variant # error "__cpp_lib_freestanding_variant should not be defined before c++26" # endif @@ -58,6 +71,10 @@ #elif TEST_STD_VER == 20 +# ifdef __cpp_lib_constrained_equality +# error "__cpp_lib_constrained_equality should not be defined before c++26" +# endif + # ifdef __cpp_lib_freestanding_variant # error "__cpp_lib_freestanding_variant should not be defined before c++26" # endif @@ -71,6 +88,10 @@ #elif TEST_STD_VER == 23 +# ifdef __cpp_lib_constrained_equality +# error "__cpp_lib_constrained_equality should not be defined before c++26" +# endif + # ifdef __cpp_lib_freestanding_variant # error "__cpp_lib_freestanding_variant should not be defined before c++26" # endif @@ -85,6 +106,19 @@ #elif TEST_STD_VER > 23 # if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_constrained_equality +# error "__cpp_lib_constrained_equality should be defined in c++26" +# endif +# if __cpp_lib_constrained_equality != 202403L +# error "__cpp_lib_constrained_equality should have the value 202403L in c++26" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_constrained_equality +# error "__cpp_lib_constrained_equality should not be defined because it is unimplemented in libc++!" +# endif +# endif + +# if !defined(_LIBCPP_VERSION) # ifndef __cpp_lib_freestanding_variant # error "__cpp_lib_freestanding_variant should be defined in c++26" # endif |