diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/ranges_count.h')
-rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/ranges_count.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/ranges_count.h b/contrib/llvm-project/libcxx/include/__algorithm/ranges_count.h index 527dd0620085..82f54567561f 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/ranges_count.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/ranges_count.h @@ -25,7 +25,7 @@ # pragma GCC system_header #endif -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -34,16 +34,16 @@ namespace __count { struct __fn { template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity> requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type*> - _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr - iter_difference_t<_Iter> operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) const { + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Iter> + operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) const { auto __pred = [&](auto&& __e) { return __e == __value; }; return ranges::__count_if_impl(std::move(__first), std::move(__last), __pred, __proj); } template <input_range _Range, class _Type, class _Proj = identity> requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*> - _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr - range_difference_t<_Range> operator()(_Range&& __r, const _Type& __value, _Proj __proj = {}) const { + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr range_difference_t<_Range> + operator()(_Range&& __r, const _Type& __value, _Proj __proj = {}) const { auto __pred = [&](auto&& __e) { return __e == __value; }; return ranges::__count_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj); } @@ -51,12 +51,12 @@ struct __fn { } // namespace __count inline namespace __cpo { - inline constexpr auto count = __count::__fn{}; +inline constexpr auto count = __count::__fn{}; } // namespace __cpo } // namespace ranges _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_STD_VER > 17 +#endif // _LIBCPP_STD_VER >= 20 #endif // _LIBCPP___ALGORITHM_RANGES_COUNT_H |