fix: allow empty input file (to be an empty table)

This commit is contained in:
ToruNiina
2019-02-27 12:30:57 +09:00
parent 1e1e4c06e8
commit e929d2f00f

View File

@@ -1421,7 +1421,7 @@ result<table, std::string> parse_toml_file(location<Container>& loc)
const auto first = loc.iter();
if(first == loc.end())
{
return err(std::string("toml::detail::parse_toml_file: input is empty"));
return ok(toml::table{});
}
table data;