Otherwise, if
S is a variable or a structured binding,
S shall either have static or thread storage duration or
shall inhabit a scope enclosing the expression
. The expression
E is an lvalue referring to the object or function
X
associated with or referenced by
S, and
is a bit-field if and only if
X is a bit-field
. If
E appears in the predicate of a contract assertion C (
[basic.contract])
and
S is
- a variable declared outside of C
of object type T,
- a variable declared outside of C
of type “reference to T”, or
- a structured binding of type T
whose corresponding variable is declared outside of C,
then the type of
E is
const T,
otherwise
E has the same type as that of
S. [
Note 2:
The type of a
splice-expression
designating a variable or structured binding of reference type
will be adjusted to a non-reference type (
[expr.type])
. —
end note]