-
Notifications
You must be signed in to change notification settings - Fork 126
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
RFC: Add cista::*::cstring type #202
Conversation
Thank you for your PR! I think some tests would be useful, formatting should be fixed (using clang-format), and maybe a bit of description in the code how it works could help me to understand what's going on (just the tricky spots where the magic happens). |
86cabee
to
425fea0
Compare
50e0454
to
0079634
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I guess some tests for serialization and deserialization would be nice :)
0079634
to
860c622
Compare
Still in draft mode. Something missing? |
I was considering if it is still worth keeping cstring_view in such case. If not, the corner case of checking null can be omitted. |
860c622
to
6445e73
Compare
c07e7e7
to
c8cef18
Compare
The latest commit pulled out the null-pointer checks for set_owning related calls(). |
befa740
to
4caf71b
Compare
This new type is able to store a trailing \0 character, without compromising one byte for storage when the string is a small-string. Storage of NUL character within data is also supported. This is inspired by felixguendling#187 (comment). See felixguendling#187.
4caf71b
to
e6ee954
Compare
|
Thank you! |
This new type is able to store a trailing \0 character, without compromising one byte for storage when the string is a small-string.
Storage of NUL character within data is also supported.
This is inspired by
#187 (comment).
See #187.