From 37aa2739a51fe45e24d303fc38569bad0126f58c Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Tue, 23 Apr 2019 23:27:53 +0900 Subject: [PATCH] chore: add description about string_view to README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 0097f9b..2f7701b 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,12 @@ See also [underlying types](#underlying-types). NOTE: To enable to get a reference, conversions between Float and Integer are not supported. +After C++17, you can use `std::string_view` to get a string from a `toml::value`. + +```cpp +const auto sv = toml::get(tab.at("key")); +``` + ### In the case of type error If you pass an invalid type to `toml::get`, `toml::type_error` will be thrown.