diff --git a/README.md b/README.md index 4b97c76..7d50949 100644 --- a/README.md +++ b/README.md @@ -342,6 +342,10 @@ using student = std::tuple; auto [name, grade] = p.get_next(); ``` Values can also be converted to **std::string_view**. It is more efficient then converting values to **std::string** but one must be careful with the lifetime of it. +```cpp +// string_view name stays valid until the next line is read +auto [name, age, grade] = p.get_next(); +``` To ignore a whole row, **ignore_next** could be used, returns **false** if **eof**: ```cpp