Skip to content

Implement LWG-3891 LWG-3870 breaks std::expected<cv T, E>#6233

Merged
StephanTLavavej merged 3 commits intomicrosoft:mainfrom
frederick-vs-ja:lwg-3891
Apr 17, 2026
Merged

Implement LWG-3891 LWG-3870 breaks std::expected<cv T, E>#6233
StephanTLavavej merged 3 commits intomicrosoft:mainfrom
frederick-vs-ja:lwg-3891

Conversation

@frederick-vs-ja
Copy link
Copy Markdown
Contributor

Fixes #6220.

Remarks:

  • The final resolution of LWG-3891 introduced some potential inconsistency - some member functions are detected but not actually called when value_type is cv-qualified. The assert(false); occurrences correspond to such inconsistency.
  • MSVC may fail to activate union member of an empty class type during constant evaluation, and DevCom-11070772 is reported for this. For MSVC, FakeCvAssignable is made non-empty for now.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner April 7, 2026 08:02
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Apr 7, 2026
@StephanTLavavej StephanTLavavej added the LWG Library Working Group issue label Apr 7, 2026
@StephanTLavavej StephanTLavavej self-assigned this Apr 13, 2026
Comment thread tests/std/tests/P0323R12_expected/test.cpp Outdated
Comment thread tests/std/tests/P0323R12_expected/test.cpp
@StephanTLavavej StephanTLavavej removed their assignment Apr 14, 2026
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 14, 2026
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Apr 15, 2026
@StephanTLavavej
Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo. Please notify me if any further changes are pushed, otherwise no action is required.

@StephanTLavavej StephanTLavavej merged commit a519509 into microsoft:main Apr 17, 2026
49 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Apr 17, 2026
@StephanTLavavej
Copy link
Copy Markdown
Member

🏚️ 🛠️ 🏡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LWG Library Working Group issue

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

LWG-3891 LWG-3870 breaks std::expected<cv T, E>

2 participants