Guaranteed lifetime of {input.begin(), input.end()} after an action ::apply() method #280
Answered
by
d-frey
0x8000-0000
asked this question in
Q&A
-
Regarding https://github.com/taocpp/PEGTL/blob/main/doc/Actions-and-States.md?plain=1#L200
I am creating (by hand for now) a parse tree, and I would like to record some "strings" cheaply in the nodes, using the result of input.string_view(). I understand they might dangle, but if my original input comes from |
Beta Was this translation helpful? Give feedback.
Answered by
d-frey
Oct 20, 2021
Replies: 1 comment
-
Yes, that should work. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
0x8000-0000
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, that should work.