From Jason Turner

[alg.min.max]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpsgc4uvb2/{from.md → to.md} +18 -18
tmp/tmpsgc4uvb2/{from.md → to.md} RENAMED
@@ -1,11 +1,11 @@
1
  ### Minimum and maximum <a id="alg.min.max">[[alg.min.max]]</a>
2
 
3
  ``` cpp
4
- template<class T> const T& min(const T& a, const T& b);
5
  template<class T, class Compare>
6
- const T& min(const T& a, const T& b, Compare comp);
7
  ```
8
 
9
  *Requires:* Type `T` is `LessThanComparable`
10
  (Table  [[lessthancomparable]]).
11
 
@@ -13,13 +13,13 @@ template<class T, class Compare>
13
 
14
  *Remarks:* Returns the first argument when the arguments are equivalent.
15
 
16
  ``` cpp
17
  template<class T>
18
- T min(initializer_list<T> t);
19
  template<class T, class Compare>
20
- T min(initializer_list<T> t, Compare comp);
21
  ```
22
 
23
  *Requires:* `T` is `LessThanComparable` and `CopyConstructible` and
24
  `t.size() > 0`.
25
 
@@ -27,13 +27,13 @@ template<class T, class Compare>
27
 
28
  *Remarks:* Returns a copy of the leftmost argument when several
29
  arguments are equivalent to the smallest. 
30
 
31
  ``` cpp
32
- template<class T> const T& max(const T& a, const T& b);
33
  template<class T, class Compare>
34
- const T& max(const T& a, const T& b, Compare comp);
35
  ```
36
 
37
  *Requires:* Type `T` is `LessThanComparable`
38
  (Table  [[lessthancomparable]]).
39
 
@@ -41,13 +41,13 @@ template<class T, class Compare>
41
 
42
  *Remarks:* Returns the first argument when the arguments are equivalent.
43
 
44
  ``` cpp
45
  template<class T>
46
- T max(initializer_list<T> t);
47
  template<class T, class Compare>
48
- T max(initializer_list<T> t, Compare comp);
49
  ```
50
 
51
  *Requires:* `T` is `LessThanComparable` and `CopyConstructible` and
52
  `t.size() > 0`.
53
 
@@ -55,13 +55,13 @@ template<class T, class Compare>
55
 
56
  *Remarks:* Returns a copy of the leftmost argument when several
57
  arguments are equivalent to the largest.
58
 
59
  ``` cpp
60
- template<class T> pair<const T&, const T&> minmax(const T& a, const T& b);
61
  template<class T, class Compare>
62
- pair<const T&, const T&> minmax(const T& a, const T& b, Compare comp);
63
  ```
64
 
65
  *Requires:* Type `T` shall be `LessThanComparable`
66
  (Table  [[lessthancomparable]]).
67
 
@@ -73,13 +73,13 @@ are equivalent.
73
 
74
  *Complexity:* Exactly one comparison.
75
 
76
  ``` cpp
77
  template<class T>
78
- pair<T, T> minmax(initializer_list<T> t);
79
  template<class T, class Compare>
80
- pair<T, T> minmax(initializer_list<T> t, Compare comp);
81
  ```
82
 
83
  *Requires:* `T` is `LessThanComparable` and `CopyConstructible` and
84
  `t.size() > 0`.
85
 
@@ -101,13 +101,13 @@ template<class ForwardIterator, class Compare>
101
  ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
102
  Compare comp);
103
  ```
104
 
105
  *Returns:* The first iterator `i` in the range \[`first`, `last`) such
106
- that for any iterator `j` in the range \[`first`, `last`) the following
107
- corresponding conditions hold: `!(*j < *i)` or `comp(*j, *i) == false`.
108
- Returns `last` if `first == last`.
109
 
110
  *Complexity:* Exactly `max((last - first) - 1, 0)` applications of the
111
  corresponding comparisons.
112
 
113
  ``` cpp
@@ -117,13 +117,13 @@ template<class ForwardIterator, class Compare>
117
  ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
118
  Compare comp);
