Fix compiler warnings about incomplete override functions

The warning on VS2013 was:

warning C4266: 'void peg::Ope::Visitor::visit(peg::Whitespace &)' : no
  override available for virtual member function from base
  'peg::Ope::Visitor'; function is hidden

I'm surprised that this warning doesn't happen on gcc/clang though.
pull/21/head
hvellyr 8 years ago
parent b07573e64f
commit 47f8eb171c
  1. 6
      peglib.h

@ -1104,6 +1104,8 @@ struct Ope::Visitor
struct AssignIDToDefinition : public Ope::Visitor
{
using Ope::Visitor::visit;
void visit(Sequence& ope) override {
for (auto op: ope.opes_) {
op->accept(*this);
@ -1133,6 +1135,8 @@ struct IsToken : public Ope::Visitor
{
IsToken() : has_token_boundary(false), has_rule(false) {}
using Ope::Visitor::visit;
void visit(Sequence& ope) override {
for (auto op: ope.opes_) {
op->accept(*this);
@ -1661,6 +1665,8 @@ private:
DetectLeftRecursion(const std::string& name)
: s_(nullptr), name_(name), done_(false) {}
using Ope::Visitor::visit;
void visit(Sequence& ope) override {
for (auto op: ope.opes_) {
op->accept(*this);

Loading…
Cancel
Save