[cpp][15_bsearch] comments on IterT.

This commit is contained in:
Liam Huang 2018-10-24 15:29:31 +08:00
parent 7d246008b6
commit 3cd851d2da

View File

@ -10,6 +10,9 @@
enum class BsearchPolicy { FIRST, LAST, UNSPECIFIED };
// Liam Huang: The algorithm works right with iterators that meet the ForwardIterator requirement,
// but with a bad time complexity. For better performance, iterators should meet
// the RandomAccessIterator requirement.
template <typename IterT,
typename ValueT = typename std::iterator_traits<IterT>::value_type,
typename Compare>