Skip to content

Commit a0a77f9

Browse files
committed
fix requirements for parition_point
1 parent 87a321a commit a0a77f9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

14_binary_search.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ Divide by 2.
135135
Dividing numbers is easier so we will start with a counted range, instead of bounded.
136136

137137
template<typename I, typename N, typename P>
138-
// I is InputIterator
139-
// P is unary predicate
138+
// I is ForwardIterator
139+
// P is UnaryPredicate
140140
// N is integral type
141141
// value_type of I == argument_type of P
142142
inline
@@ -169,12 +169,12 @@ We are traversing more than linear search on the average case.
169169
We are also not trying to be lucky and find equal.
170170

171171
template<typename I, typename I, typename P>
172-
// I is InputIterator
173-
// P is unary predicate
172+
// I is ForwardIterator
173+
// P is UnaryPredicate
174174
// N is integral type
175175
// value_type of I == argument_type of P
176176
inline
177-
I partitioned_point_n(I first, I last, P pred) {
177+
I partition_point_n(I first, I last, P pred) {
178178
return partition_point_n(first, std::distance(first, last), pred);
179179
}
180180

0 commit comments

Comments
 (0)