diff options
Diffstat (limited to 'test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp')
-rw-r--r-- | test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp index 2530f128a49d4..8fb736ca0313e 100644 --- a/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp @@ -9,3 +9,36 @@ void g() { // Z is deduced to be double f("aa",3.0); // expected-error{{no matching}} } + +// PR5910 +namespace PR5910 { + template <typename T> + void Func() {} + + template <typename R> + void Foo(R (*fp)()); + + void Test() { + Foo(Func<int>); + } +} + +// PR5949 +namespace PR5949 { + struct Bar; + + template <class Container> + void quuz(const Container &cont) { + } + + template<typename T> + int Foo(Bar *b, void (*Baz)(const T &t), T * = 0) { + return 0; + } + + template<typename T> + int Quux(Bar *b, T * = 0) + { + return Foo<T>(b, quuz); + } +} |