A simple buffered text file iterator that returns std::optional<std::string_view>s or dereferenceable iterators with a beyond-the-end iterator for a lightweight view into a text file by line.
3x faster then std::ifstream + std::getline().
auto text_file = BufferedTextFile("/proc/self/status");
while(auto line = text_file.get_line())
std::cout << *line << std::endl;
or
for(auto line: BufferedTextFile("/proc/self/status"))
std::cout << line << std::endl;