Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / warn / Winit-list4.C
blobd136187e2c6a3a24cc16885a4f9e090d34c9ea3d
1 // PR c++/97632
2 // { dg-do compile { target c++20 } }
3 // Test we don't warn in an unevaluated operand.
5 #include <initializer_list>
7 template<typename _Tp>
8 concept default_initializable
9   = requires
10     {
11       _Tp{};
12       (void) ::new _Tp; // { dg-bogus "does not extend the lifetime" }
13     };
15 static_assert(default_initializable<std::initializer_list<int>>);