mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
fix: update README
This commit is contained in:
11
README.md
11
README.md
@@ -46,6 +46,7 @@ int main()
|
|||||||
- [Integration](#integration)
|
- [Integration](#integration)
|
||||||
- [Decoding a toml file](#decoding-a-toml-file)
|
- [Decoding a toml file](#decoding-a-toml-file)
|
||||||
- [In the case of syntax error](#in-the-case-of-syntax-error)
|
- [In the case of syntax error](#in-the-case-of-syntax-error)
|
||||||
|
- [Invalid UTF-8 Codepoints](#invalid-utf-8-codepoints)
|
||||||
- [Finding a toml value](#getting-a-toml-value)
|
- [Finding a toml value](#getting-a-toml-value)
|
||||||
- [In the case of type error](#in-the-case-of-type-error)
|
- [In the case of type error](#in-the-case-of-type-error)
|
||||||
- [Dotted keys](#dotted-keys)
|
- [Dotted keys](#dotted-keys)
|
||||||
@@ -65,7 +66,6 @@ int main()
|
|||||||
- [Customizing containers](#customizing-containers)
|
- [Customizing containers](#customizing-containers)
|
||||||
- [TOML literal](#toml-literal)
|
- [TOML literal](#toml-literal)
|
||||||
- [Conversion between toml value and arbitrary types](#conversion-between-toml-value-and-arbitrary-types)
|
- [Conversion between toml value and arbitrary types](#conversion-between-toml-value-and-arbitrary-types)
|
||||||
- [Invalid UTF-8 Codepoints](#invalid-utf-8-codepoints)
|
|
||||||
- [Formatting user-defined error messages](#formatting-user-defined-error-messages)
|
- [Formatting user-defined error messages](#formatting-user-defined-error-messages)
|
||||||
- [Getting comments related to a value](#getting-comments)
|
- [Getting comments related to a value](#getting-comments)
|
||||||
- [Serializing TOML data](#serializing-toml-data)
|
- [Serializing TOML data](#serializing-toml-data)
|
||||||
@@ -801,8 +801,9 @@ You can also append comments. The interfaces are the same as `std::vector<std::s
|
|||||||
v.comments().push_back(" add new comment.");
|
v.comments().push_back(" add new comment.");
|
||||||
```
|
```
|
||||||
|
|
||||||
When `toml::discard_comments` is chosen, `value::comments()` will always be kept
|
When `toml::discard_comments` is chosen, comments will not be contained in a value.
|
||||||
empty. All the modification on comments would be ignored.
|
`value::comments()` will always be kept empty.
|
||||||
|
All the modification on comments would be ignored.
|
||||||
|
|
||||||
The comments will also be serialized. If comments exist, those comments will be
|
The comments will also be serialized. If comments exist, those comments will be
|
||||||
added just before the values.
|
added just before the values.
|
||||||
@@ -1035,8 +1036,8 @@ ext::foo f{42, 3.14, "foobar"};
|
|||||||
toml::value v(f);
|
toml::value v(f);
|
||||||
```
|
```
|
||||||
|
|
||||||
Any type that can be converted to `toml::value`, e.g. `toml::table`, `toml::array`,
|
Any type that can be converted to `toml::value`, e.g. `int`, `toml::table` and
|
||||||
is okay to return from `into_toml`.
|
`toml::array` are okay to return from `into_toml`.
|
||||||
|
|
||||||
## Formatting user-defined error messages
|
## Formatting user-defined error messages
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user