Skip to content

Commit

Permalink
Merge pull request #341 from gitamohr/patch-1
Browse files Browse the repository at this point in the history
typo: "This because" -> "This is because"
  • Loading branch information
ColinH authored Mar 22, 2023
2 parents 9598ca7 + b4b1e89 commit c5eed0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/Actions-and-States.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ struct foo
Now an action class template can be specialised for `foo`, or for `tao::pegtl::alpha`, but *not* for `tao::pegtl::plus< tao::pegtl::alpha >`.
This because base classes are not taken into consideration by the C++ language when choosing a specialisation, which might be surprising when being used to pointer arguments to functions where conversions from pointer-to-derived to pointer-to-base are performed implicitly and silently.
This is because base classes are not taken into consideration by the C++ language when choosing a specialisation, which might be surprising when being used to pointer arguments to functions where conversions from pointer-to-derived to pointer-to-base are performed implicitly and silently.
So although the function called by the library to match `foo` is the inherited `tao::pegtl::plus< tao::pegtl::alpha >::match()`, the rule class is `foo` and the function known as `foo::match()`, wherefore an action needs to be specialised for `foo` instead of `tao::pegtl::plus< tao::pegtl::alpha >`.
Expand Down

0 comments on commit c5eed0d

Please sign in to comment.