mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace use of boost::adapters::filtered with ranges::views::filter
This commit is contained in:
parent
311b2054af
commit
565423c934
@ -30,7 +30,8 @@
|
||||
#include <liblangutil/SourceLocation.h>
|
||||
#include <libsolutil/StringUtils.h>
|
||||
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <range/v3/range/conversion.hpp>
|
||||
#include <range/v3/view/filter.hpp>
|
||||
|
||||
namespace solidity::langutil
|
||||
{
|
||||
@ -106,9 +107,8 @@ public:
|
||||
std::initializer_list<std::string> const descs = { _descriptions... };
|
||||
solAssert(descs.size() > 0, "Need error descriptions!");
|
||||
|
||||
auto filterEmpty = boost::adaptors::filtered([](std::string const& _s) { return !_s.empty(); });
|
||||
|
||||
std::string errorStr = util::joinHumanReadable(descs | filterEmpty, " ");
|
||||
auto nonEmpty = [](std::string const& _s) { return !_s.empty(); };
|
||||
std::string errorStr = util::joinHumanReadable(descs | ranges::views::filter(nonEmpty) | ranges::to_vector, " ");
|
||||
|
||||
error(_error, Error::Type::TypeError, _location, errorStr);
|
||||
}
|
||||
|
@ -66,7 +66,6 @@
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#ifdef _WIN32 // windows
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
using namespace ranges;
|
||||
using namespace std;
|
||||
using namespace solidity::frontend;
|
||||
using namespace solidity::langutil;
|
||||
|
Loading…
Reference in New Issue
Block a user