Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13510,7 +13510,7 @@
\remarks
A function call expression
that violates the precondition in the \Fundescx{Preconditions} element
is not a core constant expression\iref{expr.const}.
is not a core constant expression\iref{expr.const.core}.
\end{itemdescr}

\rSec3[numeric.sat.cast]{Casting}
Expand Down
28 changes: 14 additions & 14 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
\begin{itemize}
\item
\tcode{x} is a reference
that is usable in constant expressions at $P$\iref{expr.const}, or
that is usable in constant expressions at $P$\iref{expr.const.init}, or
\item
$N$ is an element of the set of potential results of an expression $E$, where
\begin{itemize}
Expand Down Expand Up @@ -739,7 +739,7 @@

\pnum
If a definable item \tcode{D} is defined in a translation unit
by an injected declaration $X$\iref{expr.const} and
by an injected declaration $X$\iref{expr.const.reflect} and
another translation unit contains a definition of \tcode{D},
that definition shall be an injected declaration
having the same characteristic sequence as $X$;
Expand Down Expand Up @@ -781,7 +781,7 @@
a non-volatile const object with internal or no linkage if the object
\begin{itemize}
\item has the same literal type in all definitions of \tcode{D},
\item is initialized with a constant expression\iref{expr.const},
\item is initialized with a constant expression\iref{expr.const.const},
\item is not odr-used in any definition of \tcode{D}, and
\item has the same value in all definitions of \tcode{D},
\end{itemize}
Expand Down Expand Up @@ -2834,7 +2834,7 @@
\pnum
The \grammarterm{constant-expression} of a \grammarterm{splice-specifier}
shall be a converted constant expression of
type \tcode{std::meta::info}\iref{expr.const}.
type \tcode{std::meta::info}\iref{expr.const.const}.
A \grammarterm{splice-specifier}
whose converted \grammarterm{constant-expression} represents
a construct $X$ is said to \defn{designate} either
Expand Down Expand Up @@ -3171,7 +3171,7 @@
a \grammarterm{reflect-expression} or a \grammarterm{splice-specifier}
that, respectively, represents or designates $E$,
\item
$D$ is an injected declaration\iref{expr.const}
$D$ is an injected declaration\iref{expr.const.reflect}
whose characteristic sequence contains a reflection
that represents
a data member description ($T$, $N$, $A$, $W$, $\mathit{NUA}$)\iref{class.mem.general}
Expand Down Expand Up @@ -5351,7 +5351,7 @@
during the evaluation of a core constant expression.
\end{itemize}
Every function of consteval-only type shall be
an immediate function\iref{expr.const}.
an immediate function\iref{expr.const.imm}.

\rSec2[basic.fundamental]{Fundamental types}

