Skip to content

<xutility>: Adjust inheritance detection for enable_view - #5369

Merged
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
frederick-vs-ja:pedantically-enable_view
Apr 10, 2025
Merged

<xutility>: Adjust inheritance detection for enable_view#5369
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
frederick-vs-ja:pedantically-enable_view

Conversation

@frederick-vs-ja

@frederick-vs-ja A. Jiang (frederick-vs-ja) commented Mar 27, 2025

Copy link
Copy Markdown
Contributor

Per [range.view]/6, a view_interface isn't a base class of itself, so enable_view should report false. Also, current implementation strategy handles const but not volatile, IIUC cv-qualifiers should be consistent handled.

Coverage for (const) volatile types are added.

The original issue was reported as LLVM-132577, and the PR fixing it (LLVM-132582) was recently accepted for libc++.

Drive-by: Change the implement strategy of operator<=> for optional to be more consistent with the Standardese ([optional.syn]), as the old _Derived_from_specialization_of doesn't seem reusable.

Comment thread stl/inc/optional
@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 9699391 into microsoft:main Apr 10, 2025
@github-project-automation github-project-automation Bot moved this from Merging to Done in STL Code Reviews Apr 10, 2025
@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

bug Something isn't working ranges C++20/23 ranges

2 participants