diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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 <typename F> + class wrap + { + public: + template <typename... Args> + auto operator()(Args&&... args) const -> decltype(wrapped(args...)) // expected-note{{candidate template ignored: substitution failure [with Args = <int>]: use of undeclared identifier 'wrapped'}} + { + return wrapped(args...); + } + + private: + F wrapped; + }; + + void test(wrap<int (*)(int)> w) { + w(5); // expected-error{{no matching function for call to object of type 'wrap<int (*)(int)>'}} + } +} |