diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2010-09-07 23:38:59 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2010-09-07 23:38:59 +0000 |
| commit | 331b3dd2ad1bb8ec9d2c6d6d676db988e7a95cdc (patch) | |
| tree | 4dddb8f6c7a6f790a6b51dfd5727b04015832bca /libcxx/include | |
| parent | a767c9a3aeb4a2844a1af3ba6bd9d1242dfc2524 (diff) | |
| download | bcm5719-llvm-331b3dd2ad1bb8ec9d2c6d6d676db988e7a95cdc.tar.gz bcm5719-llvm-331b3dd2ad1bb8ec9d2c6d6d676db988e7a95cdc.zip | |
has_trivial_copy_assign hooked up to clang (without workarounds). Filed http://llvm.org/bugs/show_bug.cgi?id=8109 to take care of several types which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle most of them in the library.
llvm-svn: 113312
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/type_traits | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 0f45f489dab..2aedd604176 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -769,20 +769,14 @@ template <class _Tp> struct has_copy_assign; #if defined(__clang__) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) -template <class _Tp, bool = is_void<_Tp>::value> -struct __has_trivial_copy_assign - : public integral_constant<bool, __has_trivial_assign(_Tp)> {}; - -template <class _Tp> struct __has_trivial_copy_assign<_Tp, true> - : public false_type {}; - template <class _Tp> struct has_trivial_copy_assign - : __has_trivial_copy_assign<_Tp> {}; + : public integral_constant<bool, __has_trivial_assign(_Tp)> {}; #else template <class _Tp> struct has_trivial_copy_assign - : public integral_constant<bool, is_scalar<_Tp>::value && !is_const<_Tp>::value> {}; + : public integral_constant<bool, is_scalar<_Tp>::value && + !is_const<_Tp>::value> {}; #endif // defined(__clang__) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) |

