https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87322
--- Comment #5 from Alexandre Oliva <aoliva at gcc dot gnu.org> --- Created attachment 45614 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45614&action=edit Candidate patch Besides the cp_unevaluated_operand issue that Jakub mentioned, that causes parm lists to be incompletely tsubsted, we needed to arrange for the tsubsted lambda expr and type to be reused: the expr appears both in a decltype type in the capture variable and in its initializer.