From e79ce292d93f955c1219c3977c02199bd3dc6544 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 26 Mar 2013 22:43:55 +0000 Subject: Handle 'this->' insertion recovery within trailing return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178081 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/CXX/expr/expr.prim/expr.prim.general') diff --git a/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp b/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp index 2e7b58d97a..66579915c7 100644 --- a/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp @@ -116,3 +116,23 @@ namespace PR12564 { void foo(Derived& d) noexcept(noexcept(d.bar(d))) {} // expected-error {{cannot bind to a value of unrelated type}} }; } + +namespace rdar13473493 { + template + class wrap + { + public: + template + auto operator()(Args&&... args) const -> decltype(wrapped(args...)) // expected-note{{candidate template ignored: substitution failure [with Args = ]: use of undeclared identifier 'wrapped'}} + { + return wrapped(args...); + } + + private: + F wrapped; + }; + + void test(wrap w) { + w(5); // expected-error{{no matching function for call to object of type 'wrap'}} + } +} -- cgit v1.2.1