aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2024-12-05 10:49:03 +0300
committermikhnenko <mikhnenko@yandex-team.com>2024-12-05 11:21:12 +0300
commit681668b400e84754eb7acbc0e173491bb4dfc8b2 (patch)
treee809b0abb22e9c506c032e256effebcf9ea88dbd /contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
parentfe60cde3cf1989964159845c2929a65056a8dcf3 (diff)
downloadydb-681668b400e84754eb7acbc0e173491bb4dfc8b2.tar.gz
Update libcxx to 18 Dec 3b0705827dbe711788c6b6bec3afa94205db1ce8
commit_hash:875d8582c26b8bf016af25e00ad77d9bbf081948
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
index 5cc418d339..782ce2670f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
@@ -56,7 +56,7 @@ struct __fn {
operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const {
_LIBCPP_ASSERT_UNCATEGORIZED(__il.begin() != __il.end(), "initializer_list must contain at least one element");
- auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
+ auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) -> bool { return std::invoke(__comp, __rhs, __lhs); };
return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp_lhs_rhs_swapped, __proj);
}
@@ -72,7 +72,9 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(__first != __last, "range must contain at least one element");
if constexpr (forward_range<_Rp> && !__is_cheap_to_copy<range_value_t<_Rp>>) {
- auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
+ auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) -> bool {
+ return std::invoke(__comp, __rhs, __lhs);
+ };
return *ranges::__min_element_impl(std::move(__first), std::move(__last), __comp_lhs_rhs_swapped, __proj);
} else {
range_value_t<_Rp> __result = *__first;