diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -492,10 +492,6 @@ # define _LIBCPP_HAS_BLOCKS_RUNTIME #endif -#if !(__has_feature(cxx_relaxed_constexpr)) -#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR -#endif - #if !(__has_feature(cxx_variable_templates)) #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES #endif @@ -542,11 +538,6 @@ # define _LIBCPP_NO_EXCEPTIONS #endif -// Determine if GCC supports relaxed constexpr -#if !defined(__cpp_constexpr) || __cpp_constexpr < 201304L -#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR -#endif - // GCC 5 supports variable templates #if !defined(__cpp_variable_templates) || __cpp_variable_templates < 201304L #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES @@ -575,7 +566,6 @@ #error "MSVC versions prior to Visual Studio 2015 are not supported" #endif -#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES #define __alignof__ __alignof #define _LIBCPP_NORETURN __declspec(noreturn) @@ -1044,19 +1034,19 @@ # define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit #endif -#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) +#if _LIBCPP_STD_VER > 11 # define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr #else # define _LIBCPP_CONSTEXPR_AFTER_CXX11 #endif -#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) +#if _LIBCPP_STD_VER > 14 # define _LIBCPP_CONSTEXPR_AFTER_CXX14 constexpr #else # define _LIBCPP_CONSTEXPR_AFTER_CXX14 #endif -#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) +#if _LIBCPP_STD_VER > 17 # define _LIBCPP_CONSTEXPR_AFTER_CXX17 constexpr #else # define _LIBCPP_CONSTEXPR_AFTER_CXX17 @@ -1096,10 +1086,10 @@ # define _LIBCPP_INLINE_VAR #endif -#if defined(_LIBCPP_DEBUG) || defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) -# define _LIBCPP_CONSTEXPR_IF_NODEBUG -#else +#if !defined(_LIBCPP_DEBUG) && _LIBCPP_STD_VER > 11 # define _LIBCPP_CONSTEXPR_IF_NODEBUG constexpr +#else +# define _LIBCPP_CONSTEXPR_IF_NODEBUG #endif #if __has_attribute(no_destroy) diff --git a/libcxx/test/libcxx/selftest/test_macros.pass.cpp b/libcxx/test/libcxx/selftest/test_macros.pass.cpp --- a/libcxx/test/libcxx/selftest/test_macros.pass.cpp +++ b/libcxx/test/libcxx/selftest/test_macros.pass.cpp @@ -33,16 +33,6 @@ void test_libcxx_macros() { // ===== C++14 features ===== -// defined(TEST_HAS_EXTENDED_CONSTEXPR) != defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) -#ifdef TEST_HAS_EXTENDED_CONSTEXPR -# ifdef _LIBCPP_HAS_NO_CXX14_CONSTEXPR -# error "TEST_EXTENDED_CONSTEXPR mismatch (1)" -# endif -#else -# ifndef _LIBCPP_HAS_NO_CXX14_CONSTEXPR -# error "TEST_EXTENDED_CONSTEXPR mismatch (2)" -# endif -#endif // defined(TEST_HAS_VARIABLE_TEMPLATES) != defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) #ifdef TEST_HAS_VARIABLE_TEMPLATES diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -165,7 +165,6 @@ /* Features that were introduced in C++14 */ #if TEST_STD_VER >= 14 -#define TEST_HAS_EXTENDED_CONSTEXPR #define TEST_HAS_VARIABLE_TEMPLATES #endif