Qualify an internal call in is_assignable to prevent ADL lookup, which would 'complete' an type definition unnecessarily. Thanks to Richard Smith for the report.

llvm-svn: 234886
This commit is contained in:
Marshall Clow 2015-04-14 13:53:53 +00:00
parent 5867a70057
commit daa4d45c0a
2 changed files with 7 additions and 1 deletions
libcxx
include
test/std/utilities/meta/meta.unary/meta.unary.prop

View File

@ -1533,7 +1533,7 @@ template <class _Tp, class _Arg, bool = is_void<_Tp>::value || is_void<_Arg>::va
struct __is_assignable_imp
: public common_type
<
decltype(__is_assignable_test(declval<_Tp>(), declval<_Arg>()))
decltype(_VSTD::__is_assignable_test(declval<_Tp>(), declval<_Arg>()))
>::type {};
template <class _Tp, class _Arg>

View File

@ -49,6 +49,9 @@ struct E
};
#endif
template <typename T>
struct X { T t; };
int main()
{
test_is_assignable<int&, int&> ();
@ -67,4 +70,7 @@ int main()
test_is_not_assignable<void, const void> ();
test_is_not_assignable<const void, const void> ();
test_is_not_assignable<int(), int> ();
// pointer to incomplete template type
test_is_assignable<X<D>*&, X<D>*> ();
}