<xutility>: Some fixes around std::ranges::enable_view#2978
Conversation
It must reject reference types and be ADL-proof.
| STATIC_ASSERT(!ranges::enable_view<const strange_view4&&>); | ||
|
|
||
| // Verify that the derived-from-view_interface mechanism can handle uses of incomplete types whenever possible | ||
| struct incomplet; |
There was a problem hiding this comment.
Why the mis-spelling of incomplete here?
There was a problem hiding this comment.
The word "incomplete" is incomplete. I assume it's intentional (See "Note: this is an early draft. It’s known to be incomplet and incorrekt, and it has lots of bad formatting.").
There was a problem hiding this comment.
It's a little bit silly but I think it's acceptable.
There was a problem hiding this comment.
This is incorrekt incorrect but consistent with the C++ Working Draft.😺
|
Thanks, this looks good! I pushed very minor changes (product code comment, additional test line). |
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks for investigating and fixing these bugs! 🔍 🐞 😻 |
…#2978) Co-authored-by: Stephan T. Lavavej <[email protected]>
…#2978) Co-authored-by: Stephan T. Lavavej <[email protected]>
Currently the implementation of
std::ranges::enable_viewin MSVC STL doesn't reject reference types.And it doesn't handle incomplete types whenever possible due to ADL.
These bugs are revealed by the libc++ test
std/ranges/range.req/range.view/enable_view.compile.pass.cpp.The fixes are
view_interfacemechanism, and