https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102928
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-11-06 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- temp.deduct.call For a function parameter pack that occurs at the end of the parameter-declaration-list, deduction is performed for each remaining argument of the call, taking the type P of the declarator-id of the function parameter pack as the corresponding function template parameter type. Each deduction deduces template arguments for subsequent positions in the template parameter packs expanded by the function parameter pack. parameter-declaration-list does not include the ... variadic arguments part. So Confirmed. As far as I read in the standard, the template variadic deduction should be greedy (deduction is performed for each remaining argument of the call).