diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -495,10 +495,6 @@ # define _LIBCPP_NO_EXCEPTIONS #endif -#if !(__has_feature(cxx_strong_enums)) -#define _LIBCPP_HAS_NO_STRONG_ENUMS -#endif - #if __has_feature(cxx_attributes) # define _LIBCPP_NORETURN [[noreturn]] #else @@ -862,7 +858,7 @@ # define _LIBCPP_USING_IF_EXISTS #endif -#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#ifdef _LIBCPP_CXX03_LANG # define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx # define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ __lx __v_; \ @@ -870,10 +866,10 @@ _LIBCPP_INLINE_VISIBILITY explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \ _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} \ }; -#else // _LIBCPP_HAS_NO_STRONG_ENUMS +#else // _LIBCPP_CXX03_LANG # define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_ENUM_VIS x # define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) -#endif // _LIBCPP_HAS_NO_STRONG_ENUMS +#endif // _LIBCPP_CXX03_LANG // _LIBCPP_DEBUG potential values: // - undefined: No assertions. This is the default. diff --git a/libcxx/include/future b/libcxx/include/future --- a/libcxx/include/future +++ b/libcxx/include/future @@ -400,7 +400,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public true_type {}; -#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#ifdef _LIBCPP_CXX03_LANG template <> struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public true_type { }; #endif @@ -414,7 +414,7 @@ }; _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(launch) -#ifndef _LIBCPP_HAS_NO_STRONG_ENUMS +#ifndef _LIBCPP_CXX03_LANG typedef underlying_type::type __launch_underlying_type; @@ -474,7 +474,7 @@ __x = __x ^ __y; return __x; } -#endif // !_LIBCPP_HAS_NO_STRONG_ENUMS +#endif // !_LIBCPP_CXX03_LANG //enum class future_status _LIBCPP_DECLARE_STRONG_ENUM(future_status) diff --git a/libcxx/include/ios b/libcxx/include/ios --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -403,7 +403,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public true_type { }; -#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#ifdef _LIBCPP_CXX03_LANG template <> struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public true_type { }; #endif diff --git a/libcxx/include/system_error b/libcxx/include/system_error --- a/libcxx/include/system_error +++ b/libcxx/include/system_error @@ -183,7 +183,7 @@ struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum : true_type { }; -#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#ifdef _LIBCPP_CXX03_LANG template <> struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum : true_type { }; diff --git a/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp b/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp --- a/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp @@ -24,7 +24,7 @@ int main(int, char**) { -#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#if TEST_STD_VER < 11 LIBCPP_STATIC_ASSERT(static_cast(std::launch::any) == (static_cast(std::launch::async) | static_cast(std::launch::deferred)), ""); #else diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp @@ -26,7 +26,7 @@ big = 0xFFFFFFFFFFFFFFFFULL }; -#if !defined(TEST_HAS_NO_INT128) && !defined(_LIBCPP_HAS_NO_STRONG_ENUMS) +#if !defined(TEST_HAS_NO_INT128) && TEST_STD_VER >= 11 enum HugeEnum : __uint128_t { hugezero @@ -62,7 +62,7 @@ #ifndef TEST_HAS_NO_INT128 test_make_signed< __int128_t, __int128_t >(); test_make_signed< __uint128_t, __int128_t >(); -# ifndef _LIBCPP_HAS_NO_STRONG_ENUMS +# if TEST_STD_VER >= 11 test_make_signed< HugeEnum, __int128_t >(); # endif #endif diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp @@ -26,7 +26,7 @@ big = 0xFFFFFFFFFFFFFFFFULL }; -#if !defined(TEST_HAS_NO_INT128) && !defined(_LIBCPP_HAS_NO_STRONG_ENUMS) +#if !defined(TEST_HAS_NO_INT128) && TEST_STD_VER >= 11 enum HugeEnum : __int128_t { hugezero @@ -63,7 +63,7 @@ #ifndef TEST_HAS_NO_INT128 test_make_unsigned<__int128_t, __uint128_t>(); test_make_unsigned<__uint128_t, __uint128_t>(); -# ifndef _LIBCPP_HAS_NO_STRONG_ENUMS +# if TEST_STD_VER >= 11 test_make_unsigned(); # endif #endif