1 // RUN: %clang_cc1 -fsyntax-only %s 2 3 struct AnyT { 4 template<typename T> 5 operator T(); 6 }; 7 8 void test_cvqual_ref(AnyT any) { 9 const int &cir = any; 10 } 11 12 struct AnyThreeLevelPtr { 13 template<typename T> 14 operator T***() const 15 { 16 T x = 0; 17 // FIXME: looks like we get this wrong, too! 18 // x = 0; // will fail if T is deduced to a const type 19 // (EDG and GCC get this wrong) 20 return 0; 21 } 22 }; 23 24 struct X { }; 25 26 void test_deduce_with_qual(AnyThreeLevelPtr a3) { 27 int * const * const * const ip = a3; 28 } 29 30 struct AnyPtrMem { 31 template<typename Class, typename T> 32 operator T Class::*() const 33 { 34 T x = 0; 35 // FIXME: looks like we get this wrong, too! 36 // x = 0; // will fail if T is deduced to a const type. 37 // (EDG and GCC get this wrong) 38 return 0; 39 } 40 }; 41 42 void test_deduce_ptrmem_with_qual(AnyPtrMem apm) { 43 const float X::* pm = apm; 44 } 45