treewide: migrate from boost::adaptors::reversed to std::views::reverse

now that we are allowed to use C++23. we now have the luxury of using
`std::views::reverse`.

- replace `boost::adaptors::transformed` with `std::views::transform`
- remove unused `#include <boost/range/adaptor/reversed.hpp>`

this change is part of our ongoing effort to modernize our codebase
and reduce external dependencies where possible.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2024-12-31 14:31:36 +08:00
committed by Avi Kivity
parent f7fd55146d
commit 353b522ca0
11 changed files with 9 additions and 21 deletions

View File

@@ -8,8 +8,7 @@
#include <seastar/core/bitops.hh>
#include <seastar/core/align.hh>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/range/irange.hpp>
#include <ranges>
#include "utils/dynamic_bitset.hh"
#include "seastarx.hh"
@@ -43,7 +42,7 @@ void dynamic_bitset::clear(size_t n) noexcept {
size_t dynamic_bitset::find_first_set() const noexcept
{
size_t pos = 0;
for (auto& vv : _bits | boost::adaptors::reversed) {
for (auto& vv : _bits | std::views::reverse) {
auto v = vv[pos];
pos *= bits_per_int;
if (v) {
@@ -94,7 +93,7 @@ size_t dynamic_bitset::find_next_set(size_t n) const noexcept
size_t dynamic_bitset::find_last_set() const noexcept
{
size_t pos = 0;
for (auto& vv : _bits | boost::adaptors::reversed) {
for (auto& vv : _bits | std::views::reverse) {
auto v = vv[pos];
pos *= bits_per_int;
if (v) {