From Jason Turner

[tuple.rel]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpbuhk5_l5/{from.md → to.md} +11 -10
tmp/tmpbuhk5_l5/{from.md → to.md} RENAMED
@@ -1,29 +1,30 @@
1
  #### Relational operators <a id="tuple.rel">[[tuple.rel]]</a>
2
 
3
  ``` cpp
4
  template<class... TTypes, class... UTypes>
5
- bool operator==(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
6
  ```
7
 
8
- *Requires:* For all `i`, where `0 <= i` and `i < sizeof...(Types)`,
9
  `get<i>(t) == get<i>(u)` is a valid expression returning a type that is
10
  convertible to `bool`. `sizeof...(TTypes)` `==` `sizeof...(UTypes)`.
11
 
12
- *Returns:* `true` iff `get<i>(t) == get<i>(u)` for all `i`. For any two
13
- zero-length tuples `e` and `f`, `e == f` returns `true`.
 
14
 
15
  *Effects:* The elementary comparisons are performed in order from the
16
  zeroth index upwards. No comparisons or element accesses are performed
17
  after the first equality comparison that evaluates to `false`.
18
 
19
  ``` cpp
20
  template<class... TTypes, class... UTypes>
21
- bool operator<(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
22
  ```
23
 
24
- *Requires:* For all `i`, where `0 <= i` and `i < sizeof...(Types)`,
25
  `get<i>(t) < get<i>(u)` and `get<i>(u) < get<i>(t)` are valid
26
  expressions returning types that are convertible to `bool`.
27
  `sizeof...(TTypes)` `==` `sizeof...(UTypes)`.
28
 
29
  *Returns:* The result of a lexicographical comparison between `t` and
@@ -33,32 +34,32 @@ where `r`ₜₐᵢₗ for some tuple `r` is a tuple containing all but the first
33
  element of `r`. For any two zero-length tuples `e` and `f`, `e < f`
34
  returns `false`.
35
 
36
  ``` cpp
37
  template<class... TTypes, class... UTypes>
38
- bool operator!=(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
39
  ```
40
 
41
  *Returns:* `!(t == u)`.
42
 
43
  ``` cpp
44
  template<class... TTypes, class... UTypes>
45
- bool operator>(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
46
  ```
47
 
48
  *Returns:* `u < t`.
49
 
50
  ``` cpp
51
  template<class... TTypes, class... UTypes>
52
- bool operator<=(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
53
  ```
54
 
55
  *Returns:* `!(u < t)`
56
 
57
  ``` cpp
58
  template<class... TTypes, class... UTypes>
59
- bool operator>=(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
60
  ```
61
 
62
  *Returns:* `!(t < u)`
63
 
64
  The above definitions for comparison operators do not require `tₜₐᵢₗ`
 
1
  #### Relational operators <a id="tuple.rel">[[tuple.rel]]</a>
2
 
3
  ``` cpp
4
  template<class... TTypes, class... UTypes>
5
+ constexpr bool operator==(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
6
  ```
7
 
8
+ *Requires:* For all `i`, where `0 <= i` and `i < sizeof...(TTypes)`,
9
  `get<i>(t) == get<i>(u)` is a valid expression returning a type that is
10
  convertible to `bool`. `sizeof...(TTypes)` `==` `sizeof...(UTypes)`.
11
 
12
+ *Returns:* `true` if `get<i>(t) == get<i>(u)` for all `i`, otherwise
13
+ `false`. For any two zero-length tuples `e` and `f`, `e == f` returns
14
+ `true`.
15
 
16
  *Effects:* The elementary comparisons are performed in order from the
17
  zeroth index upwards. No comparisons or element accesses are performed
18
  after the first equality comparison that evaluates to `false`.
19
 
20
  ``` cpp
21
  template<class... TTypes, class... UTypes>
22
+ constexpr bool operator<(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
23
  ```
24
 
25
+ *Requires:* For all `i`, where `0 <= i` and `i < sizeof...(TTypes)`,
26
  `get<i>(t) < get<i>(u)` and `get<i>(u) < get<i>(t)` are valid
27
  expressions returning types that are convertible to `bool`.
28
  `sizeof...(TTypes)` `==` `sizeof...(UTypes)`.
29
 
30
  *Returns:* The result of a lexicographical comparison between `t` and
 
34
  element of `r`. For any two zero-length tuples `e` and `f`, `e < f`
35
  returns `false`.
36
 
37
  ``` cpp
38
  template<class... TTypes, class... UTypes>
39
+ constexpr bool operator!=(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
40
  ```
41
 
42
  *Returns:* `!(t == u)`.
43
 
44
  ``` cpp
45
  template<class... TTypes, class... UTypes>
46
+ constexpr bool operator>(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
47
  ```
48
 
49
  *Returns:* `u < t`.
50
 
51
  ``` cpp
52
  template<class... TTypes, class... UTypes>
53
+ constexpr bool operator<=(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
54
  ```
55
 
56
  *Returns:* `!(u < t)`
57
 
58
  ``` cpp
59
  template<class... TTypes, class... UTypes>
60
+ constexpr bool operator>=(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
61
  ```
62
 
63
  *Returns:* `!(t < u)`
64
 
65
  The above definitions for comparison operators do not require `tₜₐᵢₗ`