• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 // There is no semantic difference between class and typename in a
4 // template-parameter. typename followed by an unqualified-id names a
5 // template type parameter.
6 template<class T> struct X;
7 template<typename T> struct X;
8 
9 // typename followed by aqualified-id denotes the type in a non-type
10 // parameter-declaration.
11 template<typename T, typename T::type Value> struct Y0;
12 template<typename T, typename X<T>::type Value> struct Y1;
13 
14 // A storage class shall not be specified in a template-parameter declaration.
15 template<static int Value> struct Z; // FIXME: expect an error
16 
17 // Make sure that we properly disambiguate non-type template parameters that
18 // start with 'class'.
19 class X1 { };
20 template<class X1 *xptr> struct Y2 { };
21 
22 // FIXME: add the example from p2
23