diff options
Diffstat (limited to 'libcxx/include/__algorithm/max_element.h')
| -rw-r--r-- | libcxx/include/__algorithm/max_element.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libcxx/include/__algorithm/max_element.h b/libcxx/include/__algorithm/max_element.h index 6ac310619bf9..8fd52c77723c 100644 --- a/libcxx/include/__algorithm/max_element.h +++ b/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 |
