Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/typename3.C

raw
1 // P0634R3
2 // { dg-do compile { target c++20 } }
3
4 template<class T>
5 void f(int i)
6 {
7 T::x * i; // { dg-error "dependent-name" }
8 }
9
10 struct Foo {
11 typedef int x;
12 };
13
14 struct Bar {
15 static int const x = 5;
16 };
17
18 int
19 main ()
20 {
21 f<Bar>(1);
22 f<Foo>(1);
23 }