Skip to content
Open
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
15 changes: 10 additions & 5 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -928,18 +928,23 @@

\pnum
A \defnadj{data member}{description} is
a quintuple ($T$, $N$, $A$, $W$, $\mathit{NUA}$)
a sextuple ($T$, $N$, $A$, $W$, $\mathit{NUA}$, $\mathit{ANN}$)
describing the potential declaration of a non-static data member where
\begin{itemize}
\item $T$ is a type,
\item $N$ is an \grammarterm{identifier} or $\bot$,
\item $A$ is an alignment or $\bot$,
\item $W$ is a bit-field width or $\bot$, and
\item $\mathit{NUA}$ is a boolean value.
\item $W$ is a bit-field width or $\bot$,
\item $\mathit{NUA}$ is a boolean value, and
\item $\mathit{ANN}$ is a sequence of reflections
representing either values or template parameter objects.
\end{itemize}
Two data member descriptions are equal
if each of their respective components are the same entities,
are the same identifiers, have equal values, or are both $\bot$.
if each of their respective components are
the same entity,
the same value,
the same sequence, or
both $\bot$.
\begin{note}
The components of a data member description describe a data member such that
\begin{itemize}
Expand Down
17 changes: 17 additions & 0 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10226,9 +10226,26 @@
type alias,
variable,
function,
function parameter of non-\tcode{void} type,
namespace,
enumerator, or
non-static data member.
\begin{note}
An annotation on a \grammarterm{parameter-declaration} in a function definition
applies to both the function parameter and the variable.
\begin{example}
void f([[=1]] int x);
void f([[=2]] int y) {
constexpr auto rp = parameters_of(@\reflexpr{f}@)[0];
constexpr auto ry = variable_of(rp);
static_assert(ry == ^^y);

static_assert(annotations_of(rp).size() == 2); // both \tcode{[1, 2]}
static_assert(annotations_of(ry).size() == 1); // just \tcode{[2]}
static_assert(annotations_of(rp)[1] == annotations_of(ry)[0]);
}
\end{example}
\end{note}

\pnum
Let $E$ be the expression
Expand Down
Loading
Loading