getlines_view implementation made for learning purposes inspired by range-v3 and TartanLlama - ranges example: std::ifstream input{ "input.txt" }; for (const auto& line: input | utils::views::getlines) { std::cout << line << '\n'; }