Skip to content

Commit 565423c

Browse files
committed
Replace use of boost::adapters::filtered with ranges::views::filter
1 parent 311b205 commit 565423c

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

liblangutil/ErrorReporter.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
#include <liblangutil/SourceLocation.h>
3131
#include <libsolutil/StringUtils.h>
3232

33-
#include <boost/range/adaptor/filtered.hpp>
33+
#include <range/v3/range/conversion.hpp>
34+
#include <range/v3/view/filter.hpp>
3435

3536
namespace solidity::langutil
3637
{
@@ -106,9 +107,8 @@ class ErrorReporter
106107
std::initializer_list<std::string> const descs = { _descriptions... };
107108
solAssert(descs.size() > 0, "Need error descriptions!");
108109

109-
auto filterEmpty = boost::adaptors::filtered([](std::string const& _s) { return !_s.empty(); });
110-
111-
std::string errorStr = util::joinHumanReadable(descs | filterEmpty, " ");
110+
auto nonEmpty = [](std::string const& _s) { return !_s.empty(); };
111+
std::string errorStr = util::joinHumanReadable(descs | ranges::views::filter(nonEmpty) | ranges::to_vector, " ");
112112

113113
error(_error, Error::Type::TypeError, _location, errorStr);
114114
}

solc/CommandLineInterface.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666

6767
#include <boost/filesystem.hpp>
6868
#include <boost/filesystem/operations.hpp>
69-
#include <boost/range/adaptor/filtered.hpp>
7069
#include <boost/algorithm/string.hpp>
7170

7271
#ifdef _WIN32 // windows

test/libyul/ObjectParser.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include <string>
4444
#include <sstream>
4545

46-
using namespace ranges;
4746
using namespace std;
4847
using namespace solidity::frontend;
4948
using namespace solidity::langutil;

0 commit comments

Comments
 (0)