1 // RUN: clang-cc -fsyntax-only -verify -std=c++0x %s
5 operator char *(); // expected-note {{candidate function}}
9 operator int *(); // expected-note {{candidate function}}
14 delete d; // expected-error {{ambiguous conversion of delete expression of type 'struct D' to a pointer}}
33 operator const int *(); // expected-note {{candidate function}}
37 operator int *(); // expected-note {{candidate function}}
42 delete d; // expected-error {{ambiguous conversion of delete expression of type 'struct D2' to a pointer}}
47 operator const int *(); // expected-note {{candidate function}}
51 operator const int *(); // expected-note {{candidate function}}
59 delete d; // expected-error {{mbiguous conversion of delete expression of type 'struct D3' to a pointer}}
68 void f4(X x) { delete x; delete x; }
74 template<typename T> operator T*() const; // converts to any pointer!
77 void f5(X1 x) { delete x; } // OK. In selecting a conversion to pointer function, template convesions are skipped.
84 struct Derived : Base {
85 // not the same function as Base's non-const operator int()
86 operator int*() const;
89 void foo6(const Derived cd, Derived d) {
90 // overload resolution selects Derived::operator int*() const;
97 template<typename T> operator T*() const;
101 template<typename T> operator T*() const; // hides base conversion
102 operator int *() const;
107 // OK. In selecting a conversion to pointer function, template convesions are skipped.