Expand Down Expand Up @@ -6368,9 +6368,9 @@
\item
an unevaluated operand\iref{expr.context},
\item
a \grammarterm{constant-expression}\iref{expr.const},
a \grammarterm{constant-expression}\iref{expr.const.core},
\item
an immediate invocation\iref{expr.const},
an immediate invocation\iref{expr.const.imm},
\item
an \grammarterm{init-declarator}\iref{dcl.decl}
(including such introduced by a structured binding\iref{dcl.struct.bind}) or
Expand Down Expand Up @@ -6437,7 +6437,7 @@
\indextext{value computation|(}%
Reading an object designated by a \keyword{volatile} glvalue\iref{basic.lval},
modifying an object,
producing an injected declaration\iref{expr.const},
producing an injected declaration\iref{expr.const.reflect},
calling a library I/O function, or
calling a function that does any of those operations
are all \defn{side effects},
Expand Down Expand Up @@ -6617,7 +6617,7 @@

\pnum
During the evaluation of an expression
as a core constant expression\iref{expr.const},
as a core constant expression\iref{expr.const.core},
evaluations of operands of individual operators and
of subexpressions of individual expressions
that are otherwise either unsequenced or indeterminately sequenced
Expand Down Expand Up @@ -7311,7 +7311,7 @@
\indextext{initialization!constant}%
\defnx{Constant initialization}{constant initialization} is performed
if a variable with static or thread storage duration
is constant-initialized\iref{expr.const}.
is constant-initialized\iref{expr.const.init}.
\indextext{initialization!zero-initialization}%
If constant initialization is not performed, a variable with static
storage duration\iref{basic.stc.static} or thread storage
Expand Down Expand Up @@ -7562,7 +7562,7 @@

\pnum
The destruction of a complete object with thread storage duration within a given thread
and having constant destruction\iref{expr.const}
and having constant destruction\iref{expr.const.defns}
is sequenced after the destruction of any other complete object
with thread storage duration within the thread.
The destruction of a complete object with static storage duration
Expand Down Expand Up @@ -7801,7 +7801,7 @@
\item
the evaluation of the predicate
is performed in a context that is
manifestly constant-evaluated\iref{expr.const}
manifestly constant-evaluated\iref{expr.const.defns}
and the predicate
is not a core constant expression.
\end{itemize}
Expand All @@ -7822,7 +7822,7 @@
\pnum
\indexdefn{contract evaluation semantics!terminating}%
If a contract violation occurs
in a context that is manifestly constant-evaluated\iref{expr.const},
in a context that is manifestly constant-evaluated\iref{expr.const.defns},
and the evaluation semantic is
a terminating semantic,
the program is ill-formed.
Expand Down
8 changes: 4 additions & 4 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@
shall not directly or indirectly cause the implicit definition of a
defaulted default constructor for the enclosing class or the
exception specification of that constructor.
An immediate invocation\iref{expr.const} that
An immediate invocation\iref{expr.const.imm} that
is a potentially-evaluated subexpression\iref{intro.execution}
of a default member initializer
is neither evaluated nor checked for whether it
Expand Down Expand Up @@ -2750,7 +2750,7 @@
its declaration in the class definition can specify a
\grammarterm{brace-or-equal-initializer} in which every
\grammarterm{initializer-clause} that is an \grammarterm{assignment-expression}
is a constant expression\iref{expr.const}.
is a constant expression\iref{expr.const.const}.
The member shall still be defined in a namespace scope if
it is odr-used\iref{term.odr.use} in the program and the
namespace scope definition shall not contain an \grammarterm{initializer}.
Expand Down Expand Up @@ -6341,7 +6341,7 @@
\end{itemize}
Copy elision is not permitted
where an expression is evaluated in a context
requiring a constant expression\iref{expr.const}
requiring a constant expression\iref{expr.const.const}
and in constant initialization\iref{basic.start.static}.
\begin{note}
It is possible that copy elision is performed
Expand Down Expand Up @@ -6377,7 +6377,7 @@
}

constexpr A a; // well-formed, \tcode{a.p} points to \tcode{a}
constexpr A b = g(); // error: \tcode{b.p} would be dangling\iref{expr.const}
constexpr A b = g(); // error: \tcode{b.p} would be dangling\iref{expr.const.const}

