Skip to content

Commit

Permalink
Merge pull request #31150 from camolezi/reduce-boost-phoenix
Browse files Browse the repository at this point in the history
Remove boost::phoenix dependency
  • Loading branch information
cmsbuild committed Aug 17, 2020
2 parents 7c25421 + e24b642 commit c9d02ee
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions FWCore/Modules/src/PathStatusFilter.cc
Expand Up @@ -43,7 +43,6 @@ It does not work for EndPaths or Paths from prior processes.
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Utilities/interface/propagate_const.h"

#include <boost/spirit/include/phoenix_bind.hpp>
#include <boost/spirit/include/qi.hpp>

#include <functional>
Expand All @@ -56,7 +55,6 @@ It does not work for EndPaths or Paths from prior processes.

namespace qi = boost::spirit::qi;
namespace ascii = boost::spirit::ascii;
namespace phoenix = boost::phoenix;

namespace edm {

Expand Down Expand Up @@ -305,12 +303,12 @@ namespace edm {
public:
Grammar(ShuntingYardAlgorithm* algorithm) : Grammar::base_type(expression), algorithm_(algorithm) {
// setup functors that call into shunting algorithm while parsing the logical expression
auto addPathName = phoenix::bind(&ShuntingYardAlgorithm::addPathName, algorithm_, qi::_1);
auto addOperatorNot = phoenix::bind(&ShuntingYardAlgorithm::addOperatorNot, algorithm_);
auto addOperatorAnd = phoenix::bind(&ShuntingYardAlgorithm::addOperatorAnd, algorithm_);
auto addOperatorOr = phoenix::bind(&ShuntingYardAlgorithm::addOperatorOr, algorithm_);
auto addBeginParenthesis = phoenix::bind(&ShuntingYardAlgorithm::addBeginParenthesis, algorithm_);
auto addEndParenthesis = phoenix::bind(&ShuntingYardAlgorithm::addEndParenthesis, algorithm_);
auto addPathName = std::bind(&ShuntingYardAlgorithm::addPathName, algorithm_, std::placeholders::_1);
auto addOperatorNot = std::bind(&ShuntingYardAlgorithm::addOperatorNot, algorithm_);
auto addOperatorAnd = std::bind(&ShuntingYardAlgorithm::addOperatorAnd, algorithm_);
auto addOperatorOr = std::bind(&ShuntingYardAlgorithm::addOperatorOr, algorithm_);
auto addBeginParenthesis = std::bind(&ShuntingYardAlgorithm::addBeginParenthesis, algorithm_);
auto addEndParenthesis = std::bind(&ShuntingYardAlgorithm::addEndParenthesis, algorithm_);

// Define the syntax allowed in the logical expressions
pathName = !unaryOperator >> !binaryOperatorTest >> (+qi::char_("a-zA-Z0-9_"))[addPathName];
Expand Down

0 comments on commit c9d02ee

Please sign in to comment.