Modernes C++ programmieren

Okt 23, 2024

lst-0820-book.cpp

// https://godbolt.org/z/rrq1v5qPs 
std::list lst{1, 2, 3, 4, 5, 6, 7, 8, 9};
auto take5 = rs::take_view{lst, 5};     // View via Typ
auto take6 = lst | vs::take(6);         // View via Adapter