https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110552
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > Looks like it is a lambda inside a decltype is causing it. The reason why I say that is if I change __apply_fn's operator() not to take a second argument and remove the lambda from the call to it in __tag_from, then this works.