aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/ranges_reverse.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/ranges_reverse.h
parent2f3b605b2e159522ecab77fd518e8139aaf581e9 (diff)
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/ranges_reverse.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/ranges_reverse.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/ranges_reverse.h b/contrib/llvm-project/libcxx/include/__algorithm/ranges_reverse.h
index e2a5d9a8250d..9ec865995b4a 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/ranges_reverse.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/ranges_reverse.h
@@ -22,18 +22,16 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER >= 20
_LIBCPP_BEGIN_NAMESPACE_STD
namespace ranges {
namespace __reverse {
struct __fn {
-
template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent>
requires permutable<_Iter>
- _LIBCPP_HIDE_FROM_ABI constexpr
- _Iter operator()(_Iter __first, _Sent __last) const {
+ _LIBCPP_HIDE_FROM_ABI constexpr _Iter operator()(_Iter __first, _Sent __last) const {
if constexpr (random_access_iterator<_Iter>) {
if (__first == __last)
return __first;
@@ -63,21 +61,19 @@ struct __fn {
template <bidirectional_range _Range>
requires permutable<iterator_t<_Range>>
- _LIBCPP_HIDE_FROM_ABI constexpr
- borrowed_iterator_t<_Range> operator()(_Range&& __range) const {
+ _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range> operator()(_Range&& __range) const {
return (*this)(ranges::begin(__range), ranges::end(__range));
}
-
};
} // namespace __reverse
inline namespace __cpo {
- inline constexpr auto reverse = __reverse::__fn{};
+inline constexpr auto reverse = __reverse::__fn{};
} // namespace __cpo
} // namespace ranges
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCPP_STD_VER >= 20
#endif // _LIBCPP___ALGORITHM_RANGES_REVERSE_H