void h() {
A c = g(); // well-formed, \tcode{c.p} can point to \tcode{c} or be dangling
Expand Down
6 changes: 3 additions & 3 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22032,7 +22032,7 @@
\begin{itemdescr}
\pnum
\result
A constant expression\iref{expr.const} of type \tcode{bool}.
A constant expression\iref{expr.const.const} of type \tcode{bool}.

\pnum
\returns
Expand All @@ -22052,7 +22052,7 @@
\begin{itemdescr}
\pnum
\result
A constant expression\iref{expr.const} of type \tcode{bool}.
A constant expression\iref{expr.const.const} of type \tcode{bool}.

\pnum
\returns
Expand All @@ -22072,7 +22072,7 @@
\begin{itemdescr}
\pnum
\result
A constant expression\iref{expr.const} of type \tcode{bool}.
A constant expression\iref{expr.const.const} of type \tcode{bool}.

\pnum
\returns
Expand Down
34 changes: 17 additions & 17 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
In a \grammarterm{static_assert-declaration},
the \grammarterm{constant-expression} $E$
is contextually converted to \keyword{bool} and
the converted expression shall be a constant expression\iref{expr.const}.
the converted expression shall be a constant expression\iref{expr.const.const}.
If the value of the expression $E$ when so converted is \tcode{true} or
the expression is evaluated in the context of a template definition,
the declaration has no effect and
Expand Down Expand Up @@ -393,11 +393,11 @@
\begin{codeblock}
[] static consteval -> void @\grammarterm{compound-statement}@ ()
\end{codeblock}
$E$ shall be a constant expression\iref{expr.const}.
$E$ shall be a constant expression\iref{expr.const.const}.
\begin{note}
The evaluation of the expression
corresponding to a \grammarterm{consteval-block-declaration}\iref{lex.phases}
can produce injected declarations as side effects.
can produce injected declarations\iref{expr.const.reflect} as side effects.
\end{note}
\begin{example}
\begin{codeblock}
Expand Down Expand Up @@ -720,7 +720,7 @@
\pnum
In an \grammarterm{explicit-specifier},
the \grammarterm{constant-expression}, if supplied, shall be a
contextually converted constant expression of type \tcode{bool}\iref{expr.const}.
contextually converted constant expression of type \tcode{bool}\iref{expr.const.const}.
The \grammarterm{explicit-specifier} \keyword{explicit}
without a \grammarterm{constant-expression} is equivalent to
the \grammarterm{explicit-specifier} \tcode{explicit(true)}.
Expand Down Expand Up @@ -918,7 +918,7 @@
: x(a), y(x) // OK, definition
{ square(x); }
constexpr pixel small(2); // error: \tcode{square} not defined, so \tcode{small(2)}
// not constant\iref{expr.const} so \keyword{constexpr} not satisfied
// not constant\iref{expr.const.core} so \keyword{constexpr} not satisfied

constexpr void square(int &x) { // OK, definition
x *= x;
Expand All @@ -938,7 +938,7 @@
a \defnx{constexpr function}{specifier!\idxcode{constexpr}!function}.
\begin{note}
A function declared with the \keyword{consteval} specifier
is an immediate function\iref{expr.const}.
is an immediate function\iref{expr.const.imm}.
\end{note}
A destructor, an allocation function, or a deallocation function
shall not be declared with the \keyword{consteval} specifier.
Expand Down Expand Up @@ -992,7 +992,7 @@
\begin{itemize}
\item
an invocation of a constexpr function
can appear in a constant expression\iref{expr.const} and
can appear in a constant expression\iref{expr.const.core} and
\item
copy elision is not performed in a constant expression\iref{class.copy.elision}.
\end{itemize}
Expand Down Expand Up @@ -1026,7 +1026,7 @@
Such an object
shall have literal type and
shall be initialized.
A \keyword{constexpr} variable shall be constant-initializable\iref{expr.const}.
A \keyword{constexpr} variable shall be constant-initializable\iref{expr.const.init}.
A \keyword{constexpr} variable that is an object,
as well as any temporary to which a \keyword{constexpr} reference is bound,
shall have constant destruction.
Expand Down Expand Up @@ -1274,7 +1274,7 @@
\pnum
\begin{note}
Declaring a variable \keyword{const} can affect its linkage\iref{dcl.stc}
and its usability in constant expressions\iref{expr.const}. As
and its usability in constant expressions\iref{expr.const.init}. As
described in~\ref{dcl.init}, the definition of an object or subobject
of const-qualified type must specify an initializer or be subject to
default-initialization.
Expand Down Expand Up @@ -1541,7 +1541,7 @@

\pnum
The \grammarterm{constant-expression} shall be
a converted constant expression\iref{expr.const} of type \tcode{std::size_t}
a converted constant expression\iref{expr.const.const} of type \tcode{std::size_t}
whose value $V$, termed the index,
is such that $0 \le V < \tcode{sizeof...($P$)}$.

Expand Down Expand Up @@ -1755,7 +1755,7 @@

\pnum
If the operand of a \grammarterm{decltype-specifier} is a prvalue
and is not a (possibly parenthesized) immediate invocation\iref{expr.const},
and is not a (possibly parenthesized) immediate invocation\iref{expr.const.imm},
the temporary materialization conversion is not applied\iref{conv.rval}
and no result object is provided for the prvalue.
The type of the prvalue may be incomplete or an abstract class type.
Expand Down Expand Up @@ -3470,7 +3470,7 @@
the type of the \grammarterm{declarator-id} in \tcode{D} is
``\placeholder{derived-declarator-type-list} array of \tcode{N} \tcode{T}''.
The \grammarterm{constant-expression}
shall be a converted constant expression of type \tcode{std::size_t}\iref{expr.const}.
shall be a converted constant expression of type \tcode{std::size_t}\iref{expr.const.const}.
\indextext{bound, of array}%
Its value \tcode{N} specifies the \defnx{array bound}{array!bound},
i.e., the number of elements in the array;
Expand Down Expand Up @@ -4381,7 +4381,7 @@
The names in the
default argument are looked up, and the semantic constraints are checked,
at the point where the default argument appears, except that
an immediate invocation\iref{expr.const} that
an immediate invocation\iref{expr.const.imm} that
is a potentially-evaluated subexpression\iref{intro.execution} of
the \grammarterm{initializer-clause} in a \grammarterm{parameter-declaration} is
neither evaluated
Expand Down Expand Up @@ -5412,7 +5412,7 @@
\end{itemize}

\pnum
An immediate invocation\iref{expr.const} that is not evaluated where
An immediate invocation\iref{expr.const.imm} that is not evaluated where
it appears\iref{dcl.fct.default,class.mem.general}
is evaluated and checked for whether it is
a constant expression at the point where
Expand Down Expand Up @@ -7092,7 +7092,7 @@
A non-user-provided defaulted function
(i.e., implicitly declared or explicitly defaulted in the class)
that is not defined as deleted is implicitly defined when it is odr-used\iref{basic.def.odr}
or needed for constant evaluation\iref{expr.const}.
or needed for constant evaluation\iref{expr.const.defns}.
\begin{note}
The implicit definition of a non-user-provided defaulted function
does not bind any names.
Expand Down Expand Up @@ -7969,7 +7969,7 @@
type
and the \grammarterm{constant-expression} in the \grammarterm{enumerator-definition}
shall be a converted constant expression of the underlying
type\iref{expr.const}.
type\iref{expr.const.const}.
If the underlying
type is not fixed,
the type of each enumerator prior to the closing brace is determined as
Expand All @@ -7979,7 +7979,7 @@
\item If an
initializer is specified for an enumerator, the
\grammarterm{constant-expression} shall be an integral constant
expression\iref{expr.const}. If the expression has
expression\iref{expr.const.const}. If the expression has
unscoped enumeration type, the enumerator has the underlying type of that
enumeration type, otherwise it has the same type as the expression.

Expand Down
2 changes: 1 addition & 1 deletion source/exceptions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@
\indextext{exception specification!noexcept!constant expression and}%
In a \grammarterm{noexcept-specifier}, the \grammarterm{constant-expression},
if supplied, shall be a contextually converted constant expression
of type \keyword{bool}\iref{expr.const};
of type \keyword{bool}\iref{expr.const.const};
that constant expression is the exception specification of
the function type in which the \grammarterm{noexcept-specifier} appears.
A \tcode{(} token that follows \keyword{noexcept} is part of the
Expand Down
2 changes: 1 addition & 1 deletion source/exec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2226,7 +2226,7 @@
model \libconcept{sender}, and
\tcode{false} for types that do not.
Such specializations shall
be usable in constant expressions\iref{expr.const} and
be usable in constant expressions\iref{expr.const.init} and
have type \tcode{const bool}.

\pnum
Expand Down
Loading
Loading