mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:58:09 +08:00
doc: add description about ordered_type_config
This commit is contained in:
@@ -82,6 +82,17 @@ Using this, `toml::ordered_value` is defined, along with aliases for its array a
|
||||
|
||||
You can use `toml::ordered_value` by calling `toml::parse(...)` as `toml::parse<toml::ordered_type_config>(...)`.
|
||||
|
||||
```cpp
|
||||
#include <toml.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
toml::ordered_value input = toml::parse<toml::ordered_type_config>("example.toml");
|
||||
std::cout << toml::format(input) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
## Not Preserving Comments
|
||||
|
||||
The `type_config` defines a container for storing comments via `comment_type`.
|
||||
|
@@ -101,6 +101,17 @@ parse_float(const std::string& str, const source_location src, const bool is_hex
|
||||
`toml::parse(...)` を `toml::parse<toml::ordered_type_config>(...)` として呼び出すことで、
|
||||
`toml::ordered_value` を使用することができます。
|
||||
|
||||
```cpp
|
||||
#include <toml.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
toml::ordered_value input = toml::parse<toml::ordered_type_config>("example.toml");
|
||||
std::cout << toml::format(input) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
## コメントを保存しない
|
||||
|
||||
`type_config` は `comment_type` でコメントを保存するコンテナを定義しています。
|
||||
|
Reference in New Issue
Block a user