-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement SSO for constexpr string #1735
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
mnatsuhara
left a comment
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.
Thanks for going through and working on this! Sorry for the wait on a review here. Things look pretty good to me, just a few questions / nitpicks and request for more extensive test coverage :)
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
c164242 to
de327ee
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
mnatsuhara
left a comment
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.
The only real "request changes" here is the missing _STD, otherwise looks great! Thanks for all of the bug fixes and extensive added test coverage 😻
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
4e114ce to
31c97c9
Compare
|
Thanks, this is so much easier to understand now! 😻 I pushed changes to remove one more workaround (didn't affect correctness). |
... and do so without ending the lifetime of the enclosing `basic_string` by reusing its storage.
CaseyCarter
left a comment
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.
I'm going to push a tiny change to address the pre-existing issue and approve.
Co-authored-by: Michael Schellenberger Costa <[email protected]>
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks for simplifying these codepaths and making |
In #1502 we found that it should be possible to enable SSO, but we wanted to get constexpr string in.
It turns out that we were not that far off. I verified that all test compile fine with clang-12. That said, it seems I uncovered 2 distinct MSVC bugs:
_Ptrto the_Bufmember. So I believe clang is correct here and MSVC should recognize that_Bufs lifetime did not yet start