From 41fa5cbf64b036727f59c646e4dc7b4dd06efdda Mon Sep 17 00:00:00 2001 From: Abhinav Agarwal Date: Fri, 3 Jul 2026 10:38:05 -0700 Subject: [PATCH 1/2] [dcl.type.decltype] Handle splice specializations --- source/declarations.tex | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index 7b856428e6..d4c5981562 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1720,9 +1720,28 @@ type of the entity named by $E$. If there is no such entity, the program is ill-formed; -\item otherwise, if $E$ is an unparenthesized \grammarterm{splice-expression}, +\item otherwise, if $E$ is an unparenthesized \grammarterm{splice-expression}: +\begin{itemize} +\item if $E$ is of the form \grammarterm{splice-specifier}, \tcode{decltype($E$)} is the type of the entity, object, or value designated by the \grammarterm{splice-specifier} of $E$; +\item otherwise, if $E$ is of the form +\tcode{template \grammarterm{splice-specialization-specifier}} +and the \grammarterm{splice-specifier} of +the \grammarterm{splice-specialization-specifier} designates +a variable template $T$, +let $S$ be the specialization of $T$ +corresponding to the template argument list of +the \grammarterm{splice-specialization-specifier}; +\tcode{decltype($E$)} is the type of $S$; +\item otherwise ($E$ is of the form +\tcode{template \grammarterm{splice-specifier}}, +or of the form +\tcode{template \grammarterm{splice-specialization-specifier}} +whose \grammarterm{splice-specifier} designates a function template), +$E$ denotes an overload set\iref{expr.prim.splice} and the program is +ill-formed; +\end{itemize} \item otherwise, if $E$ is an xvalue, \tcode{decltype($E$)} is \tcode{T\&\&}, where \tcode{T} is the type From a01c3e614c2c001c70ab4eef0ad83859472be6bc Mon Sep 17 00:00:00 2001 From: Abhinav Agarwal Date: Fri, 3 Jul 2026 10:48:10 -0700 Subject: [PATCH 2/2] [dcl.type.decltype] Handle remaining splice cases --- source/declarations.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index d4c5981562..1ea8918efa 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1734,13 +1734,14 @@ corresponding to the template argument list of the \grammarterm{splice-specialization-specifier}; \tcode{decltype($E$)} is the type of $S$; -\item otherwise ($E$ is of the form +\item otherwise, if $E$ is of the form \tcode{template \grammarterm{splice-specifier}}, or of the form \tcode{template \grammarterm{splice-specialization-specifier}} -whose \grammarterm{splice-specifier} designates a function template), +whose \grammarterm{splice-specifier} designates a function template, $E$ denotes an overload set\iref{expr.prim.splice} and the program is ill-formed; +\item otherwise, the program is ill-formed; \end{itemize} \item otherwise, if $E$ is