https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92270
Yuki Wada <jostaberry.jam at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #1 from Yuki Wada <jostaberry.jam at gmail dot com> --- I'm really sorry, this is a bug in my code. The code above causes hard error by deducing lambda return type. I fixed my code by giving the lambda an explicit return type rather than a deduced return type: instance.fn([](auto& i) -> void { i = 0; });