Match resource.cpp with a small fake match (#2936)

This commit is contained in:
hatal175
2025-12-09 23:44:27 +02:00
committed by GitHub
parent 2447d5a02a
commit cfded01caa
7 changed files with 28 additions and 17 deletions
@@ -31,7 +31,9 @@ inline ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
template <class ForwardIterator, class T>
ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T& val) {
// For some reason, calling the other lower_bound matches for debug, but not for retail:
// return lower_bound(first, last, val, std::detail::less<T, T>());
#if DEBUG
return lower_bound(first, last, val, std::detail::less<T, T>());
#else
typedef typename iterator_traits<ForwardIterator>::difference_type difference_type;
difference_type len = std::distance(first, last);
@@ -50,6 +52,7 @@ ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T
}
return first;
#endif
}
template <class ForwardIterator, class T, class Predicate>