111
|
1 // { dg-do compile { target c++11 } }
|
|
2
|
|
3 // alias template of a partial specialization
|
|
4
|
|
5 template<class T, class U, class W> struct S0 {};
|
|
6 template<class T, class U> struct S0<T, U, char> {};
|
|
7 template<class T> using AS0 = S0<T, int, char>;
|
|
8 void foo(S0<bool, int, char>);
|
|
9
|
|
10 AS0<bool> a; // OK
|
|
11
|
|
12 void
|
|
13 f()
|
|
14 {
|
|
15 foo(a); //OK
|
|
16 }
|
|
17
|
|
18 // alias template of an explicit specialization of a member template
|
|
19
|
|
20 template<class T>
|
|
21 struct S1 {
|
|
22 template<class U>
|
|
23 struct M {};
|
|
24 };
|
|
25 template<class T> using AM = S1<int>::M<T>;
|
|
26 void bar(S1<int>::M<bool>);
|
|
27
|
|
28 AM<bool> b; //OK.
|
|
29
|
|
30 void
|
|
31 g()
|
|
32 {
|
|
33 bar(b); //OK
|
|
34 }
|