Debian Codegraph @

gcc/testsuite/g++.dg/template/dependent-expr8.C

raw
1 // Origin PR c++/48574
2 // { dg-do compile { target c++11 } }
3
4 struct A
5 {
6 virtual int foo();
7 };
8
9 void baz (int);
10
11 template <typename T>
12 void
13 bar(T x)
14 {
15 A &b = *x;
16 baz (b.foo ());
17 }
18
19 void
20 foo()
21 {
22 A a;
23 bar(&a);
24 }