Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -std=c++0x -verify %s |
Douglas Gregor | 3965b7b | 2009-02-25 23:02:36 +0000 | [diff] [blame] | 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 | |