Skip to content

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

Merged
Stephan T. Lavavej (StephanTLavavej) merged 3 commits into
microsoft:mainfrom
frederick-vs-ja:lwg-3891
Apr 17, 2026
Merged

Implement LWG-3891 LWG-3870 breaks std::expected<cv T, E>#6233
Stephan T. Lavavej (StephanTLavavej) merged 3 commits into
microsoft: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.
Comment thread tests/std/tests/P0323R12_expected/test.cpp Outdated
Comment thread tests/std/tests/P0323R12_expected/test.cpp
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 14, 2026
@StephanTLavavej Stephan T. Lavavej (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
Stephan T. Lavavej (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

2 participants