Closed gamagan closed 1 year ago
Checkout [#d9dfc5b] of 2023.3.15 (latest, as of this post)
The following works:
using SharedAst = std::shared_ptr<peg::AstBase<peg::EmptyType>>; // peg::Ast SharedAst ast; parser.parse(code, ast);
The following throws a std:bad_any_cast.
struct AstDecor { bool mFoobar = false; }; using SharedAst = std::shared_ptr<peg::AstBase<AstDecor>>; SharedAst ast; parser.parse(code, ast);
The error is thrown at this location:
@gamagan thanks for the feedback. Here is a workable example. Hope it helps!
https://github.com/yhirose/cpp-peglib/blob/17e069fbc5630300dfcdd017846662b77fb65ae8/test/test1.cc#L403-L418
Checkout [#d9dfc5b] of 2023.3.15 (latest, as of this post)
The following works:
The following throws a std:bad_any_cast.
The error is thrown at this location: