1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
5 template<class X
, class Y
, class Z
> X
f(Y
,Z
); // expected-note {{candidate template ignored: couldn't infer template argument 'X'}}
8 f
<int,char*,double>("aa",3.0);
9 #if __cplusplus <= 199711L // C++03 or earlier modes
10 // expected-warning@-2{{conversion from string literal to 'char *' is deprecated}}
12 // expected-warning@-4{{ISO C++11 does not allow conversion from string literal to 'char *'}}
15 f
<int,char*>("aa",3.0); // Z is deduced to be double
16 #if __cplusplus <= 199711L
17 // expected-warning@-2{{conversion from string literal to 'char *' is deprecated}}
19 // expected-warning@-4{{ISO C++11 does not allow conversion from string literal to 'char *'}}
22 f
<int>("aa",3.0); // Y is deduced to be char*, and
23 // Z is deduced to be double
24 f("aa",3.0); // expected-error{{no matching}}
44 template <class Container
>
45 void quuz(const Container
&cont
) {
49 int Foo(Bar
*b
, void (*Baz
)(const T
&t
), T
* = 0) {
54 int Quux(Bar
*b
, T
* = 0)
56 return Foo
<T
>(b
, quuz
);
72 template<class R
,class B1
>