diff options
Diffstat (limited to 'test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp')
-rw-r--r-- | test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp index 4f6dcc1105..33efac0248 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp @@ -27,3 +27,21 @@ void test_f2(int *ip, float *fp) { f2(ip, ip); // okay f2(ip, fp); // expected-error{{no matching function}} } + +namespace test3 { + template<typename T> + struct bar { }; + + template<typename T> + struct foo { + operator bar<T>(); + }; + + template<typename T> + void func(bar<T>) { // expected-note {{candidate template ignored: could not match 'bar' against 'foo'}} + } + + void test() { + func(foo<int>()); // expected-error {{no matching function}} + } +} |