Skip to content

Commit 410fbe5

Browse files
Describe form.spec partition (#98)
Fix 89.
1 parent a6ccf8f commit 410fbe5

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed

ltx/decls.tex

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ \subsection{\valueTag{DeclSort::PartialSpecialization}}
675675
\DeclareMember{home\_scope}{DeclIndex} \\
676676
\DeclareMember{chart}{ChartIndex} \\
677677
\DeclareMember{entity}{ParameterizedEntity} \\
678-
\DeclareMember{form}{Index} \\
678+
\DeclareMember{form}{SpecFormIndex} \\
679679
\DeclareMember{specifiers}{BasicSpecifiers} \\
680680
\DeclareMember{access}{Access} \\
681681
\DeclareMember{properties}{ReachableProperties} \\
@@ -689,7 +689,7 @@ \subsection{\valueTag{DeclSort::PartialSpecialization}}
689689
The \field{home\_scope} field denotes the parent declaration of this partial specialization.
690690
The \field{chart} field denotes the set of template-parameter lists of this partial specialization.
691691
The \field{entity} field describes the current instantiation of this partial specialization.
692-
The \field{form} field is an index into the partition of specialization form (template and template-argument list) named \code{"form.spec"}.
692+
The \field{form} field is an index into the partition of specialization form (template and template-argument list) named \code{"form.spec"} (\secref{sec:ifc-specialization-forms}).
693693
The \field{specifiers} field denotes the declaration specifiers of this partial specialization.
694694
The \field{access} field denotes the access level of this partial specialization.
695695
The \field{properties} field denotes the set of reachable semantic properties.
@@ -709,7 +709,7 @@ \subsection{\valueTag{DeclSort::Specialization}}
709709
\begin{figure}[H]
710710
\centering
711711
\structure[text width = 14em]{
712-
\DeclareMember{form}{Index} \\
712+
\DeclareMember{form}{SpecFormIndex} \\
713713
\DeclareMember{decl}{DeclIndex} \\
714714
\DeclareMember{sort}{SpecializationSort} \\
715715
}
@@ -719,7 +719,7 @@ \subsection{\valueTag{DeclSort::Specialization}}
719719
%
720720
and meanings of the fields
721721
\begin{itemize}
722-
\item The value of \field{form} is an index into the specialization form partition (named "form.spec").
722+
\item The value of \field{form} is an index into the specialization form partition (named "form.spec") (\secref{sec:ifc-specialization-forms}).
723723
\item \field{decl}, when non null, denotes the declaration produced by the specialization.
724724
\item \field{sort} designates how the specialization is obtained (\secref{sec:ifc-SpecializationSort}).
725725
\end{itemize}
@@ -1451,3 +1451,42 @@ \subsubsection{Code segment type}
14511451
\partition{decl.segment}
14521452

14531453
\note{This is a vendor extension, the meta description of which is subject to change}
1454+
1455+
1456+
\section{Specialization forms}
1457+
\label{sec:ifc-specialization-forms}
1458+
1459+
An explicit specialization or a partial specialization of a primary template declaration
1460+
provides an alternate implementation for a specialization request.
1461+
The semantic pattern for the \grammar{template-id} of such a specialization declaration is
1462+
stored in the specialization form partition.
1463+
Each entry in that partition is a structure with the following layout
1464+
%
1465+
\begin{figure}[H]
1466+
\centering
1467+
\structure{
1468+
\DeclareMember{primary}{DeclIndex} \\
1469+
\DeclareMember{arguments}{ExprIndex} \\
1470+
}
1471+
\end{figure}
1472+
%
1473+
with the following meanings
1474+
\begin{itemize}
1475+
\item \field{primary} is an abstract reference designating the primary template declaration for which a specialization is provided
1476+
\item \field{arguments} designates the template-argument list to the \field{primary} declaration
1477+
\end{itemize}
1478+
1479+
\partition{form.spec}
1480+
1481+
\note{This representation is subject to change}.
1482+
1483+
\subsection{Abstract reference for specialization forms}
1484+
\label{sec:ifc-spec-form-index}
1485+
1486+
Specialization forms are referenced via abstract references of type \type{SpecForm},
1487+
a $32$-bit value type defined as
1488+
%
1489+
\begin{typedef}{SpecFormIndex}{}
1490+
enum class SpecFormIndex : uint32_t { };
1491+
\end{typedef}
1492+
%

ltx/ifc.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
%% Turn off indentation of paragraph
3636
\setlength{\parindent}{0pt}
3737

38-
\addtocounter{secnumdepth}{1}
38+
\setcounter{secnumdepth}{3}
39+
%\addtocounter{secnumdepth}{1}
3940

4041

4142
\title{

0 commit comments

Comments
 (0)