File indexing completed on 2025-01-18 10:09:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef RANGES_V3_ACTION_REVERSE_HPP
0016 #define RANGES_V3_ACTION_REVERSE_HPP
0017
0018 #include <range/v3/range_fwd.hpp>
0019
0020 #include <range/v3/action/action.hpp>
0021 #include <range/v3/algorithm/reverse.hpp>
0022 #include <range/v3/iterator/concepts.hpp>
0023 #include <range/v3/range/traits.hpp>
0024 #include <range/v3/utility/static_const.hpp>
0025
0026 #include <range/v3/detail/prologue.hpp>
0027
0028 namespace ranges
0029 {
0030
0031
0032 namespace actions
0033 {
0034
0035 struct reverse_fn
0036 {
0037 template(typename Rng)(
0038 requires bidirectional_range<Rng> AND permutable<iterator_t<Rng>>)
0039 Rng operator()(Rng && rng) const
0040 {
0041 ranges::reverse(rng);
0042 return static_cast<Rng &&>(rng);
0043 }
0044 };
0045
0046
0047
0048 RANGES_INLINE_VARIABLE(action_closure<reverse_fn>, reverse)
0049 }
0050
0051 }
0052
0053 #include <range/v3/detail/epilogue.hpp>
0054
0055 #endif