diff --git a/include/toml++/impl/parser.inl b/include/toml++/impl/parser.inl index 7aa9afb3..f780cd8a 100644 --- a/include/toml++/impl/parser.inl +++ b/include/toml++/impl/parser.inl @@ -3763,7 +3763,7 @@ TOML_ANON_NAMESPACE_START TOML_OVERALIGNED char file_buffer[sizeof(void*) * 1024u]; file.rdbuf()->pubsetbuf(file_buffer, sizeof(file_buffer)); #if TOML_WINDOWS - file.open(impl::widen(file_path_str), std::ifstream::in | std::ifstream::binary | std::ifstream::ate); + file.open(impl::widen(file_path_str).c_str(), std::ifstream::in | std::ifstream::binary | std::ifstream::ate); #else file.open(file_path_str, std::ifstream::in | std::ifstream::binary | std::ifstream::ate); #endif diff --git a/toml.hpp b/toml.hpp index 5e4c7f8c..7f48c7da 100644 --- a/toml.hpp +++ b/toml.hpp @@ -15772,7 +15772,7 @@ TOML_ANON_NAMESPACE_START TOML_OVERALIGNED char file_buffer[sizeof(void*) * 1024u]; file.rdbuf()->pubsetbuf(file_buffer, sizeof(file_buffer)); #if TOML_WINDOWS - file.open(impl::widen(file_path_str), std::ifstream::in | std::ifstream::binary | std::ifstream::ate); + file.open(impl::widen(file_path_str).c_str(), std::ifstream::in | std::ifstream::binary | std::ifstream::ate); #else file.open(file_path_str, std::ifstream::in | std::ifstream::binary | std::ifstream::ate); #endif