From 4ed49f375d6faee8c11a1324f1b6df845f12566e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 29 Sep 2010 21:14:36 +0000 Subject: When performing template argument deduction of a function template against a function type, be sure to check the type of the resulting function template specialization against the desired function type after substituting the deduced/defaulted template arguments. Fixes PR8196. llvm-svn: 115086 --- clang/test/SemaCXX/addr-of-overloaded-function.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'clang/test/SemaCXX/addr-of-overloaded-function.cpp') diff --git a/clang/test/SemaCXX/addr-of-overloaded-function.cpp b/clang/test/SemaCXX/addr-of-overloaded-function.cpp index 46bdf8e6b65..ab80d8f1416 100644 --- a/clang/test/SemaCXX/addr-of-overloaded-function.cpp +++ b/clang/test/SemaCXX/addr-of-overloaded-function.cpp @@ -104,3 +104,15 @@ namespace PR8033 { // expected-error{{cannot initialize a variable of type}} } + +namespace PR8196 { + template struct mcdata { + typedef int result_type; + }; + template + typename mcdata::result_type wrap_mean(mcdata const&); + void add_property(double(*)(mcdata const &)); // expected-note{{candidate function not viable: no overload of 'wrap_mean' matching}} + void f() { + add_property(&wrap_mean); // expected-error{{no matching function for call to 'add_property'}} + } +} -- cgit v1.2.3