Skip to content

Simplify ToolVisitor

Gerhard Raven requested to merge simplify-toolvisitor into master
  • have visit accept any 'invocable' with the right signature
  • make inheritance from IVisitor a (private) implementation detail
  • adapt IVisitor implementations by removing their inheritance, and changing 'visit(...)' into 'operator()(...)'.
  • remove the now redundant constVisitor and visitor methods to explicitly convert eg. a lambda into an IVisitor -- just pass the original argument directly to visit instead, and it will take care of this
  • remove redundant 'virtual' when 'override' is already specified
  • prefer std::deque over std::list
  • prefer STL algorithms over explicit loops
  • prefer plain values over rvalue references as arguments in a few places

Closes #142 (closed)

Edited by Marco Clemencic

Merge request reports