tmp/tmpl2e_t1z9/{from.md → to.md}
RENAMED
|
@@ -2,25 +2,25 @@
|
|
| 2 |
|
| 3 |
#### Overview <a id="array.overview">[[array.overview]]</a>
|
| 4 |
|
| 5 |
The header `<array>` defines a class template for storing fixed-size
|
| 6 |
sequences of objects. An `array` is a contiguous container
|
| 7 |
-
[[container.
|
| 8 |
-
|
| 9 |
|
| 10 |
An `array` is an aggregate [[dcl.init.aggr]] that can be
|
| 11 |
list-initialized with up to `N` elements whose types are convertible to
|
| 12 |
`T`.
|
| 13 |
|
| 14 |
-
An `array` meets all of the requirements of a container
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
sequence container [[sequence.reqmts]]. Descriptions
|
| 19 |
-
only for operations on `array` that are not described
|
| 20 |
-
tables and for operations where there is additional
|
| 21 |
-
information.
|
| 22 |
|
| 23 |
`array<T, N>` is a structural type [[temp.param]] if `T` is a structural
|
| 24 |
type. Two values `a1` and `a2` of type `array<T, N>` are
|
| 25 |
template-argument-equivalent [[temp.type]] if and only if each pair of
|
| 26 |
corresponding elements in `a1` and `a2` are
|
|
@@ -92,17 +92,17 @@ namespace std {
|
|
| 92 |
```
|
| 93 |
|
| 94 |
#### Constructors, copy, and assignment <a id="array.cons">[[array.cons]]</a>
|
| 95 |
|
| 96 |
The conditions for an aggregate [[dcl.init.aggr]] shall be met. Class
|
| 97 |
-
`array` relies on the implicitly-declared special member functions
|
| 98 |
-
[[class.default.ctor]], [[class.dtor]],
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
*
|
| 104 |
|
| 105 |
``` cpp
|
| 106 |
template<class T, class... U>
|
| 107 |
array(T, U...) -> array<T, 1 + sizeof...(U)>;
|
| 108 |
```
|
|
@@ -136,11 +136,11 @@ constexpr void swap(array& y) noexcept(is_nothrow_swappable_v<T>);
|
|
| 136 |
```
|
| 137 |
|
| 138 |
*Effects:* Equivalent to `swap_ranges(begin(), end(), y.begin())`.
|
| 139 |
|
| 140 |
[*Note 1*: Unlike the `swap` function for other containers,
|
| 141 |
-
`array::swap` takes linear time,
|
| 142 |
cause iterators to become associated with the other
|
| 143 |
container. — *end note*]
|
| 144 |
|
| 145 |
#### Specialized algorithms <a id="array.special">[[array.special]]</a>
|
| 146 |
|
|
|
|
| 2 |
|
| 3 |
#### Overview <a id="array.overview">[[array.overview]]</a>
|
| 4 |
|
| 5 |
The header `<array>` defines a class template for storing fixed-size
|
| 6 |
sequences of objects. An `array` is a contiguous container
|
| 7 |
+
[[container.reqmts]]. An instance of `array<T, N>` stores `N` elements
|
| 8 |
+
of type `T`, so that `size() == N` is an invariant.
|
| 9 |
|
| 10 |
An `array` is an aggregate [[dcl.init.aggr]] that can be
|
| 11 |
list-initialized with up to `N` elements whose types are convertible to
|
| 12 |
`T`.
|
| 13 |
|
| 14 |
+
An `array` meets all of the requirements of a container
|
| 15 |
+
[[container.reqmts]] and of a reversible container
|
| 16 |
+
[[container.rev.reqmts]], except that a default constructed `array`
|
| 17 |
+
object is not empty if `N` > 0. An `array` meets some of the
|
| 18 |
+
requirements of a sequence container [[sequence.reqmts]]. Descriptions
|
| 19 |
+
are provided here only for operations on `array` that are not described
|
| 20 |
+
in one of these tables and for operations where there is additional
|
| 21 |
+
semantic information.
|
| 22 |
|
| 23 |
`array<T, N>` is a structural type [[temp.param]] if `T` is a structural
|
| 24 |
type. Two values `a1` and `a2` of type `array<T, N>` are
|
| 25 |
template-argument-equivalent [[temp.type]] if and only if each pair of
|
| 26 |
corresponding elements in `a1` and `a2` are
|
|
|
|
| 92 |
```
|
| 93 |
|
| 94 |
#### Constructors, copy, and assignment <a id="array.cons">[[array.cons]]</a>
|
| 95 |
|
| 96 |
The conditions for an aggregate [[dcl.init.aggr]] shall be met. Class
|
| 97 |
+
`array` relies on the implicitly-declared special member functions
|
| 98 |
+
[[class.default.ctor]], [[class.dtor]], [[class.copy.ctor]] to conform
|
| 99 |
+
to the container requirements table in [[container.requirements]]. In
|
| 100 |
+
addition to the requirements specified in the container requirements
|
| 101 |
+
table, the implicit move constructor and move assignment operator for
|
| 102 |
+
`array` require that `T` be *Cpp17MoveConstructible* or
|
| 103 |
+
*Cpp17MoveAssignable*, respectively.
|
| 104 |
|
| 105 |
``` cpp
|
| 106 |
template<class T, class... U>
|
| 107 |
array(T, U...) -> array<T, 1 + sizeof...(U)>;
|
| 108 |
```
|
|
|
|
| 136 |
```
|
| 137 |
|
| 138 |
*Effects:* Equivalent to `swap_ranges(begin(), end(), y.begin())`.
|
| 139 |
|
| 140 |
[*Note 1*: Unlike the `swap` function for other containers,
|
| 141 |
+
`array::swap` takes linear time, can exit via an exception, and does not
|
| 142 |
cause iterators to become associated with the other
|
| 143 |
container. — *end note*]
|
| 144 |
|
| 145 |
#### Specialized algorithms <a id="array.special">[[array.special]]</a>
|
| 146 |
|