From 0aab6de3867ab7d0f597e65d0eed055c706e383e Mon Sep 17 00:00:00 2001 From: lprv <100177227+lprv@users.noreply.github.com> Date: Thu, 27 Mar 2025 12:04:28 +0000 Subject: [PATCH] [temp.constr.concept] Fix example * Give all template parameters a unique name for clarity * Replace use a of a reserved identifier * Fix the example's accompanying text, in particular the parameter mapping of the normal form of the concept-id after substitution --- source/templates.tex | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/source/templates.tex b/source/templates.tex index 0294586daa..24064fdf13 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -1847,7 +1847,6 @@ Checking whether \tcode{CI$''$} is satisfied can lead to further normalization of concept-dependent constraints. \end{note} -%FIXME: "_" in the example below is not a valid identifier. \begin{example} \begin{codeblock} template @@ -1856,22 +1855,22 @@ template concept CC> concept D = CC; -template concept CT, template concept> concept CU> -int f() requires CU; -int _ = f(); -\end{codeblock} -In this example, the associated constraint of \tcode{f} -is a concept-dependent constraint $CI$ -whose expression is the concept-id \tcode{CU} with the mapping -$\tcode{T} \mapsto \tcode{T}, \tcode{CT} \mapsto \tcode{CT}, \tcode{CU} \mapsto \tcode{CU}$.\\ -$CI'$ is the result of substituting \tcode{D} into $CI$.\\ -We consider the normal form $CI''$ of \tcode{D}, +int f() requires CU; +int i = f(); +\end{codeblock} +In this example, the associated constraints of \tcode{f} +are a concept-dependent constraint +whose expression is the concept-id \tcode{CU} with the mapping +$\tcode{U} \mapsto \tcode{U}, \tcode{CT} \mapsto \tcode{CT}, \tcode{CU} \mapsto \tcode{CU}$.\\ +The result of substituting \tcode{D} into this expression is \tcode{D}.\\ +We consider the normal form of the resulting concept-id, which is \tcode{CC} with the mapping -$\tcode{T} \mapsto \tcode{T}, \tcode{CC} \mapsto \tcode{CC}$.\\ -By recursion, \tcode{C} is substituted in \tcode{CC} and then -normalized to the atomic constraint \tcode{true}, which is satisfied. +$\tcode{T} \mapsto \tcode{U}, \tcode{CC} \mapsto \tcode{CT}$.\\ +By recursion, \tcode{C} is substituted into \tcode{CC}, and the result +is normalized to the atomic constraint \tcode{true}, which is satisfied. \end{example} \rSec3[temp.constr.fold]{Fold expanded constraint}