Author: marshall
Date: Tue Apr 14 08:53:53 2015
New Revision: 234886
URL: http://llvm.org/viewvc/llvm-project?rev=234886&view=rev
Log:
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.
Modified:
libcxx/trunk/include/type_traits
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
Modified: libcxx/trunk/include/type_traits
URL:
http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=234886&r1=234885&r2=234886&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Tue Apr 14 08:53:53 2015
@@ -1533,7 +1533,7 @@ template <class _Tp, class _Arg, bool =
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>
Modified:
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
URL:
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp?rev=234886&r1=234885&r2=234886&view=diff
==============================================================================
---
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
(original)
+++
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
Tue Apr 14 08:53:53 2015
@@ -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>*> ();
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits