Debian Codegraph @

gcc/testsuite/g++.dg/cpp23/static-operator-call3.C

raw
1 // P1169R4 - static operator()
2 // { dg-do compile { target c++14 } }
3 // { dg-options "" }
4
5 void
6 foo ()
7 {
8 auto a = [] (auto x) static { return x; }; // { dg-warning "'static' only valid in lambda with" "" { target c++20_down } }
9 int (*b) (int) = a;
10 }