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

views::concat doesn't work with std::vector #1791

Open
vinesworth opened this issue Jul 30, 2023 · 1 comment
Open

views::concat doesn't work with std::vector #1791

vinesworth opened this issue Jul 30, 2023 · 1 comment

Comments

@vinesworth
Copy link

vinesworth commented Jul 30, 2023

#include <vector>
#include <range/v3/view/concat.hpp>

int main()
{
    std::vector<int> u, v;
    const auto w = u | ranges::views::concat(v);
}

MSVC:

(7): error C2678: binary '|': no operator found which takes a left-hand operand of type 'std::vector>' (or there is no acceptable conversion)

C:/data/msvc/14.36.32530-Pre/include\cstddef(43): note: could be 'std::byte std::operator |(const std::byte,const std::byte) noexcept' [found using argument-dependent lookup]

GCC reports something similar.

@vinesworth
Copy link
Author

Might be related: https://stackoverflow.com/questions/69854503/why-do-i-need-to-evaluate-range-v3-views-to-be-able-to-use-them-with-concat

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