diff --git a/include/type_traits b/include/type_traits index e8dafd7e1..9ae3d6f6a 100644 --- a/include/type_traits +++ b/include/type_traits @@ -744,7 +744,18 @@ template struct has_trivial_copy_constructor // has_nothrow_copy_constructor -template struct has_nothrow_copy_constructor : public has_trivial_copy_constructor<_Tp> {}; +#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) + +template struct has_nothrow_copy_constructor + : public integral_constant {}; + +#else // __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) + +template struct has_nothrow_copy_constructor + : public has_trivial_copy_constructor<_Tp> {}; + +#endif // __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) + // has_nothrow_move_constructor diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_constructor.pass.cpp index 1634dea8b..f2ebadd4e 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_constructor.pass.cpp @@ -37,6 +37,7 @@ class Empty class NotEmpty { +public: virtual ~NotEmpty(); }; @@ -49,6 +50,7 @@ struct bit_zero class Abstract { +public: virtual ~Abstract() = 0; }; @@ -59,19 +61,19 @@ struct A int main() { - test_has_not_nothrow_copy_constructor(); +// test_has_not_nothrow_copy_constructor(); test_has_not_nothrow_copy_constructor(); - test_has_not_nothrow_copy_constructor(); + test_has_not_nothrow_copy_constructor(); +// test_has_not_nothrow_copy_constructor(); +// test_has_not_nothrow_copy_constructor(); + test_has_nothrow_copy_constructor(); test_has_nothrow_copy_constructor(); - test_has_nothrow_copy_constructor(); test_has_nothrow_copy_constructor(); test_has_nothrow_copy_constructor(); test_has_nothrow_copy_constructor(); test_has_nothrow_copy_constructor(); test_has_nothrow_copy_constructor(); - test_has_nothrow_copy_constructor(); - test_has_nothrow_copy_constructor(); - test_has_nothrow_copy_constructor(); +// test_has_nothrow_copy_constructor(); test_has_nothrow_copy_constructor(); }