• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -fsyntax-only -fms-extensions -std=c++11 -verify %s
2 
3 namespace A {
4 
5 template <class T>
6 class ClassTemplate; // expected-note {{explicitly specialized declaration is here}}
7 
8 template <class T1, class T2>
9 class ClassTemplatePartial; // expected-note {{explicitly specialized declaration is here}}
10 
11 template <typename T> struct X {
12   struct MemberClass; // expected-note {{explicitly specialized declaration is here}}
13   enum MemberEnumeration; // expected-note {{explicitly specialized declaration is here}} // expected-error {{ISO C++ forbids forward references to 'enum' types}}
14 };
15 
16 }
17 
18 namespace B {
19 
20 template <>
21 class A::ClassTemplate<int>; // expected-warning {{class template specialization of 'ClassTemplate' outside namespace enclosing 'A' is a Microsoft extension}}
22 
23 template <class T1>
24 class A::ClassTemplatePartial<T1, T1 *> {}; // expected-warning {{class template partial specialization of 'ClassTemplatePartial' outside namespace enclosing 'A' is a Microsoft extension}}
25 
26 template <>
27 struct A::X<int>::MemberClass; // expected-warning {{member class specialization of 'MemberClass' outside namespace enclosing 'A' is a Microsoft extension}}
28 
29 template <>
30 enum A::X<int>::MemberEnumeration; // expected-warning {{member enumeration specialization of 'MemberEnumeration' outside namespace enclosing 'A' is a Microsoft extension}} // expected-error {{ISO C++ forbids forward references to 'enum' types}}
31 
32 }
33 
34