If the operand points to an object or function,
the result denotes that object or function;
otherwise, the behavior is undefined except as specified in [expr.typeid]
([ub:expr.unary.dereference]).
Indirection through a pointer to an incomplete type (other than
cvvoid) is valid.
The lvalue thus obtained can be
used in limited ways (to initialize a reference, for example); this
lvalue must not be converted to a prvalue, see [conv.lval].
If the operand is a qualified-id or splice-expression
designating a non-static member m,
other than an explicit object member function,
m shall be a direct member of some class C
that is not an anonymous union.
The result has type âpointer to member of class C of type Tâ
and designates C::m.
A qualified-id
that names a member of a namespace-scope anonymous union
is considered to be a class member access expression ([expr.prim.id.general])
and cannot be used to form a pointer to member.
In particular, taking the address of a variable of type âcvTâ
yields a pointer of type âpointer to cvTâ.
â end note]
[Example 1: struct A {int i; };
struct B : A {};
...&B::i ...// has type int A::*int a;
int* p1 =&a;
int* p2 = p1 +1; // defined behaviorbool b = p2 > p1; // defined behavior, with value true â end example]
A pointer to member formed from a mutable non-static data
member ([dcl.stc]) does not reflect the mutable specifier
associated with the non-static data member.
That is, the expression &(qualified-id), where the
qualified-id is enclosed in parentheses, does not form an
expression of type âpointer to memberâ.
Neither does
qualified-id, because there is no implicit conversion from a
qualified-id for a non-static member function to the type
âpointer to member functionâ as there is from an lvalue of function
type to the type âpointer to functionâ ([conv.func]).
Nor is
&unqualified-id a pointer to member, even within the scope of
the unqualified-id's class.
If & is applied to an lvalue of incomplete class type and the
complete type declares operator&(), it is unspecified whether
the operator has the built-in meaning or the operator function is
called.
The address of an overload set (Clause [over]) can be taken
only in a context that uniquely determines
which function is referred to (see [over.over]).
Since the context can affect whether the operand is a static or
non-static member function, the context can also affect whether the
expression has type âpointer to functionâ or âpointer to member
functionâ.
The operand of the unary + operator shall be a prvalue of
arithmetic, unscoped
enumeration, or pointer type and the result is the value of the
argument.
Integral promotion is performed on integral or enumeration
operands.
The type of the result is the type of the promoted operand.
The operand of the logical negation operator ! is contextually
converted to bool ([conv]);
its value is true
if the converted operand is false and false otherwise.
The type of the result is the type of the promoted operand.
Given the coefficients xi
of the base-2 representation ([basic.fundamental])
of the promoted operand x,
the coefficient ri
of the base-2 representation of the result r
is 1 if xi is 0, and 0 otherwise.
Because the grammar does not permit an operator to follow the
., ->, or :: tokens, a ~ followed by
a type-name or computed-type-specifier in a
member access expression or qualified-id is
unambiguously parsed as a destructor name.