Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/constexpr-template2.C

raw
1 // PR c++/109876
2 // { dg-do compile { target c++17 } }
3
4 struct Foo {};
5 template <const Foo&> struct X {};
6
7 void g()
8 {
9 static constexpr Foo foo{};
10 X<foo> x;
11 }
12
13 template<int>
14 void f()
15 {
16 static constexpr Foo foo{};
17 X<foo> x;
18 }
19
20 void
21 h ()
22 {
23 f<0>();
24 f<1>();
25 }