Skip to content

Commit 2ca40df

Browse files
committed
[defns.access] Clarify definition of "access".
Add cross-linking between the places that introduce accesses and the definition of the term, and add a note explaining that we only ever access objects of scalar type.
1 parent 83adb31 commit 2ca40df

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

source/expressions.tex

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@
287287
\end{note}
288288

289289
\pnum
290-
If a program attempts to access the stored value of an object through a glvalue
290+
If a program attempts to access\iref{defns.access}
291+
the stored value of an object through a glvalue
291292
whose type is not similar\iref{conv.qual} to
292293
one of the following types the behavior is
293294
undefined:\footnote{The intent of this list is to specify those circumstances in which an
@@ -645,9 +646,8 @@
645646
\ref{basic.stc.dynamic.safety}), the behavior is
646647
\impldef{lvalue-to-rvalue conversion of an invalid pointer value}.
647648

648-
\item Otherwise, the value contained in the object indicated by the
649-
glvalue is the prvalue result.
650-
649+
\item Otherwise, the object indicated by the glvalue is read\iref{defns.access},
650+
and the value contained in the object is the prvalue result.
651651
\end{itemize}
652652

653653
\pnum
@@ -3337,7 +3337,8 @@
33373337
or a pointer to a complete object type.
33383338
An operand with \tcode{volatile}-qualified type is deprecated;
33393339
see~\ref{depr.volatile.type}.
3340-
The value of the operand object is modified by adding \tcode{1} to it.
3340+
The value of the operand object is modified\iref{defns.access}
3341+
by adding \tcode{1} to it.
33413342
The
33423343
\indextext{value computation}%
33433344
value computation of the \tcode{++} expression is sequenced before the
@@ -4294,7 +4295,7 @@
42944295
The operand of prefix \tcode{++}
42954296
\indextext{operator!increment}%
42964297
\indextext{prefix \tcode{++}}%
4297-
is modified by adding \tcode{1}.
4298+
is modified\iref{defns.access} by adding \tcode{1}.
42984299
\indextext{prefix \tcode{\dcr}}%
42994300
The operand shall be a modifiable lvalue. The type of the operand shall
43004301
be an arithmetic type other than \cv{}~\tcode{bool},
@@ -4313,7 +4314,7 @@
43134314
\pnum
43144315
The operand of prefix
43154316
\indextext{operator!decrement}%
4316-
\tcode{\dcr} is modified by subtracting \tcode{1}.
4317+
\tcode{\dcr} is modified\iref{defns.access} by subtracting \tcode{1}.
43174318
The requirements on the operand of prefix
43184319
\tcode{\dcr} and the properties of its result are otherwise the same as
43194320
those of prefix \tcode{++}.
@@ -6687,7 +6688,8 @@
66876688

66886689
\pnum
66896690
In simple assignment (\tcode{=}), the object referred to by the left operand
6690-
is modified by replacing its value with the result of the right operand.
6691+
is modified\iref{defns.access}
6692+
by replacing its value with the result of the right operand.
66916693

66926694
\pnum
66936695
\indextext{assignment!conversion by}%

source/intro.tex

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,19 @@
117117

118118
\indexdefn{access}%
119119
\definition{access}{defns.access}
120-
\defncontext{execution-time action} read or modify the value of an object
120+
\defncontext{execution-time action}
121+
read\iref{conv.lval} or
122+
modify (\ref{expr.ass}, \ref{expr.post.incr}, \ref{expr.pre.incr})
123+
the value of an object
124+
125+
\begin{defnote}
126+
Only objects of scalar type can be accessed.
127+
Attempts to read or modify an object of class type
128+
typically invoke a constructor\iref{class.ctor}
129+
or assignment operator\iref{class.copy.assign};
130+
such invocations do not themselves constitute accesses,
131+
although they may involve accesses of scalar subobjects.
132+
\end{defnote}
121133

122134
\indexdefn{argument}%
123135
\indexdefn{argument!function call expression}

0 commit comments

Comments
 (0)