File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 4151
4151
\indextext {name!address of cv-qualified}%
4152
4152
\indextext {expression!pointer-to-member constant}%
4153
4153
The result of the unary \tcode {\& } operator is a pointer to its operand.
4154
- The operand shall be an lvalue or a \grammarterm {qualified-id}.
4154
+ \begin {itemize }
4155
+ \item
4155
4156
If the operand is a \grammarterm {qualified-id} naming a non-static or variant member \tcode {m}
4156
4157
of some class \tcode {C} with type \tcode {T}, the result has type `` pointer to member
4157
4158
of class \tcode {C} of type \tcode {T}'' and is a prvalue designating \tcode {C::m}.
4158
- Otherwise, if the type of the expression is \tcode {T}, the result has type `` pointer to
4159
+ \item
4160
+ Otherwise, if the operand is an lvalue of type \tcode {T}, the result has type `` pointer to
4159
4161
\tcode {T}'' and is a prvalue that is the address of the designated object\iref {intro.memory }
4160
4162
or a pointer to the designated function. \begin {note } In particular, the address of an
4161
4163
object of type `` \cv {}~\tcode {T}'' is `` pointer to \cv {}~\tcode {T}'' , with the same
4165
4167
an object that is not an array element whose
4166
4168
address is taken in this way is considered to belong to an array with one
4167
4169
element of type \tcode {T}.
4170
+ \item
4171
+ Otherwise, the program is ill-formed.
4172
+ \end {itemize }
4168
4173
\begin {example }
4169
-
4170
4174
\begin {codeblock }
4171
4175
struct A { int i; };
4172
4176
struct B : A { };
You can’t perform that action at this time.
0 commit comments