aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h
diff options
context:
space:
mode:
authorhiddenpath <hiddenpath@yandex-team.com>2024-02-21 23:16:42 +0300
committerhiddenpath <hiddenpath@yandex-team.com>2024-02-21 23:33:25 +0300
commit9052eb5cc304b8da8885fc4e3364ebddc16945f3 (patch)
tree3c252f6161dd0745c7732d74c9304c000645ab47 /contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h
parentf5eb715f103692e7c7536e13bef3f281fd78e5e7 (diff)
downloadydb-9052eb5cc304b8da8885fc4e3364ebddc16945f3.tar.gz
Update libcxx to llvmorg-17.0.6
Update libcxx to llvmorg-17.0.6 c871ef572c71b4fef22d4a9e65bcebc57e625aea
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h
index 09a97fc790..9613f7f377 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h
@@ -22,25 +22,20 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER >= 20
_LIBCPP_BEGIN_NAMESPACE_STD
namespace ranges {
namespace __clamp {
struct __fn {
-
template <class _Type,
- class _Proj = identity,
+ class _Proj = identity,
indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
- _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
- const _Type& operator()(const _Type& __value,
- const _Type& __low,
- const _Type& __high,
- _Comp __comp = {},
- _Proj __proj = {}) const {
- _LIBCPP_ASSERT(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))),
- "Bad bounds passed to std::ranges::clamp");
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr const _Type& operator()(
+ const _Type& __value, const _Type& __low, const _Type& __high, _Comp __comp = {}, _Proj __proj = {}) const {
+ _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))),
+ "Bad bounds passed to std::ranges::clamp");
if (std::invoke(__comp, std::invoke(__proj, __value), std::invoke(__proj, __low)))
return __low;
@@ -49,17 +44,16 @@ struct __fn {
else
return __value;
}
-
};
} // namespace __clamp
inline namespace __cpo {
- inline constexpr auto clamp = __clamp::__fn{};
+inline constexpr auto clamp = __clamp::__fn{};
} // namespace __cpo
} // namespace ranges
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCPP_STD_VER >= 20
#endif // _LIBCPP___ALGORITHM_RANGES_CLAMP_H