comparison gcc/testsuite/g++.dg/cpp0x/alias-decl-8.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 struct A {
4 template <class U> using C = U;
5 };
6
7 // The particularity of the below struct is to have more than 7
8 // fields. In this case, looking up a member here should exercise
9 // cp/search.c:lookup_field_1 in such a way that it finds it in the
10 // CLASSTYPE_SORTED_FIELDS of struct A7.
11 struct A7 {
12 int f0;
13 int f1;
14 int f2;
15 int f3;
16 int f4;
17 int f5;
18 int f6;
19 int f7;
20 template <class U> using C = U;
21 };
22
23 template <class T>
24 struct B {
25 typename T::template C<int> n; //#0
26 };
27
28 // These should trigger the lookup
29 // of template C inside class A or
30 // A7, via #0.
31 B<A> b;
32 B<A7> c;