sstable: migrate from boost::remove_if() to std::erase_if()

Replace boost::remove_if() with the standard library's std::erase_if()
to reduce external dependencies and simplify the codebase. This change
eliminates the requirement for boost::range and makes the implementation
more maintainable.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2025-02-11 08:39:55 +08:00
parent 6f04de3efd
commit ba724a26f4

View File

@@ -12,8 +12,6 @@
#include <seastar/util/defer.hh>
#include <boost/icl/interval_map.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/remove_if.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/numeric.hpp>
@@ -890,7 +888,7 @@ make_sstable_filter(const dht::ring_position& pos, const schema& schema, const s
static std::vector<shared_sstable>
filter_sstable_for_reader(std::vector<shared_sstable>&& sstables, const schema& schema, const dht::ring_position& pos, const sstable_predicate& predicate) {
auto filter = [_filter = make_sstable_filter(pos, schema, predicate)] (const shared_sstable& sst) { return !_filter(*sst); };
sstables.erase(boost::remove_if(sstables, filter), sstables.end());
std::erase_if(sstables, filter);
return std::move(sstables);
}