Home | History | Annotate | Download | only in temp.param
      1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
      2 template<typename T> struct X;
      3 template<int I> struct Y;
      4 
      5 X<X<int>> *x1;
      6 
      7 Y<(1 >> 2)> *y1;
      8 Y<1 >> 2> *y2; // FIXME: expected-error{{expected unqualified-id}}
      9 
     10 X<X<X<X<X<int>>>>> *x2;
     11 
     12 template<> struct X<int> { };
     13 typedef X<int> X_int;
     14 struct Z : X_int { };
     15 
     16 void f(const X<int> x) {
     17   (void)reinterpret_cast<X<int>>(x); // expected-error{{reinterpret_cast from}}
     18   (void)reinterpret_cast<X<X<X<int>>>>(x); // expected-error{{reinterpret_cast from}}
     19 
     20   X<X<int>> *x1;
     21 }
     22 
     23 template<typename T = void> struct X1 { };
     24 X1<X1<>> x1a;
     25