Date: Sat, 2 Oct 2021 17:17:48 +0100
Hi Kilian,
Thanks for your suggestion. The std::ranges::view concept requires movable.
If we relax the single_view’s T only to be object, it is very hard to make
single_view to satisfy view concept.
Any thought?
Thanks
Hui
On Sat, 2 Oct 2021 at 16:51, Kilian Henneberger via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> Hello Hui,
>
> I like your proposal.
> One question though: Can you imagine a use case of creating a
> std::ranges::single_view<TYPE>, where TYPE does not satisfy
> std::move_constructible, yet it would be useful to create a
> std::ranges::single_view of it?
> Personally, I can't. But if there would be such a use case then I would
> propose to relax the requirements on the template argument for single_view
> even further:
>
> template<class T> requires is_object_v<T> class single_view;
>
>
> Best regards
> Kilian
>
>
>
> Am 01.10.2021 um 09:18 schrieb Hui Xie via Std-Proposals:
>
> Hi,
>
> I think it might be good to support move only types for
> std::ranges::single_view and I drafted the idea in
>
>
> https://htmlpreview.github.io/?https://github.com/huixie90/cpp_papers/blob/main/generated/single_view.html
>
>
> Any suggestions?
>
>
> Thanks
>
> Hui
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Thanks for your suggestion. The std::ranges::view concept requires movable.
If we relax the single_view’s T only to be object, it is very hard to make
single_view to satisfy view concept.
Any thought?
Thanks
Hui
On Sat, 2 Oct 2021 at 16:51, Kilian Henneberger via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> Hello Hui,
>
> I like your proposal.
> One question though: Can you imagine a use case of creating a
> std::ranges::single_view<TYPE>, where TYPE does not satisfy
> std::move_constructible, yet it would be useful to create a
> std::ranges::single_view of it?
> Personally, I can't. But if there would be such a use case then I would
> propose to relax the requirements on the template argument for single_view
> even further:
>
> template<class T> requires is_object_v<T> class single_view;
>
>
> Best regards
> Kilian
>
>
>
> Am 01.10.2021 um 09:18 schrieb Hui Xie via Std-Proposals:
>
> Hi,
>
> I think it might be good to support move only types for
> std::ranges::single_view and I drafted the idea in
>
>
> https://htmlpreview.github.io/?https://github.com/huixie90/cpp_papers/blob/main/generated/single_view.html
>
>
> Any suggestions?
>
>
> Thanks
>
> Hui
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2021-10-02 11:18:01