mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-23 04:40:06 +00:00
permit tie with non-match types in from_toml
This commit is contained in:
parent
a198a5f103
commit
8a98ce8e35
@ -121,6 +121,9 @@ toml::from_toml(std::tie(i, d, s, a), data.at("something"));
|
||||
|
||||
Here, only matched value will be filled.
|
||||
The others are left intact after calling `from_toml`.
|
||||
It should be noted that `toml::from_toml` _returns as usual even if there are no
|
||||
matched type_.
|
||||
|
||||
|
||||
`from_toml` can be used also for single type.
|
||||
|
||||
|
@ -100,7 +100,7 @@ struct from_toml_tie_impl<0, Ts...>
|
||||
{
|
||||
static void invoke(std::tuple<Ts& ...> tie, const toml::value& v)
|
||||
{
|
||||
throw type_error("from_toml(tie, value): no match");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user