Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/anon1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 struct x { |
131 | 2 int foo () { return 0; } |
111 | 3 }; |
4 | |
5 template <class T> | |
6 struct vector { | |
131 | 7 T& bar () { static T a; return a; } |
111 | 8 }; |
9 | |
10 template <class T> | |
11 struct y { | |
12 typedef struct { | |
13 x t; | |
14 } s; | |
15 | |
16 vector<s> array; | |
17 | |
18 int foo () | |
19 { return array.bar().t.foo(); } | |
20 }; | |
21 int i = y<x>().foo (); |