| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | // FIXME: [temp.deduct.conv]p2 bullets 1 and 2 can't actually happen without |
| 5 | // references? |
| 6 | // struct ConvertibleToArray { |
| 7 | // // template<typename T, unsigned N> |
| 8 | // // operator T(()[]) const; |
| 9 | |
| 10 | // private: |
| 11 | // typedef int array[17]; |
| 12 | |
| 13 | // operator array() const; |
| 14 | // }; |
| 15 | |
| 16 | // void test_array(ConvertibleToArray cta) { |
| 17 | // int *ip = cta; |
| 18 | // ip = cta; |
| 19 | // const float *cfp = cta; |
| 20 | // } |
| 21 | |
| 22 | // bullet 2 |
| 23 | // struct ConvertibleToFunction { |
| 24 | // template<typename T, typename A1, typename A2> |
| 25 | // operator T(A1, A2) const () { }; |
| 26 | // }; |
| 27 | |
| 28 | // bullet 3 |
| 29 | struct ConvertibleToCVQuals { |
| 30 | template<typename T> |
| 31 | operator T* const() const; |
| 32 | }; |
| 33 | |
| 34 | void test_cvqual_conv(ConvertibleToCVQuals ctcv) { |
| 35 | int *ip = ctcv; |
| 36 | const int *icp = ctcv; |
| 37 | } |
| 38 | |