aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-3.C
blob: 2204c250cec7dc0251d1d2ebe64eb3fa26203309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// { dg-do compile { target c++11 } }

// Exercise some member alias templates ...

template<class T, class U> class A0 {};

template<class T>
struct A1 {
    template<class U> struct S {};
    template<class U> using AA0 = A0<T, U>;

  void f(A0<T, int>);

  void
  foo()
  {
    AA0<int> a;
    const AA0<int> b;
    f(a);
    f(b);
  }
};

void
bar()
{
    A1<int> a1;
    a1.foo();
    A1<int>::AA0<int> a1aa0;
    a1.f(a1aa0);
}

// ... some simple member alias ...
struct B {
    using A = int;
};

B::A a;

// ... and some simple alias

using Int = int;