Replace boost/algorithm/cxx11 with C++11 features

This commit is contained in:
Alex Beregszaszi
2020-05-11 14:27:54 +01:00
parent 81397dc2c5
commit 875415a132
7 changed files with 17 additions and 14 deletions
+5 -2
View File
@@ -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>
@@ -1058,7 +1057,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(), "");