From bd8a1349871eb43624d718b2930fb8e57c3fd6a4 Mon Sep 17 00:00:00 2001 From: ado Date: Mon, 28 Mar 2022 19:45:00 +0200 Subject: [PATCH] update README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) 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