Skip to content

How to run action for the struct which is a parent of the other #194

Answered by d-frey
qawbecrdtey asked this question in Q&A
Discussion options

You must be logged in to vote

The short answer is: You can't. It's a limitation of the language, as the specialization does not work for direct base classes.

As a work-around you may simply avoid deriving directly and instead use a seq as a wrapper. If you use

struct b : tao::pegtl::seq< a > {};

it should work.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by d-frey
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #194 on December 09, 2020 09:07.