From Jason Turner

[dcl.array]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpr2xi7__0/{from.md → to.md} +15 -14
tmp/tmpr2xi7__0/{from.md → to.md} RENAMED
@@ -10,24 +10,25 @@ and the type of the identifier in the declaration `T` `D1` is
10
  “*derived-declarator-type-list* `T`”, then the type of the identifier of
11
  `D` is an array type; if the type of the identifier of `D` contains the
12
  `auto` , the program is ill-formed. `T` is called the array *element
13
  type*; this type shall not be a reference type, the (possibly
14
  cv-qualified) type `void`, a function type or an abstract class type. If
15
- the *constant-expression* ([[expr.const]]) is present, it shall be an
16
- integral constant expression and its value shall be greater than zero.
17
- The constant expression specifies the *bound* of (number of elements in)
18
- the array. If the value of the constant expression is `N`, the array has
19
- `N` elements numbered `0` to `N-1`, and the type of the identifier of
20
- `D` is “ array of `N` `T`”. An object of array type contains a
21
- contiguously allocated non-empty set of `N` subobjects of type `T`.
22
- Except as noted below, if the constant expression is omitted, the type
23
- of the identifier of `D` is “ array of unknown bound of `T`”, an
24
- incomplete object type. The type “ array of `N` `T`” is a different type
25
- from the type “ array of unknown bound of `T`”, see  [[basic.types]].
26
- Any type of the form “ array of `N` `T`” is adjusted to “array of `N`
27
- `T`”, and similarly for “array of unknown bound of `T`”. The optional
28
- *attribute-specifier-seq* appertains to the array.
 
29
 
30
  ``` cpp
31
  typedef int A[5], AA[2][3];
32
  typedef const A CA; // type is ``array of 5 const int''
33
  typedef const AA CAA; // type is ``array of 2 array of 3 const int''
 
10
  “*derived-declarator-type-list* `T`”, then the type of the identifier of
11
  `D` is an array type; if the type of the identifier of `D` contains the
12
  `auto` , the program is ill-formed. `T` is called the array *element
13
  type*; this type shall not be a reference type, the (possibly
14
  cv-qualified) type `void`, a function type or an abstract class type. If
15
+ the *constant-expression* ([[expr.const]]) is present, it shall be a
16
+ converted constant expression of type `std::size_t` and its value shall
17
+ be greater than zero. The constant expression specifies the *bound* of
18
+ (number of elements in) the array. If the value of the constant
19
+ expression is `N`, the array has `N` elements numbered `0` to `N-1`, and
20
+ the type of the identifier of `D` is “ array of `N` `T`”. An object of
21
+ array type contains a contiguously allocated non-empty set of `N`
22
+ subobjects of type `T`. Except as noted below, if the constant
23
+ expression is omitted, the type of the identifier of `D` is “ array of
24
+ unknown bound of `T`”, an incomplete object type. The type “ array of
25
+ `N` `T`” is a different type from the type “ array of unknown bound of
26
+ `T`”, see  [[basic.types]]. Any type of the form “ array of `N` `T`” is
27
+ adjusted to “array of `N` `T`”, and similarly for “array of unknown
28
+ bound of `T`”. The optional *attribute-specifier-seq* appertains to the
29
+ array.
30
 
31
  ``` cpp
32
  typedef int A[5], AA[2][3];
33
  typedef const A CA; // type is ``array of 5 const int''
34
  typedef const AA CAA; // type is ``array of 2 array of 3 const int''