xref: /aosp_15_r20/external/clang/test/SemaTemplate/temp_explicit_cxx0x.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2*67e74705SXin Li namespace N1 {
3*67e74705SXin Li 
4*67e74705SXin Li   template<typename T> struct X0 { }; // expected-note{{here}}
5*67e74705SXin Li 
6*67e74705SXin Li   namespace Inner {
7*67e74705SXin Li     template<typename T> struct X1 { };
8*67e74705SXin Li   }
9*67e74705SXin Li 
10*67e74705SXin Li   template struct X0<int>;
11*67e74705SXin Li   template struct Inner::X1<int>;
12*67e74705SXin Li }
13*67e74705SXin Li 
14*67e74705SXin Li template<typename T> struct X2 { }; // expected-note{{here}}
15*67e74705SXin Li 
16*67e74705SXin Li template struct ::N1::Inner::X1<float>;
17*67e74705SXin Li 
18*67e74705SXin Li namespace N2 {
19*67e74705SXin Li   using namespace N1;
20*67e74705SXin Li 
21*67e74705SXin Li   template struct X0<double>; // expected-error{{must occur in namespace 'N1'}}
22*67e74705SXin Li 
23*67e74705SXin Li   template struct X2<float>; // expected-error{{at global scope}}
24*67e74705SXin Li }
25