diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-04-14 21:41:27 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-06-22 18:20:56 +0000 |
| commit | bdd1243df58e60e85101c09001d9812a789b6bc4 (patch) | |
| tree | a1ce621c7301dd47ba2ddc3b8eaa63b441389481 /contrib/llvm-project/libcxx/include/__algorithm/max.h | |
| parent | 781624ca2d054430052c828ba8d2c2eaf2d733e7 (diff) | |
| parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/max.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/max.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/max.h b/contrib/llvm-project/libcxx/include/__algorithm/max.h index 345b235a2193..a08a3fc59bda 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/max.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/max.h @@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class _Tp, class _Compare> _LIBCPP_NODISCARD_EXT inline -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { @@ -35,7 +35,7 @@ max(const _Tp& __a, const _Tp& __b, _Compare __comp) template <class _Tp> _LIBCPP_NODISCARD_EXT inline -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& max(const _Tp& __a, const _Tp& __b) { @@ -46,17 +46,16 @@ max(const _Tp& __a, const _Tp& __b) template<class _Tp, class _Compare> _LIBCPP_NODISCARD_EXT inline -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp max(initializer_list<_Tp> __t, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return *_VSTD::__max_element<_Comp_ref>(__t.begin(), __t.end(), __comp); + return *_VSTD::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp); } template<class _Tp> _LIBCPP_NODISCARD_EXT inline -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp max(initializer_list<_Tp> __t) { |
