diff --git a/include/type_traits b/include/type_traits index 5624c4ec..1095fb4c 100644 --- a/include/type_traits +++ b/include/type_traits @@ -114,7 +114,6 @@ namespace std template struct is_same; template struct is_base_of; template struct is_convertible; - template struct underlying_type; // Alignment properties and transformations: template struct alignment_of; @@ -698,11 +697,21 @@ template struct is_polymorphic : public __libcpp_polymorphic<_Tp> {} // has_trivial_default_constructor -template struct __has_trivial_default_constructor : public integral_constant::value> {}; +#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) + +template struct has_trivial_default_constructor + : public integral_constant {}; + +#else // __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) + +template struct __has_trivial_default_constructor + : public integral_constant::value> {}; template struct has_trivial_default_constructor : public __has_trivial_default_constructor::type> {}; +#endif // __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) + // has_nothrow_default_constructor template struct has_nothrow_default_constructor : public has_trivial_default_constructor<_Tp> {}; @@ -1493,6 +1502,11 @@ class result_of<_Fn(_A0, _A1, _A2)> #endif // _LIBCPP_HAS_NO_VARIADICS +struct __any +{ + __any(...); +}; + #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE // template struct is_constructible; @@ -1503,11 +1517,6 @@ template decltype(_STD::move(_Tp(_STD::declval<_Args>()...)), true_type()) __is_constructible_test(_Tp&&, _Args&& ...); -struct __any -{ - __any(...); -}; - template false_type __is_constructible_test(__any, _Args&& ...); diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_default_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_default_constructor.pass.cpp index cf20c822..4d6b0fc5 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_default_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_default_constructor.pass.cpp @@ -62,16 +62,16 @@ int main() test_has_not_trivial_default_constructor(); test_has_not_trivial_default_constructor(); test_has_not_trivial_default_constructor(); + test_has_not_trivial_default_constructor(); + test_has_not_trivial_default_constructor(); + test_has_not_trivial_default_constructor(); test_has_trivial_default_constructor(); - test_has_trivial_default_constructor(); test_has_trivial_default_constructor(); test_has_trivial_default_constructor(); test_has_trivial_default_constructor(); test_has_trivial_default_constructor(); test_has_trivial_default_constructor(); test_has_trivial_default_constructor(); - test_has_trivial_default_constructor(); - test_has_trivial_default_constructor(); test_has_trivial_default_constructor(); }