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
15 public: explicit Y(float);
18 class X
{ // expected-note{{candidate constructor (the implicit copy constructor)}}
19 #if __cplusplus >= 201103L // C++11 or later
20 // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}}
24 explicit X(int); // expected-note{{candidate constructor}}
25 X(float, float, float); // expected-note{{candidate constructor}}
26 X(float, Y
); // expected-note{{candidate constructor}}
29 class Z
{ // expected-note{{candidate constructor (the implicit copy constructor)}}
30 #if __cplusplus >= 201103L // C++11 or later
31 // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}}
35 Z(int); // expected-note{{candidate constructor}}
41 X
x3(1.0, 1.0); // expected-error{{no matching constructor for initialization of 'X'}}
45 Z z
; // expected-error{{no matching constructor for initialization of 'Z'}}
49 operator int*() const;
52 struct Derived
: Base
{
53 operator int*(); // expected-note {{candidate function}}
56 void foo(const Derived cd
, Derived d
) {
57 int *pi
= cd
; // expected-error {{no viable conversion from 'const Derived' to 'int *'}}