C++ Logo

std-proposals

Advanced search

Re: Support move only types for std::ranges::single_view

From: Kilian Henneberger <kilis-mail_at_[hidden]>
Date: Sat, 2 Oct 2021 17:51:06 +0200
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
> <https://htmlpreview.github.io/?https://github.com/huixie90/cpp_papers/blob/main/generated/single_view.html>
>
>
> Any suggestions?
>
>
> Thanks
>
> Hui
>
>


Received on 2021-10-02 10:51:08