8 Expressions [expr]

8.5 Compound expressions [expr.compound]

8.5.1 Postfix expressions [expr.post]

8.5.1.1 Subscripting [expr.sub]

A postfix expression followed by an expression in square brackets is a postfix expression.
One of the expressions shall be a glvalue of type “array of T” or a prvalue of type “pointer to T” and the other shall be a prvalue of unscoped enumeration or integral type.
The result is of type “T.
The type “T” shall be a completely-defined object type.66
The expression E1[E2] is identical (by definition) to *((E1)+(E2))
[Note
:
see [expr.unary] and [expr.add] for details of * and + and [dcl.array] for details of arrays.
end note
]
, except that in the case of an array operand, the result is an lvalue if that operand is an lvalue and an xvalue otherwise.
The expression E1 is sequenced before the expression E2.
A braced-init-list shall not be used with the built-in subscript operator.
This is true even if the subscript operator is used in the following common idiom: &x[0].