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