forked from OSchip/llvm-project
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:
parent
5867a70057
commit
daa4d45c0a
libcxx
|
@ -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>
|
||||
|
|
|
@ -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>*> ();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue