On Tue, Mar 3, 2020 at 9:57 PM Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > What they're doing seems kinda OK, but I think it's not actually > allowed by the standard. The wording does say that unless the lambda > uses the mutable keyword, the function call operator is > const-qualified. > > So I think this is a bug. Thanks Jonathan, yep makes sense. I've filed a bug report just in case: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94025