C++ <unresolved overloaded function type> with comparison function
问题 I am trying to implement a custom binary search to run over a vector of dates. My binary search function is the following: template <typename RandomAccessIterator, typename Value, typename Comparer> inline int binary_search(RandomAccessIterator const first, RandomAccessIterator const last, Value const& value, Comparer comparer) { RandomAccessIterator it(std::lower_bound(first, last, value, comparer)); if (it == last || comparer(*it, value) || comparer(value, *it)) return distance(first,last);