mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 10:28:09 +08:00
@@ -119,6 +119,9 @@ const std::string fname("sample.toml");
|
|||||||
const toml::value data = toml::parse(fname);
|
const toml::value data = toml::parse(fname);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
As required by the TOML specification, the top-level value is always a table.
|
||||||
|
You can find a value inside it, cast it into a table explicitly, and insert it as a value into other `toml::value`.
|
||||||
|
|
||||||
If it encounters an error while opening a file, it will throw `std::runtime_error`.
|
If it encounters an error while opening a file, it will throw `std::runtime_error`.
|
||||||
|
|
||||||
You can also pass a `std::istream` to the `toml::parse` function.
|
You can also pass a `std::istream` to the `toml::parse` function.
|
||||||
|
Reference in New Issue
Block a user