mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 02:08:09 +08:00
Merge branch 'master' into v3
This commit is contained in:
@@ -4,8 +4,8 @@ enable_testing()
|
|||||||
project(toml11)
|
project(toml11)
|
||||||
|
|
||||||
set(toml11_VERSION_MAYOR 2)
|
set(toml11_VERSION_MAYOR 2)
|
||||||
set(toml11_VERSION_MINOR 3)
|
set(toml11_VERSION_MINOR 4)
|
||||||
set(toml11_VERSION_PATCH 1)
|
set(toml11_VERSION_PATCH 0)
|
||||||
set(toml11_VERSION
|
set(toml11_VERSION
|
||||||
"${toml11_VERSION_MAYOR}.${toml11_VERSION_MINOR}.${toml11_VERSION_PATCH}"
|
"${toml11_VERSION_MAYOR}.${toml11_VERSION_MINOR}.${toml11_VERSION_PATCH}"
|
||||||
)
|
)
|
||||||
|
@@ -704,6 +704,10 @@ toml::integer opt = 42;
|
|||||||
toml::integer& i = toml::get_or(v, opt); // this works.
|
toml::integer& i = toml::get_or(v, opt); // this works.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
There is also a function `find_or`, but there is a known issue around overload
|
||||||
|
resolution. To use it, passing a `toml::value`, not a `toml::table`, is strongly
|
||||||
|
recommended.
|
||||||
|
|
||||||
## Expecting conversion
|
## Expecting conversion
|
||||||
|
|
||||||
By using `toml::expect`, you will get your expected value or an error message
|
By using `toml::expect`, you will get your expected value or an error message
|
||||||
|
Reference in New Issue
Block a user