Range-v3's zip function works with temporaries coming from other Range-v3's functions but not with others
问题 (This is kind of a follow up to this other question.) Original question The following code works just fine #include <boost/range/adaptor/transformed.hpp> #include <cmath> #include <range/v3/view/zip.hpp> #include <string> #include <vector> int main() { auto vec1 = std::vector<int>{1,2,3}; auto vec2 = std::vector<std::string>{"uno","due","tre"}; auto sqrt = [](auto x){ return std::sqrt(x); }; auto vec3 = vec1 | boost::adaptors::transformed(sqrt); for (auto const& i : ranges::views::zip(vec1,