mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-12 15:50:07 +00:00
refactor: remove unsupported overload
expect<T>(table, ...)
This commit is contained in:
parent
1409114c96
commit
483a39beb4
17
toml/get.hpp
17
toml/get.hpp
@ -923,21 +923,6 @@ expect(const basic_value<C, M, V>& v, const toml::key& k) noexcept
|
||||
return err(e.what());
|
||||
}
|
||||
}
|
||||
template<typename T, typename Table>
|
||||
detail::enable_if_t<detail::conjunction<
|
||||
detail::is_map<Table>, detail::is_basic_value<typename Table::mapped_type>
|
||||
>::value, result<T, std::string>>
|
||||
expect(const Table& t, const toml::key& k,
|
||||
std::string tablename = "unknown table") noexcept
|
||||
{
|
||||
try
|
||||
{
|
||||
return ok(find<T>(t, k, std::move(tablename)));
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
return err(e.what());
|
||||
}
|
||||
}
|
||||
|
||||
} // toml
|
||||
#endif// TOML11_GET
|
||||
|
Loading…
Reference in New Issue
Block a user