Skip to content
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

cannot create any_view from empty_view #1796

Open
eroller opened this issue Oct 2, 2023 · 0 comments
Open

cannot create any_view from empty_view #1796

eroller opened this issue Oct 2, 2023 · 0 comments

Comments

@eroller
Copy link

eroller commented Oct 2, 2023

It seems like empty_view is missing something that is needed to use with any_view?

As a workaround I can first create a ref_view using ranges::views::all and then create an any_view from that,

ranges::any_view all_empty = ranges::views::all(ranges::views::empty<int>);  // OK
ranges::any_view empty = ranges::views::empty<int>;                          // ERROR 
<source>:5:45: error: class template argument deduction failed:
    5 |     ranges::any_view empty = ranges::views::empty<int>;                          // ERROR
      |                                             ^~~~~~~~~~
<source>:5:45: error: no matching function for call to 'any_view(const ranges::empty_view<int>&)'

https://godbolt.org/z/rWorsefM5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant