| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s |
| // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
| public: explicit Y(float); |
| class X { // expected-note{{candidate constructor (the implicit copy constructor)}} |
| #if __cplusplus >= 201103L // C++11 or later |
| // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} |
| explicit X(int); // expected-note{{candidate constructor}} |
| X(float, float, float); // expected-note{{candidate constructor}} |
| X(float, Y); // expected-note{{candidate constructor}} |
| class Z { // expected-note{{candidate constructor (the implicit copy constructor)}} |
| #if __cplusplus >= 201103L // C++11 or later |
| // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} |
| Z(int); // expected-note{{candidate constructor}} |
| X x3(1.0, 1.0); // expected-error{{no matching constructor for initialization of 'X'}} |
| Z z; // expected-error{{no matching constructor for initialization of 'Z'}} |
| operator int*(); // expected-note {{candidate function}} |
| void foo(const Derived cd, Derived d) { |
| int *pi = cd; // expected-error {{no viable conversion from 'const Derived' to 'int *'}} |