From 3a4964aef37d746a78d88b632c49290dda824108 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 14 Apr 2015 13:53:53 +0000 Subject: [PATCH] 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 --- include/type_traits | 2 +- .../meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/type_traits b/include/type_traits index aad94256..1b2c63e3 100644 --- a/include/type_traits +++ b/include/type_traits @@ -1533,7 +1533,7 @@ template ::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 diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp index b46a4d6b..d33019bc 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp @@ -49,6 +49,9 @@ struct E }; #endif +template +struct X { T t; }; + int main() { test_is_assignable (); @@ -67,4 +70,7 @@ int main() test_is_not_assignable (); test_is_not_assignable (); test_is_not_assignable (); + +// pointer to incomplete template type + test_is_assignable*&, X*> (); }