119
  ```
120
 
121
  *Returns:* The first iterator `i` in the range \[`first`, `last`) such
122
- that for any iterator `j` in the range \[`first`, `last`) the following
123
- corresponding conditions hold: `!(*i < *j)` or `comp(*i, *j) == false`.
124
- Returns `last` if `first == last`.
125
 
126
  *Complexity:* Exactly `max((last - first) - 1, 0)` applications of the
127
  corresponding comparisons.
128
 
129
  ``` cpp
 
1
  ### Minimum and maximum <a id="alg.min.max">[[alg.min.max]]</a>
2
 
3
  ``` cpp
4
+ template<class T> constexpr const T& min(const T& a, const T& b);
5
  template<class T, class Compare>
6
+ constexpr const T& min(const T& a, const T& b, Compare comp);
7
  ```
8
 
9
  *Requires:* Type `T` is `LessThanComparable`
10
  (Table  [[lessthancomparable]]).
11
 
 
13
 
14
  *Remarks:* Returns the first argument when the arguments are equivalent.
15
 
16
  ``` cpp
17
  template<class T>
18
+ constexpr T min(initializer_list<T> t);
19
  template<class T, class Compare>
20
+ constexpr T min(initializer_list<T> t, Compare comp);
21
  ```
22
 
23
  *Requires:* `T` is `LessThanComparable` and `CopyConstructible` and
24
  `t.size() > 0`.
25
 
 
27
 
28
  *Remarks:* Returns a copy of the leftmost argument when several
29
  arguments are equivalent to the smallest. 
30
 
31
  ``` cpp
32
+ template<class T> constexpr const T& max(const T& a, const T& b);
33
  template<class T, class Compare>
34
+ constexpr const T& max(const T& a, const T& b, Compare comp);
35
  ```
36
 
37
  *Requires:* Type `T` is `LessThanComparable`
38
  (Table  [[lessthancomparable]]).
39
 
 
41
 
42
  *Remarks:* Returns the first argument when the arguments are equivalent.
43
 
44
  ``` cpp
45
  template<class T>
46
+ constexpr T max(initializer_list<T> t);
47
  template<class T, class Compare>
48
+ constexpr T max(initializer_list<T> t, Compare comp);
49
  ```
50
 
51
  *Requires:* `T` is `LessThanComparable` and `CopyConstructible` and
52
  `t.size() > 0`.
53
 
 
55
 
56
  *Remarks:* Returns a copy of the leftmost argument when several
57
  arguments are equivalent to the largest.
58
 
59
  ``` cpp
60
+ template<class T> constexpr pair<const T&, const T&> minmax(const T& a, const T& b);
61
  template<class T, class Compare>
62
+ constexpr pair<const T&, const T&> minmax(const T& a, const T& b, Compare comp);
63
  ```
64
 
65
  *Requires:* Type `T` shall be `LessThanComparable`
66
  (Table  [[lessthancomparable]]).
67
 
 
73
 
74
  *Complexity:* Exactly one comparison.
75
 
76
  ``` cpp
77
  template<class T>
78
+ constexpr pair<T, T> minmax(initializer_list<T> t);
79
  template<class T, class Compare>
80
+ constexpr pair<T, T> minmax(initializer_list<T> t, Compare comp);
81
  ```
82
 
83
  *Requires:* `T` is `LessThanComparable` and `CopyConstructible` and
84
  `t.size() > 0`.
85
 
 
101
  ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
102
  Compare comp);
103
  ```
104
 
105
  *Returns:* The first iterator `i` in the range \[`first`, `last`) such
106
+ that for every iterator `j` in the range \[`first`, `last`) the
107
+ following corresponding conditions hold: `!(*j < *i)` or
108
+ `comp(*j, *i) == false`. Returns `last` if `first == last`.
109
 
110
  *Complexity:* Exactly `max((last - first) - 1, 0)` applications of the
111
  corresponding comparisons.
112
 
113
  ``` cpp
 
117
  ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
118
  Compare comp);
119
  ```
120
 
121
  *Returns:* The first iterator `i` in the range \[`first`, `last`) such
122
+ that for every iterator `j` in the range \[`first`, `last`) the
123
+ following corresponding conditions hold: `!(*i < *j)` or
124
+ `comp(*i, *j) == false`. Returns `last` if `first == last`.
125
 
126
  *Complexity:* Exactly `max((last - first) - 1, 0)` applications of the
127
  corresponding comparisons.
128
 
129
  ``` cpp