-
Notifications
You must be signed in to change notification settings - Fork 264
Make array_view(pointer, size) constructor public #666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/azp run |
|
No pipelines are associated with this pull request. |
|
Please add a unit test and verify that the deduction guide works. |
|
@oldnewthing please let me know if the test I added is covering what you had in mind re: deduction guides. |
|
@kennykerr this formulation requires callers to explicitly cast to |
|
I was thinking of adding a new case to the REQUIRE_DEDUCED_AS(uint8_t, { &a[0], 3 });to verify that com_array{ &a[0], 3 }deduces as |
|
@oldnewthing now I see what you're talking about; done. |
|
/azp run |
|
No pipelines are associated with this pull request. |
kennykerr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I just now saw your comment about size_type. C++/WinRT uses uint32_t for sizes consistent with WinRT. I'm not philosophically opposed to changing that, but it would cause ripples. Unless there's a strong reason to change it now, I'd rather hang in there until we can ditch it all in favor of std::span.
Addressing #665 by promoting the
array_view(pointer, size)constructor to be public rather than protected, which is consistent with C++20'sstd::spanthatwinrt::array_viewis designed to emulate.