diff --git a/libcxx/include/__config b/libcxx/include/__config index 87213fcbdfe3..ebd71c6e4fdd 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -88,7 +88,10 @@ #define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES + +#ifndef __GXX_EXPERIMENTAL_CXX0X__ #define _LIBCPP_HAS_NO_UNICODE_CHARS +#endif #if !(__has_feature(cxx_exceptions)) #define _LIBCPP_NO_EXCEPTIONS diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index cf6d091d2eff..e8dafd7e1398 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -728,11 +728,19 @@ template struct has_nothrow_default_constructor // has_trivial_copy_constructor -template struct __has_trivial_copy_constructor : public integral_constant::value || - is_reference<_Tp>::value> {}; +#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) template struct has_trivial_copy_constructor - : public __has_trivial_copy_constructor::type> {}; + : public integral_constant {}; + +#else // __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) + +template struct has_trivial_copy_constructor + : public integral_constant::value || + is_reference<_Tp>::value> {}; + + +#endif // __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 || defined(__clang__) // has_nothrow_copy_constructor diff --git a/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_constructor.pass.cpp b/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_constructor.pass.cpp index c51b77267289..57566504f7c3 100644 --- a/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_constructor.pass.cpp +++ b/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_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; }; @@ -61,17 +63,17 @@ int main() { test_has_not_trivial_copy_constructor(); test_has_not_trivial_copy_constructor(); - test_has_not_trivial_copy_constructor(); + test_has_not_trivial_copy_constructor(); + test_has_not_trivial_copy_constructor(); + test_has_not_trivial_copy_constructor(); + test_has_not_trivial_copy_constructor(); + test_has_trivial_copy_constructor(); test_has_trivial_copy_constructor(); - test_has_trivial_copy_constructor(); test_has_trivial_copy_constructor(); test_has_trivial_copy_constructor(); test_has_trivial_copy_constructor(); test_has_trivial_copy_constructor(); test_has_trivial_copy_constructor(); - test_has_trivial_copy_constructor(); - test_has_trivial_copy_constructor(); - test_has_trivial_copy_constructor(); test_has_trivial_copy_constructor(); }