Debian Codegraph @

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

raw
1 // PR c++/100079
2 // { dg-do compile { target c++20 } }
3
4 template <auto value>
5 struct Foo {
6 using SomeTypeAlias = int;
7
8 Foo() {}
9 };
10
11 template <class T>
12 struct Bar {
13 T value;
14
15 constexpr Bar(const T& value)
16 : value{value}
17 {}
18 };
19
20 template <int N>
21 struct Baz {};
22
23 constexpr auto baz = Baz<42>{};
24
25 const Foo<Bar<Baz<42>>{baz}> test{};