p3.cpp revision 16134c62ef3d146e0dd0c76aafb906ff12c0a15d
1// RUN: clang-cc -fsyntax-only -verify %s 2 3template<class X, class Y, class Z> X f(Y,Z); 4 5void g() { 6 f<int,char*,double>("aa",3.0); 7 f<int,char*>("aa",3.0); // Z is deduced to be double 8 f<int>("aa",3.0); // Y is deduced to be char*, and 9 // Z is deduced to be double 10 f("aa",3.0); // expected-error{{no matching}} 11}