aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/max_element.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_element.h
parent2f3b605b2e159522ecab77fd518e8139aaf581e9 (diff)
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/max_element.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/max_element.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/max_element.h b/contrib/llvm-project/libcxx/include/__algorithm/max_element.h
index 6ac310619bf9..8fd52c77723c 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/max_element.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/max_element.h
@@ -24,7 +24,7 @@ template <class _Compare, class _ForwardIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
__max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
- static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
+ static_assert(__has_forward_iterator_category<_ForwardIterator>::value,
"std::max_element requires a ForwardIterator");
if (__first != __last)
{
@@ -48,8 +48,7 @@ template <class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last)
{
- return _VSTD::max_element(__first, __last,
- __less<typename iterator_traits<_ForwardIterator>::value_type>());
+ return _VSTD::max_element(__first, __last, __less<>());
}
_LIBCPP_END_NAMESPACE_STD