From Jason Turner

[expr.sub]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpp9lmv5je/{from.md → to.md} +13 -8
tmp/tmpp9lmv5je/{from.md → to.md} RENAMED
@@ -1,15 +1,20 @@
1
  ### Subscripting <a id="expr.sub">[[expr.sub]]</a>
2
 
3
  A postfix expression followed by an expression in square brackets is a
4
- postfix expression. One of the expressions shall have the type “array of
5
- `T`” or “pointer to `T`” and the other shall have unscoped enumeration
6
- or integral type. The result is of type “`T`. The type “`T`” shall be a
7
- completely-defined object type.[^5] The expression `E1[E2]` is identical
8
- (by definition) to `*((E1)+(E2))` see  [[expr.unary]] and  [[expr.add]]
9
- for details of `*` and `+` and  [[dcl.array]] for details of arrays. ,
10
- except that in the case of an array operand, the result is an lvalue if
11
- that operand is an lvalue and an xvalue otherwise.
 
 
 
 
 
12
 
13
  A *braced-init-list* shall not be used with the built-in subscript
14
  operator.
15
 
 
1
  ### Subscripting <a id="expr.sub">[[expr.sub]]</a>
2
 
3
  A postfix expression followed by an expression in square brackets is a
4
+ postfix expression. One of the expressions shall be a glvalue of type
5
+ “array of `T`” or a prvalue of type “pointer to `T`” and the other shall
6
+ be a prvalue of unscoped enumeration or integral type. The result is of
7
+ type “`T`”. The type `T` shall be a completely-defined object
8
+ type.[^5] The expression `E1[E2]` is identical (by definition) to
9
+ `*((E1)+(E2))`
10
+
11
+ [*Note 1*: see  [[expr.unary]] and  [[expr.add]] for details of `*` and
12
+ `+` and  [[dcl.array]] for details of arrays. — *end note*]
13
+
14
+ , except that in the case of an array operand, the result is an lvalue
15
+ if that operand is an lvalue and an xvalue otherwise. The expression
16
+ `E1` is sequenced before the expression `E2`.
17
 
18
  A *braced-init-list* shall not be used with the built-in subscript
19
  operator.
20