update README

This commit is contained in:
ado 2022-03-28 19:45:00 +02:00
parent 5cada3b45a
commit bd8a134987

View File

@ -342,6 +342,10 @@ using student = std::tuple<std::string, void, float>;
auto [name, grade] = p.get_next<student>(); auto [name, grade] = p.get_next<student>();
``` ```
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. 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<std::string_view, int, float>();
```
To ignore a whole row, **ignore_next** could be used, returns **false** if **eof**: To ignore a whole row, **ignore_next** could be used, returns **false** if **eof**:
```cpp ```cpp