summaryrefslogtreecommitdiff
path: root/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p2.cpp
blob: 5a9ea084fd61819e07e75374ec5bf809a31328d2 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// RUN: %clang_cc1 -fsyntax-only -verify %s

// FIXME: [temp.deduct.conv]p2 bullets 1 and 2 can't actually happen without
// references?
// struct ConvertibleToArray {
//   //  template<typename T, unsigned N>
//   //  operator T(()[]) const;

// private:
//   typedef int array[17];

//   operator array() const;
// };

// void test_array(ConvertibleToArray cta) {
//   int *ip = cta;
//   ip = cta;
//   const float *cfp = cta;
// }

// bullet 2
// struct ConvertibleToFunction {
//   template<typename T, typename A1, typename A2>
//   operator T(A1, A2) const ()  { };
// };

// bullet 3
struct ConvertibleToCVQuals {
  template<typename T>
  operator T* const() const;
};

void test_cvqual_conv(ConvertibleToCVQuals ctcv) {
  int *ip = ctcv;
  const int *icp = ctcv;
}