diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index f0c7fdebb8ca..c02a208f4ede 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -808,15 +808,11 @@ template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : pub template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {}; template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {}; -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {}; -#endif template struct _LIBCPP_TEMPLATE_VIS is_reference : public false_type {}; template struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&> : public true_type {}; -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {}; -#endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template @@ -1130,9 +1126,7 @@ template using add_cv_t = typename add_cv<_Tp>::type; template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG_TYPE _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;}; -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG_TYPE _Tp type;}; -#endif #if _LIBCPP_STD_VER > 11 template using remove_reference_t = typename remove_reference<_Tp>::type; @@ -1150,8 +1144,6 @@ template struct _LIBCPP_TEMPLATE_VIS add_lvalue_reference template using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; #endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - template ::value> struct __add_rvalue_reference_impl { typedef _LIBCPP_NODEBUG_TYPE _Tp type; }; template struct __add_rvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG_TYPE _Tp&& type; }; @@ -1162,10 +1154,6 @@ template struct _LIBCPP_TEMPLATE_VIS add_rvalue_reference template using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; #endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - template _Tp&& __declval(int); template _Tp __declval(long); @@ -1173,14 +1161,6 @@ template decltype(_VSTD::__declval<_Tp>(0)) declval() _NOEXCEPT; -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -template -typename add_lvalue_reference<_Tp>::type -declval(); - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - // __uncvref template diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_lvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_lvalue_ref.pass.cpp index b40e68ab4e38..3abc949335ee 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_lvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_lvalue_ref.pass.cpp @@ -58,23 +58,19 @@ int main(int, char**) // LWG 2101 specifically talks about add_lvalue_reference and functions. // The term of art is "a referenceable type", which a cv- or ref-qualified function is not. test_function0(); -#if TEST_STD_VER >= 11 test_function1(); test_function1(); test_function1(); test_function1(); test_function1(); -#endif // But a cv- or ref-qualified member function *is* "a referenceable type" test_function0(); -#if TEST_STD_VER >= 11 test_function0(); test_function0(); test_function0(); test_function0(); test_function0(); -#endif return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp index 22628a3a2cf8..d67db440fa26 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 - // type_traits // add_rvalue_reference diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp index 50927fadb83f..2b11e0b7332c 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp @@ -36,13 +36,11 @@ int main(int, char**) test_remove_reference(); test_remove_reference(); -#if TEST_STD_VER >= 11 test_remove_reference(); test_remove_reference(); test_remove_reference(); test_remove_reference(); test_remove_reference(); -#endif return 0; } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_lvalue_reference.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_lvalue_reference.pass.cpp index ed32cd9b999b..9235efbb1dde 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_lvalue_reference.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_lvalue_reference.pass.cpp @@ -10,8 +10,6 @@ // is_lvalue_reference -// UNSUPPORTED: c++98, c++03 - #include #include // for std::nullptr_t #include "test_macros.h" diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_rvalue_reference.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_rvalue_reference.pass.cpp index d17ed5feeff6..b424c7e038cb 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_rvalue_reference.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_rvalue_reference.pass.cpp @@ -10,8 +10,6 @@ // is_rvalue_reference -// UNSUPPORTED: c++98, c++03 - #include #include // for std::nullptr_t #include "test_macros.h" diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp index e40a2a014436..b2537790cb74 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 - // type_traits // rvalue_ref diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_reference.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_reference.pass.cpp index bb8a2d62ca99..e6fd1e67aedb 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_reference.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_reference.pass.cpp @@ -75,10 +75,7 @@ typedef void (*FunctionPtr)(); int main(int, char**) { test_is_reference(); -#if TEST_STD_VER >= 11 test_is_reference(); -#endif - test_is_not_reference(); test_is_not_reference(); test_is_not_reference(); diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp index f00307aa9695..13b35d3a779f 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 - // type_traits // rvalue_ref diff --git a/libcxx/test/std/utilities/utility/declval/declval.pass.cpp b/libcxx/test/std/utilities/utility/declval/declval.pass.cpp index 6509fd4377cc..f56a6fd779e3 100644 --- a/libcxx/test/std/utilities/utility/declval/declval.pass.cpp +++ b/libcxx/test/std/utilities/utility/declval/declval.pass.cpp @@ -23,11 +23,7 @@ class A int main(int, char**) { -#if TEST_STD_VER >= 11 static_assert((std::is_same()), A&&>::value), ""); -#else - static_assert((std::is_same()), A&>::value), ""); -#endif return 0; }