https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116439
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> --- Ah yes, that's PR115504 I think. The original fix was incorrectly stripping references from the captured variable type which was fixed for 14.2 by r15-1631. It's correct but certainly weird that the current rules mean the second to last decltype(auto) is invalid, because decltype(source) is S& but the closure member is const S&..