p15-cxx0x.cpp revision 4f3018eceac9cc32966e50ee900d8559efcaea21
1// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s 2template<typename T> struct X; 3template<int I> struct Y; 4 5X<X<int>> *x1; 6 7Y<(1 >> 2)> *y1; 8Y<1 >> 2> *y2; // FIXME: expected-error{{expected unqualified-id}} 9 10X<X<X<X<X<int>>>>> *x2; 11 12template<> struct X<int> { }; 13typedef X<int> X_int; 14struct Z : X_int { }; 15 16void 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 23template<typename T = void> struct X1 { }; 24X1<X1<>> x1a; 25