aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/ranges_max_element.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/ranges_max_element.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/ranges_max_element.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/ranges_max_element.h b/contrib/llvm-project/libcxx/include/__algorithm/ranges_max_element.h
index 2d92661c8109..2ba97042f1f6 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/ranges_max_element.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/ranges_max_element.h
@@ -37,7 +37,7 @@ struct __fn {
indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Ip
operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
- 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(__first, __last, __comp_lhs_rhs_swapped, __proj);
}
@@ -46,7 +46,7 @@ struct __fn {
indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Rp>
operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
- 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(ranges::begin(__r), ranges::end(__r), __comp_lhs_rhs_swapped, __proj);
}
};