Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/nontype-class35.C

raw
1 // PR c++/94592 - ICE with { } as template argument.
2 // { dg-do compile { target c++20 } }
3
4 struct A {
5 int i;
6 constexpr A(int n) : i(n) {}
7 };
8
9 template <A a> struct B { int i; constexpr B() : i(a.i) { } };
10
11 template<typename> void bar () {
12 B<{1}> var;
13 }
14
15 void fu() {
16 bar<int>();
17 }