RosettaCodeData/Task/Binary-search/C++/binary-search-6.cpp

2 lines
125 B
C++

std::pair<int *, int *> bounds = std::equal_range(array, array+len, what); // a custom comparator can be given as fourth arg