-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify how parse_in_place
will mutate the buffer
#346
Comments
Thanks, this is really appreciated. Those are very good questions, and the documentation should be explicit about these points.
Yes, generally.
Now, if all you have is immutable memory and cannot afford the copy to the arena, and you are 100% certain that no scalar filtering is required, you could hard-cast the pointer from immutable to mutable and just call
No
Yes, pretty much - but only after parsing (during parsing the Tree must not be const, for obvious reasons). If a Feel free to ask further clarification if the above does not quite answer your questions. I will improve the quickstart to explain these points in more detail. I will keep this open to track that. |
Thanks for your very clear explanation! I understand now. |
First of all, thank you for making such an excellent C++ YAML library!
From Quick start,
Could you please explain more on this?
operator<<
andoperator=
, and the modification will be written to the buffer?const ryml::Tree tree
will never modify the buffer even it is parsed byparse_in_place
?The use case is that, I have a large YAML document readonly memory-mapped into memory. I want to avoid copy and parse it.
The text was updated successfully, but these errors were encountered: