Debian Codegraph @

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

raw
1 // PR c++/96330
2 // { dg-do compile { target c++14 } }
3
4 struct foo_t {
5 template <class T> static constexpr bool bar = true;
6 };
7 constexpr foo_t foo{};
8
9 template <class T>
10 void f() {
11 int x = foo.bar<T>;
12 int y = foo_t::bar<T>;
13 }
14
15 template void f<int>();