Debian Codegraph @

gcc/testsuite/g++.dg/template/virtual4.C

raw
1 // PR c++/56243
2
3 struct A
4 {
5 virtual int String ();
6 };
7
8 struct F: A { };
9
10 struct G
11 {
12 F value;
13 };
14
15 struct D
16 {
17 template <int>
18 void Verify()
19 {
20 G x;
21 F& name = x.value;
22 name.String();
23 }
24 };
25
26 int main()
27 {
28 D d;
29 d.Verify<42>();
30 }