diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-07-25 02:08:55 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-07-25 02:08:55 +0000 |
commit | 79586dca74231f652ad158fca10f6fc56fc94e52 (patch) | |
tree | 42c3698fb159eddcd71e87ad91b3c8f9ece65686 /libcxx/include | |
parent | 189f88ca35cd038da52bfdb338e37a0c15fa69bb (diff) | |
download | bcm5719-llvm-79586dca74231f652ad158fca10f6fc56fc94e52.tar.gz bcm5719-llvm-79586dca74231f652ad158fca10f6fc56fc94e52.zip |
Make std::is_assignable tolerate references to incomplete types.
llvm-svn: 276599
Diffstat (limited to 'libcxx/include')
-rw-r--r-- | libcxx/include/type_traits | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 14ed698dfbd..0d578bbe0bd 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -2036,26 +2036,15 @@ template<typename, typename _Tp> struct __select_2nd { typedef _Tp type; }; template <class _Tp, class _Arg> typename __select_2nd<decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>())), true_type>::type -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES -__is_assignable_test(_Tp&&, _Arg&&); -#else -__is_assignable_test(_Tp, _Arg&); -#endif +__is_assignable_test(int); + +template <class, class> +false_type __is_assignable_test(...); -template <class _Arg> -false_type -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES -__is_assignable_test(__any, _Arg&&); -#else -__is_assignable_test(__any, _Arg&); -#endif template <class _Tp, class _Arg, bool = is_void<_Tp>::value || is_void<_Arg>::value> struct __is_assignable_imp - : public common_type - < - decltype(_VSTD::__is_assignable_test(declval<_Tp>(), declval<_Arg>())) - >::type {}; + : public decltype((_VSTD::__is_assignable_test<_Tp, _Arg>(0))) {}; template <class _Tp, class _Arg> struct __is_assignable_imp<_Tp, _Arg, true> |