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