aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/max.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-09-02 21:17:18 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-07 17:46:17 +0000
commitfe013be447cd855ccaf6094a1d06aea570450629 (patch)
tree9adc1e0a5d25b6280995832bb29d592fb80554a6 /contrib/llvm-project/libcxx/include/__algorithm/max.h
parent2f3b605b2e159522ecab77fd518e8139aaf581e9 (diff)
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/max.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/max.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/max.h b/contrib/llvm-project/libcxx/include/__algorithm/max.h
index a08a3fc59bda..5d8e64cfff39 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/max.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/max.h
@@ -28,7 +28,7 @@ template <class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
-max(const _Tp& __a, const _Tp& __b, _Compare __comp)
+max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b, _Compare __comp)
{
return __comp(__a, __b) ? __b : __a;
}
@@ -37,9 +37,9 @@ template <class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
-max(const _Tp& __a, const _Tp& __b)
+max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
{
- return _VSTD::max(__a, __b, __less<_Tp>());
+ return _VSTD::max(__a, __b, __less<>());
}
#ifndef _LIBCPP_CXX03_LANG
@@ -59,7 +59,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
max(initializer_list<_Tp> __t)
{
- return *_VSTD::max_element(__t.begin(), __t.end(), __less<_Tp>());
+ return *_VSTD::max_element(__t.begin(), __t.end(), __less<>());
}
#endif // _LIBCPP_CXX03_LANG