fix: #229 do not move temporary object

This commit is contained in:
ToruNiina 2023-10-10 23:49:51 +09:00
parent 22d96ed921
commit dfc625f38d

View File

@ -2582,7 +2582,7 @@ basic_value<Comment, Table, Array> parse(const std::filesystem::path& fpath)
"toml::parse: Error opening file \"" + fpath.string() + "\"");
}
ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
return parse<Comment, Table, Array>(ifs, std::move(fpath.string()));
return parse<Comment, Table, Array>(ifs, fpath.string());
}
#endif // TOML11_HAS_STD_FILESYSTEM