doc: add description about ordered_type_config

This commit is contained in:
ToruNiina
2024-08-10 02:10:54 +09:00
parent fcb1d3d7e5
commit 9b914db23d
4 changed files with 48 additions and 4 deletions

View File

@@ -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`.

View File

@@ -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` でコメントを保存するコンテナを定義しています。