aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__algorithm/minmax.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-07-26 19:03:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-07-26 19:04:23 +0000
commit7fa27ce4a07f19b07799a767fc29416f3b625afb (patch)
tree27825c83636c4de341eb09a74f49f5d38a15d165 /libcxx/include/__algorithm/minmax.h
parente3b557809604d036af6e00c60f012c2025b59a5e (diff)
Diffstat (limited to 'libcxx/include/__algorithm/minmax.h')
-rw-r--r--libcxx/include/__algorithm/minmax.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/include/__algorithm/minmax.h b/libcxx/include/__algorithm/minmax.h
index 6ef0a777083f..bdcf57b101e4 100644
--- a/libcxx/include/__algorithm/minmax.h
+++ b/libcxx/include/__algorithm/minmax.h
@@ -27,7 +27,7 @@ template<class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<const _Tp&, const _Tp&>
-minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
+minmax(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b, _Compare __comp)
{
return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a) :
pair<const _Tp&, const _Tp&>(__a, __b);
@@ -37,9 +37,9 @@ template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<const _Tp&, const _Tp&>
-minmax(const _Tp& __a, const _Tp& __b)
+minmax(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
{
- return std::minmax(__a, __b, __less<_Tp>());
+ return std::minmax(__a, __b, __less<>());
}
#ifndef _LIBCPP_CXX03_LANG
@@ -59,7 +59,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Tp, _Tp>
minmax(initializer_list<_Tp> __t)
{
- return std::minmax(__t, __less<_Tp>());
+ return std::minmax(__t, __less<>());
}
#endif // _LIBCPP_CXX03_LANG