From Jason Turner

[tuple.helper]

Diff to HTML by rtfpessoa

tmp/tmp563wdm5i/{from.md → to.md} RENAMED
@@ -2,17 +2,17 @@
2
 
3
  ``` cpp
4
  template<class T> struct tuple_size;
5
  ```
6
 
7
- All specializations of `tuple_size` meet the *Cpp17UnaryTypeTrait*
8
- requirements [[meta.rqmts]] with a base characteristic of
9
- `integral_constant<size_t, N>` for some `N`.
10
 
11
  ``` cpp
12
  template<class... Types>
13
- struct tuple_size<tuple<Types...>> : public integral_constant<size_t, sizeof...(Types)> { };
14
  ```
15
 
16
  ``` cpp
17
  template<size_t I, class... Types>
18
  struct tuple_element<I, tuple<Types...>> {
@@ -20,12 +20,12 @@ template<size_t I, class... Types>
20
  };
21
  ```
22
 
23
  *Mandates:* `I` < `sizeof...(Types)`.
24
 
25
- *Type:* `TI` is the type of the `I`ᵗʰ element of `Types`, where indexing
26
- is zero-based.
27
 
28
  ``` cpp
29
  template<class T> struct tuple_size<const T>;
30
  ```
31
 
@@ -60,11 +60,11 @@ template<size_t I, class T> struct tuple_element<I, const T>;
60
  ```
61
 
62
  Let `TE` denote `tuple_element_t<I, T>` of the cv-unqualified type `T`.
63
  Then each specialization of the template meets the
64
  *Cpp17TransformationTrait* requirements [[meta.rqmts]] with a member
65
- typedef `type` that names the type `add_const_t<TE>`.
66
 
67
  In addition to being available via inclusion of the `<tuple>` header,
68
  the template is available when any of the headers `<array>`, `<ranges>`,
69
  or `<utility>` are included.
70
 
 
2
 
3
  ``` cpp
4
  template<class T> struct tuple_size;
5
  ```
6
 
7
+ Except where specified otherwise, all specializations of `tuple_size`
8
+ meet the *Cpp17UnaryTypeTrait* requirements [[meta.rqmts]] with a base
9
+ characteristic of `integral_constant<size_t, N>` for some `N`.
10
 
11
  ``` cpp
12
  template<class... Types>
13
+ struct tuple_size<tuple<Types...>> : integral_constant<size_t, sizeof...(Types)> { };
14
  ```
15
 
16
  ``` cpp
17
  template<size_t I, class... Types>
18
  struct tuple_element<I, tuple<Types...>> {
 
20
  };
21
  ```
22
 
23
  *Mandates:* `I` < `sizeof...(Types)`.
24
 
25
+ *Result:* `TI` is the type of the `I`ᵗʰ element of `Types`, where
26
+ indexing is zero-based.
27
 
28
  ``` cpp
29
  template<class T> struct tuple_size<const T>;
30
  ```
31
 
 
60
  ```
61
 
62
  Let `TE` denote `tuple_element_t<I, T>` of the cv-unqualified type `T`.
63
  Then each specialization of the template meets the
64
  *Cpp17TransformationTrait* requirements [[meta.rqmts]] with a member
65
+ typedef `type` that names the type `const TE`.
66
 
67
  In addition to being available via inclusion of the `<tuple>` header,
68
  the template is available when any of the headers `<array>`, `<ranges>`,
69
  or `<utility>` are included.
70