Debian Codegraph @

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

raw
1 // PR c++/110122
2 // { dg-do compile { target c++20 } }
3
4 struct Foo {
5 Foo() = default;
6 constexpr Foo(const Foo&) { }
7 };
8
9 struct Bar {
10 Foo _;
11 };
12
13 template<Bar V>
14 struct A {
15 A() {
16 [](auto){ A<V> d; }(0); // { dg-bogus "used before its definition" }
17 };
18 };
19
20 A<Bar{}> a;