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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2010-09-07 23:38:59 +00:00
parent 954b366317
commit 99ad765261
2 changed files with 20 additions and 37 deletions

View File

@@ -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)