p2-cxx0x.cpp revision 17fb855280be411389361f1c79753e0013c4187c
1// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s 2 3// C++03 imposed restrictions in this paragraph that were lifted with 0x, so we 4// just test that the example given now parses cleanly. 5 6template <class T> class X { }; 7template <class T> void f(T t) { } 8struct { } unnamed_obj; 9void f() { 10 struct A { }; 11 enum { e1 }; 12 typedef struct { } B; 13 B b; 14 X<A> x1; 15 X<A*> x2; 16 X<B> x3; 17 f(e1); 18 f(unnamed_obj); 19 f(b); 20} 21