Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/69098-2.C

raw
1 // PR c++/69098
2 // { dg-do compile { target c++14 } }
3
4 struct A
5 {
6 template <int>
7 static void *pf;
8 };
9
10 template <typename B>
11 bool foo1 () {
12 return A::pf<false>;
13 }
14
15 template <typename B>
16 bool foo2 () {
17 return B::template pf<false>;
18 }
19
20 template <typename B>
21 bool foo3 () {
22 return &A::pf<false>;
23 }
24
25 template <typename B>
26 bool foo4 () {
27 return &B::template pf<false>;
28 }
29
30
31 void bar () {
32 foo1<A>();
33 foo2<A>();
34 foo3<A>();
35 foo4<A>();
36 }
37