From Jason Turner

[array.tuple]

Diff to HTML by rtfpessoa

tmp/tmpkpf_1x02/{from.md → to.md} RENAMED
@@ -1,19 +1,20 @@
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
  ```
11
 
12
- *Requires:* `I < N`. The program is ill-formed if `I` is out of bounds.
13
-
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>
@@ -22,10 +23,10 @@ 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
 
 
1
+ #### Tuple interface <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
+ template<size_t I, class T, size_t N>
10
+ struct tuple_element<I, array<T, N>> {
11
+ using type = T;
12
+ };
13
  ```
14
 
15
+ *Mandates:* `I < N` is `true`.
 
 
16
 
17
  ``` cpp
18
  template<size_t I, class T, size_t N>
19
  constexpr T& get(array<T, N>& a) noexcept;
20
  template<size_t I, class T, size_t N>
 
23
  constexpr const T& get(const array<T, N>& a) noexcept;
24
  template<size_t I, class T, size_t N>
25
  constexpr const T&& get(const array<T, N>&& a) noexcept;
26
  ```
27
 
28
+ *Mandates:* `I < N` is `true`.
29
 
30
+ *Returns:* A reference to the `I`ᵗʰ element of `a`, where indexing is
31
  zero-based.
32