Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/lambda-targ13b.C

raw
1 // PR c++/119574
2 // A version of lambda-targ13.C where the inner lambda returns non-void.
3 // { dg-do compile { target c++20 } }
4
5 template <class F = decltype([] <auto G = [] { return 42; }> () { return G(); })>
6 constexpr int f(F op = {}) { return op(); }
7
8 static_assert(f() == 42);