P2231 Completing constexpr in optional and variant#2005
P2231 Completing constexpr in optional and variant#2005StephanTLavavej merged 41 commits intomicrosoft:mainfrom
Conversation
Co-authored-by: Casey Carter <cacarter@microsoft.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
16e3c24 to
9af7f80
Compare
9af7f80 to
d5cd6f5
Compare
|
As discussed in discord we are currently locked due to https://developercommunity2.visualstudio.com/t/1331017 There is no real way of working around that, so we need to wait until the fix is in |
* A 64-alternative variant is "big" enough. * Clang doesn't know yet that a union with at least one literal member is a literal type.
…st.cpp Add missing include
| #endif // TRANSITION | ||
| optional<T> copy_assigned; | ||
| assert(!copy_assigned.has_value()); | ||
| copy_assigned = constructed; |
There was a problem hiding this comment.
I observe that constructed has been moved-from above, but the Standard guarantees that it still has_value(), and the types being tested are unchanged when they're moved-from, so this is well-defined. (Ditto for the variant tests below.) No change requested.
There was a problem hiding this comment.
Changed so that we properly use first move_constructed and then copy_assigned
|
@miscco @CaseyCarter I pushed a conflict-free merge with |
|
I'm mirroring this to an MSVC-internal PR. Please notify me if any further changes are pushed. |
|
Thanks for |
This implements the library changes in optional and variant.
That said, the tests are in a certain state that needs to be fixed. I will tackle that soon^TM
Fixes #1982