summaryrefslogtreecommitdiff
path: root/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp
diff options
context:
space:
mode:
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.cpp11
1 files changed, 11 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
new file mode 100644
index 0000000000000..f4970b89f693e
--- /dev/null
+++ b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp
@@ -0,0 +1,11 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+template<class X, class Y, class Z> X f(Y,Z);
+
+void g() {
+ f<int,char*,double>("aa",3.0);
+ f<int,char*>("aa",3.0); // Z is deduced to be double
+ f<int>("aa",3.0); // Y is deduced to be char*, and
+ // Z is deduced to be double
+ f("aa",3.0); // expected-error{{no matching}}
+} \ No newline at end of file