From a67162a6bbdbd8da0b62e680d8bbab03e3411d56 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 28 Mar 2026 18:42:37 +0100 Subject: [PATCH] P4004R1 Reconsider CWG 1395 "Partial ordering of variadic templates reconsidered" --- source/templates.tex | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/templates.tex b/source/templates.tex index d9f95f8ae0..c957c198d8 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -8780,18 +8780,16 @@ \end{itemize} \pnum -Using the resulting types -\tcode{P} -and -\tcode{A}, +If \tcode{A} was transformed from a function parameter pack and +\tcode{P} is not a parameter pack, +type deduction fails. +Otherwise, using the resulting types \tcode{P} and \tcode{A}, the deduction is then done as described in~\ref{temp.deduct.type}. If \tcode{P} is a function parameter pack, the type \tcode{A} of each remaining parameter type of the argument template is compared with the type \tcode{P} of the \grammarterm{declarator-id} of the function parameter pack. Each comparison deduces template arguments for subsequent positions in the template parameter packs expanded by the function parameter pack. -Similarly, if \tcode{A} was transformed from a function parameter pack, -it is compared with each remaining parameter type of the parameter template. If deduction succeeds for a given type, the type from the argument template is considered to be at least as specialized as the type from the parameter template.