xref: /minix3/external/bsd/llvm/dist/clang/test/PCH/cxx-ms-function-specialization-class-scope.h (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc 
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc template <class T>
5*f4a2713aSLionel Sambuc class B {
6*f4a2713aSLionel Sambuc public:
7*f4a2713aSLionel Sambuc 	template <class U>
B(U p)8*f4a2713aSLionel Sambuc     B(U p) {
9*f4a2713aSLionel Sambuc 	}
10*f4a2713aSLionel Sambuc 	template <>
B(int p)11*f4a2713aSLionel Sambuc     B(int p) { // expected-warning{{explicit specialization of 'B<T>' within class scope is a Microsoft extension}}
12*f4a2713aSLionel Sambuc 	}
13*f4a2713aSLionel Sambuc 
14*f4a2713aSLionel Sambuc 	template <class U>
f(U p)15*f4a2713aSLionel Sambuc     void f(U p) {
16*f4a2713aSLionel Sambuc 	  T y = 9;
17*f4a2713aSLionel Sambuc 	}
18*f4a2713aSLionel Sambuc 
19*f4a2713aSLionel Sambuc 
20*f4a2713aSLionel Sambuc     template <>
f(int p)21*f4a2713aSLionel Sambuc     void f(int p) { // expected-warning{{explicit specialization of 'f' within class scope is a Microsoft extension}}
22*f4a2713aSLionel Sambuc 	  T a = 3;
23*f4a2713aSLionel Sambuc 	}
24*f4a2713aSLionel Sambuc 
f(int p)25*f4a2713aSLionel Sambuc 	void f(int p) {
26*f4a2713aSLionel Sambuc  	  T a = 3;
27*f4a2713aSLionel Sambuc     }
28*f4a2713aSLionel Sambuc };
29*f4a2713aSLionel Sambuc 
30