[Bug c++/122494] [13/14/15/16 Regression] gcc rejects valid C++ codes with generic lambda and concepts; causing a not completed class

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 16 15:30:50 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122494

--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
A workaround for now is to either do:

         constexpr auto w = v;
         if constexpr (v == 0) {}

which forces 'v' to get first instantiated outside of a warning-dependent
folding context. Can also just do:

         if constexpr (v + 0 == 0) {}


More information about the Gcc-bugs mailing list