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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@234886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
66302c650b
commit
3a4964aef3
@ -1533,7 +1533,7 @@ template <class _Tp, class _Arg, bool = is_void<_Tp>::value || is_void<_Arg>::va
|
|||||||
struct __is_assignable_imp
|
struct __is_assignable_imp
|
||||||
: public common_type
|
: public common_type
|
||||||
<
|
<
|
||||||
decltype(__is_assignable_test(declval<_Tp>(), declval<_Arg>()))
|
decltype(_VSTD::__is_assignable_test(declval<_Tp>(), declval<_Arg>()))
|
||||||
>::type {};
|
>::type {};
|
||||||
|
|
||||||
template <class _Tp, class _Arg>
|
template <class _Tp, class _Arg>
|
||||||
|
@ -49,6 +49,9 @@ struct E
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct X { T t; };
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
test_is_assignable<int&, int&> ();
|
test_is_assignable<int&, int&> ();
|
||||||
@ -67,4 +70,7 @@ int main()
|
|||||||
test_is_not_assignable<void, const void> ();
|
test_is_not_assignable<void, const void> ();
|
||||||
test_is_not_assignable<const void, const void> ();
|
test_is_not_assignable<const void, const void> ();
|
||||||
test_is_not_assignable<int(), int> ();
|
test_is_not_assignable<int(), int> ();
|
||||||
|
|
||||||
|
// pointer to incomplete template type
|
||||||
|
test_is_assignable<X<D>*&, X<D>*> ();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user