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

Compilation error with zip_view #17

Open
davidhunter22 opened this issue Jan 15, 2022 · 0 comments
Open

Compilation error with zip_view #17

davidhunter22 opened this issue Jan 15, 2022 · 0 comments

Comments

@davidhunter22
Copy link

davidhunter22 commented Jan 15, 2022

Note I'm pretty new with ranges and concepts so I may be doing something dumb. This is with VS 17.1 Preview 2.
I have used zip_view for a few things without problem. Removing the const in the vector and span makes the error go away.

`void foo( )
{
std::vector const ints { 0, 1, 2 };
std::span sp { ints };

auto v { tl::zip_view( sp, ints ) };
auto p { []( auto const& x ) -> bool { return true; } };

// This does not compile with
// 1>C:\Users\foo\source\repos\TL\ranges\src\ranges.cpp(18,18): error C2672: 'operator __surrogate_func': no matching overloaded function found
// 1>C:\Users\foo\source\repos\TL\ranges\src\ranges.cpp(18,31): error C7602: 'std::ranges::_Any_of_fn::operator ()': the associated constraints are not satisfied
std::ranges::any_of( v, p )

};`

zip_view.zip

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