https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95578
Bug ID: 95578 Summary: std::ranges::copy and std::views::take_while don't want to play together Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de Target Milestone: --- Hi gcc-team, the following code does not compile (10.1.0 and trunk) ```c++ #include <ranges> #include <algorithm> int main() { std::vector<int> v{}; // auto && rng = v; // does work auto && rng = v | std::views::take_while([](auto &&){return true;}); // does not work std::vector<int> rng_copy{}; std::ranges::copy(rng, std::back_inserter(rng_copy)); return 0; } ``` https://godbolt.org/z/nmRQgo