Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/var-templ75.C

raw
1 // PR c++/108848
2 // { dg-do compile { target c++14 } }
3
4 template<class T>
5 struct tag_t {
6 template<class Sig>
7 static constexpr const Sig* var = nullptr;
8
9 template<class Sig>
10 static const Sig* fun();
11 };
12
13 template<class T>
14 constexpr tag_t<T> tag;
15
16 template<class T>
17 void f() {
18 tag<int>.var<void>; // { dg-bogus "expected 'template' keyword" }
19 tag<int>.fun<void>(); // { dg-bogus "expected 'template' keyword" }
20 };