summaryrefslogtreecommitdiffstats
path: root/test/CXX/temp/temp.arg/temp.arg.type/p2-cxx0x.cpp
blob: 6f6286f710780b6cced67ef71e1e9704bb69f03b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s

// C++03 imposed restrictions in this paragraph that were lifted with 0x, so we
// just test that the example given now parses cleanly.

template <class T> class X { };
template <class T> void f(T t) { }
struct { } unnamed_obj;
void f() {
  struct A { };
  enum { e1 };
  typedef struct { } B;
  B b;
  X<A> x1;
  X<A*> x2;
  X<B> x3;
  f(e1);
  f(unnamed_obj);
  f(b);
}