tmp/tmpff3wiu8h/{from.md → to.md}
RENAMED
|
@@ -1,11 +1,10 @@
|
|
| 1 |
#### Tuple interface to class template `array` <a id="array.tuple">[[array.tuple]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template <class T, size_t N>
|
| 5 |
-
struct tuple_size<array<T, N>>
|
| 6 |
-
: integral_constant<size_t, N> { };
|
| 7 |
```
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
tuple_element<I, array<T, N>>::type
|
| 11 |
```
|
|
@@ -15,29 +14,18 @@ tuple_element<I, array<T, N> >::type
|
|
| 15 |
*Value:* The type T.
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
template <size_t I, class T, size_t N>
|
| 19 |
constexpr T& get(array<T, N>& a) noexcept;
|
| 20 |
-
```
|
| 21 |
-
|
| 22 |
-
*Requires:* `I < N`. The program is ill-formed if `I` is out of bounds.
|
| 23 |
-
|
| 24 |
-
*Returns:* A reference to the `I`th element of `a`, where indexing is
|
| 25 |
-
zero-based.
|
| 26 |
-
|
| 27 |
-
``` cpp
|
| 28 |
template <size_t I, class T, size_t N>
|
| 29 |
constexpr T&& get(array<T, N>&& a) noexcept;
|
| 30 |
-
```
|
| 31 |
-
|
| 32 |
-
*Effects:* Equivalent to `return std::move(get<I>(a));`
|
| 33 |
-
|
| 34 |
-
``` cpp
|
| 35 |
template <size_t I, class T, size_t N>
|
| 36 |
constexpr const T& get(const array<T, N>& a) noexcept;
|
|
|
|
|
|
|
| 37 |
```
|
| 38 |
|
| 39 |
*Requires:* `I < N`. The program is ill-formed if `I` is out of bounds.
|
| 40 |
|
| 41 |
-
*Returns:* A
|
| 42 |
-
|
| 43 |
|
|
|
|
| 1 |
#### Tuple interface to class template `array` <a id="array.tuple">[[array.tuple]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template <class T, size_t N>
|
| 5 |
+
struct tuple_size<array<T, N>> : integral_constant<size_t, N> { };
|
|
|
|
| 6 |
```
|
| 7 |
|
| 8 |
``` cpp
|
| 9 |
tuple_element<I, array<T, N>>::type
|
| 10 |
```
|
|
|
|
| 14 |
*Value:* The type T.
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
template <size_t I, class T, size_t N>
|
| 18 |
constexpr T& get(array<T, N>& a) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
template <size_t I, class T, size_t N>
|
| 20 |
constexpr T&& get(array<T, N>&& a) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
template <size_t I, class T, size_t N>
|
| 22 |
constexpr const T& get(const array<T, N>& a) noexcept;
|
| 23 |
+
template <size_t I, class T, size_t N>
|
| 24 |
+
constexpr const T&& get(const array<T, N>&& a) noexcept;
|
| 25 |
```
|
| 26 |
|
| 27 |
*Requires:* `I < N`. The program is ill-formed if `I` is out of bounds.
|
| 28 |
|
| 29 |
+
*Returns:* A reference to the `I`th element of `a`, where indexing is
|
| 30 |
+
zero-based.
|
| 31 |
|