Repository navigation
Fix LWG-3891 - #38
Open
ComixHe wants to merge 3 commits into
Open
Fix LWG-3891#38ComixHe wants to merge 3 commits into
ComixHe wants to merge 3 commits into
Conversation
LWG-3891: store remove_cv_t<T> in the union and construct/destroy that subobject as cv-unqualified. After LWG-3870, std::construct_at cannot construct through a cv T*, so expected<cv T, E> failed to compile for every operation that rebuilds the stored value - swap() and the assignment paths, e.g. expected<volatile int, E>. Signed-off-by: Yuming He <ComixHe1895@outlook.com>
Signed-off-by: Yuming He <ComixHe1895@outlook.com>
Signed-off-by: Yuming He <ComixHe1895@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
expected<cv T, E>must storeremove_cv_t<T>.Since LWG-3870,
std::construct_atrejects a cv pointer, soswap(),emplace()and the value-rebuilding assignment paths failed to compile for cvT.By the way, it looks like some tests are failing due to LWG-3891. I didn't make any changes to that part of the code in this pr. If you have any ideas, feel free to leave a comment below.