template-decl-fail.cpp 364 B

12345678910
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. template<typename T> typedef T X; // expected-error{{typedef cannot be a template}}
  3. template<typename T>
  4. enum t0 { A = T::x }; // expected-error{{enumeration cannot be a template}} \
  5. // expected-warning{{declaration does not declare anything}}
  6. enum e0 {};
  7. template<int x> enum e0 f0(int a=x) {}