Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++ranges librarySingle-choice MCQ

Consider the pipeline below over a std::vector. How much intermediate storage does building r allocate, and when is the predicate/transform work actually executed?

auto r = v | std::views::filter([](int x){ return x % 2 == 0; }) | std::views::transform([](int x){ return x * 10; });