gcc/testsuite/g++.dg/conversion/op6.C
raw| 1 | // Origin: PR c++/42766 |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | template<class T> class smart_pointer { |
| 5 | public: |
| 6 | operator T* () const { return 0; } |
| 7 | operator bool () const { return true; } |
| 8 | operator bool () { return true; } |
| 9 | }; |
| 10 | class Context { }; |
| 11 | typedef smart_pointer<Context> ContextP; |
| 12 | class SvnClient { |
| 13 | ~SvnClient(); |
| 14 | ContextP svnContext; |
| 15 | }; |
| 16 | SvnClient::~SvnClient() { |
| 17 | delete svnContext; |
| 18 | } |