brintos

brintos / llvm-project-archived public Read only

0
0
Text · 801 B · badd5a8 Raw
38 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4// FIXME: [temp.deduct.conv]p2 bullets 1 and 2 can't actually happen without5// 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 223// struct ConvertibleToFunction {24//   template<typename T, typename A1, typename A2>25//   operator T(A1, A2) const ()  { };26// };27 28// bullet 329struct ConvertibleToCVQuals {30  template<typename T>31  operator T* const() const;32};33 34void test_cvqual_conv(ConvertibleToCVQuals ctcv) {35  int *ip = ctcv;36  const int *icp = ctcv;37}38