mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8892 from ethereum/boost-cxx11
Replace boost/algorithm/cxx11 with C++11 features
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
#include <liblangutil/ErrorReporter.h>
|
||||
#include <liblangutil/SemVerHandler.h>
|
||||
|
||||
#include <boost/algorithm/cxx11/all_of.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <memory>
|
||||
@@ -335,7 +334,11 @@ bool SyntaxChecker::visit(FunctionTypeName const& _node)
|
||||
bool SyntaxChecker::visit(VariableDeclarationStatement const& _statement)
|
||||
{
|
||||
// Report if none of the variable components in the tuple have a name (only possible via deprecated "var")
|
||||
if (boost::algorithm::all_of_equal(_statement.declarations(), nullptr))
|
||||
if (std::all_of(
|
||||
_statement.declarations().begin(),
|
||||
_statement.declarations().end(),
|
||||
[](ASTPointer<VariableDeclaration> const& declaration) { return declaration == nullptr; }
|
||||
))
|
||||
m_errorReporter.syntaxError(
|
||||
3299_error,
|
||||
_statement.location(),
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <libsolutil/Algorithms.h>
|
||||
#include <libsolutil/StringUtils.h>
|
||||
|
||||
#include <boost/algorithm/cxx11/all_of.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
@@ -1069,7 +1068,11 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement)
|
||||
// No initial value is only permitted for single variables with specified type.
|
||||
if (_statement.declarations().size() != 1 || !_statement.declarations().front())
|
||||
{
|
||||
if (boost::algorithm::all_of_equal(_statement.declarations(), nullptr))
|
||||
if (std::all_of(
|
||||
_statement.declarations().begin(),
|
||||
_statement.declarations().end(),
|
||||
[](ASTPointer<VariableDeclaration> const& declaration) { return declaration == nullptr; }
|
||||
))
|
||||
{
|
||||
// The syntax checker has already generated an error for this case (empty LHS tuple).
|
||||
solAssert(m_errorReporter.hasErrors(), "");
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
#include <json/json.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <utility>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <libsolutil/JSON.h>
|
||||
#include <libsolutil/Keccak256.h>
|
||||
|
||||
#include <boost/algorithm/cxx11/any_of.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
Reference in New Issue
Block a user