From Jason Turner

[pairs.spec]

Diff to HTML by rtfpessoa

tmp/tmphyyk7y8h/{from.md → to.md} RENAMED
@@ -1,46 +1,46 @@
1
  ### Specialized algorithms <a id="pairs.spec">[[pairs.spec]]</a>
2
 
3
  ``` cpp
4
  template <class T1, class T2>
5
- bool operator==(const pair<T1, T2>& x, const pair<T1, T2>& y);
6
  ```
7
 
8
  *Returns:* `x.first == y.first && x.second == y.second`.
9
 
10
  ``` cpp
11
  template <class T1, class T2>
12
- bool operator<(const pair<T1, T2>& x, const pair<T1, T2>& y);
13
  ```
14
 
15
  *Returns:*
16
  `x.first < y.first || (!(y.first < x.first) && x.second < y.second)`.
17
 
18
  ``` cpp
19
  template <class T1, class T2>
20
- bool operator!=(const pair<T1, T2>& x, const pair<T1, T2>& y);
21
  ```
22
 
23
  *Returns:* `!(x == y)`
24
 
25
  ``` cpp
26
  template <class T1, class T2>
27
- bool operator>(const pair<T1, T2>& x, const pair<T1, T2>& y);
28
  ```
29
 
30
  *Returns:* `y < x`
31
 
32
  ``` cpp
33
  template <class T1, class T2>
34
- bool operator>=(const pair<T1, T2>& x, const pair<T1, T2>& y);
35
  ```
36
 
37
  *Returns:* `!(x < y)`
38
 
39
  ``` cpp
40
  template <class T1, class T2>
41
- bool operator<=(const pair<T1, T2>& x, const pair<T1, T2>& y);
42
  ```
43
 
44
  *Returns:* `!(y < x)`
45
 
46
  ``` cpp
@@ -50,17 +50,17 @@ template<class T1, class T2> void swap(pair<T1, T2>& x, pair<T1, T2>& y)
50
 
51
  *Effects:* `x.swap(y)`
52
 
53
  ``` cpp
54
  template <class T1, class T2>
55
- pair<V1, V2> make_pair(T1&& x, T2&& y);
56
  ```
57
 
58
  *Returns:* `pair<V1, V2>(std::forward<T1>(x), std::forward<T2>(y))`;
59
 
60
- where `V1` and `V2` are determined as follows: Let `Ui` be
61
- `decay<Ti>::type` for each `Ti`. Then each `Vi` is `X&` if `Ui` equals
62
  `reference_wrapper<X>`, otherwise `Vi` is `Ui`.
63
 
64
  In place of:
65
 
66
  ``` cpp
 
1
  ### Specialized algorithms <a id="pairs.spec">[[pairs.spec]]</a>
2
 
3
  ``` cpp
4
  template <class T1, class T2>
5
+ constexpr bool operator==(const pair<T1, T2>& x, const pair<T1, T2>& y);
6
  ```
7
 
8
  *Returns:* `x.first == y.first && x.second == y.second`.
9
 
10
  ``` cpp
11
  template <class T1, class T2>
12
+ constexpr bool operator<(const pair<T1, T2>& x, const pair<T1, T2>& y);
13
  ```
14
 
15
  *Returns:*
16
  `x.first < y.first || (!(y.first < x.first) && x.second < y.second)`.
17
 
18
  ``` cpp
19
  template <class T1, class T2>
20
+ constexpr bool operator!=(const pair<T1, T2>& x, const pair<T1, T2>& y);
21
  ```
22
 
23
  *Returns:* `!(x == y)`
24
 
25
  ``` cpp
26
  template <class T1, class T2>
27
+ constexpr bool operator>(const pair<T1, T2>& x, const pair<T1, T2>& y);
28
  ```
29
 
30
  *Returns:* `y < x`
31
 
32
  ``` cpp
33
  template <class T1, class T2>
34
+ constexpr bool operator>=(const pair<T1, T2>& x, const pair<T1, T2>& y);
35
  ```
36
 
37
  *Returns:* `!(x < y)`
38
 
39
  ``` cpp
40
  template <class T1, class T2>
41
+ constexpr bool operator<=(const pair<T1, T2>& x, const pair<T1, T2>& y);
42
  ```
43
 
44
  *Returns:* `!(y < x)`
45
 
46
  ``` cpp
 
50
 
51
  *Effects:* `x.swap(y)`
52
 
53
  ``` cpp
54
  template <class T1, class T2>
55
+ constexpr pair<V1, V2> make_pair(T1&& x, T2&& y);
56
  ```
57
 
58
  *Returns:* `pair<V1, V2>(std::forward<T1>(x), std::forward<T2>(y))`;
59
 
60
+ where `V1` and `V2` are determined as follows: Let `Ui` be `decay_t<Ti>`
61
+ for each `Ti`. Then each `Vi` is `X&` if `Ui` equals
62
  `reference_wrapper<X>`, otherwise `Vi` is `Ui`.
63
 
64
  In place of:
65
 
66
  ``` cpp