[Bug c++/115722] GCC uses old closure type when using as default argument instead of using new closure type each time
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 1 05:43:58 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115722
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You missed this part:
The closure type is declared in the smallest block scope, class scope, or
namespace scope that contains the corresponding lambda-expression.
from expr.prim.lambda.closure/2
Which means the closure type is in the global scope here for this TU.
More information about the Gcc-bugs
mailing list