c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / nontype-class58.C
blob5bb335ca9e7781bb4e383adccb062445cddedd33
1 // PR c++/110122
2 // { dg-do compile { target c++20 } }
4 struct Foo {
5   Foo() = default;
6   constexpr Foo(const Foo&) { }
7 };
9 struct Bar {
10   Foo _;
13 template<Bar V>
14 struct A {
15   A() {
16     [](auto){ A<V> d; }(0); // { dg-bogus "used before its definition" }
17   };
20 A<Bar{}> a;