https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115722
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jason Liam from comment #8) > > Which means the closure type is in the global scope here for this TU. > > I did read that before posting actually. But even if they're in the global > scope in same TUs they should still produce unique/distinct closure-type > each time. See demo https://godbolt.org/z/GbTcvT9z8 Again you are talking about 2 different things. The question is meaning of evaluation here. And if evaluation means to create 2 different closure types. I am saying the closure type is defined at the point where the default argument is defined and not at the point of evaluation. That is based on the readings of the standard.