Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/alias-decl-3.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // { dg-do compile { target c++11 } } | |
2 | |
3 // Exercise some member alias templates ... | |
4 | |
5 template<class T, class U> class A0 {}; | |
6 | |
7 template<class T> | |
8 struct A1 { | |
9 template<class U> struct S {}; | |
10 template<class U> using AA0 = A0<T, U>; | |
11 | |
12 void f(A0<T, int>); | |
13 | |
14 void | |
15 foo() | |
16 { | |
17 AA0<int> a; | |
18 const AA0<int> b; | |
19 f(a); | |
20 f(b); | |
21 } | |
22 }; | |
23 | |
24 void | |
25 bar() | |
26 { | |
27 A1<int> a1; | |
28 a1.foo(); | |
29 A1<int>::AA0<int> a1aa0; | |
30 a1.f(a1aa0); | |
31 } | |
32 | |
33 // ... some simple member alias ... | |
34 struct B { | |
35 using A = int; | |
36 }; | |
37 | |
38 B::A a; | |
39 | |
40 // ... and some simple alias | |
41 | |
42 using Int = int; |