-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement P2417R2 More constexpr
bitset
#2972
Conversation
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.
AFAIK MSVC STL tends to use conditional compile here.
It seems that _Is_constant_evaluated
should only be used if old modes (C++14/17) need both constexpr
and runtime optimization.
Co-authored-by: A. Jiang <[email protected]>
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.
This is excellent: 1 real comment on the test, and lots of pre-existing "Hey, this could be const
/noexcept
" comments.
Co-authored-by: Casey Carter <[email protected]>
Co-authored-by: Casey Carter <[email protected]>
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.
Two tiny mistakes from my earlier suggestions, I'll just apply.
@fsb4000 @CaseyCarter I've pushed a correctness fix and a significant expansion of test coverage; please double-check. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
@@ -32,41 +32,41 @@ public: | |||
friend bitset<_Bits>; | |||
|
|||
public: | |||
~reference() noexcept {} // TRANSITION, ABI | |||
_CONSTEXPR23 ~reference() noexcept {} // TRANSITION, ABI |
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 think these should technically be constexpr
always (or I guess _CONSTEXPR20
for constexpr
destructors), but since one can't create one of these at constexpr time until 23, I don't think it matters.
No change requested.
Thanks for setting this bit in the C++23 conformance |
Co-authored-by: Daniel Marshall <[email protected]> Co-authored-by: A. Jiang <[email protected]> Co-authored-by: Casey Carter <[email protected]> Co-authored-by: Stephan T. Lavavej <[email protected]>
Co-authored-by: Daniel Marshall <[email protected]> Co-authored-by: A. Jiang <[email protected]> Co-authored-by: Casey Carter <[email protected]> Co-authored-by: Stephan T. Lavavej <[email protected]>
Fixes #2926
I added a new test file because the previous
bitset
test istr1/bitset
and we don't changetr1
tests.