From 698285d9b2f3f6756fcdab8b93f60352325764e1 Mon Sep 17 00:00:00 2001 From: Claude Heiland-Allen Date: Tue, 20 Dec 2022 11:11:30 +0000 Subject: [PATCH] fix build with mingw g++ 10 (#183) Fixes https://github.com/marzer/tomlplusplus/issues/182 --- include/toml++/impl/parser.inl | 2 +- toml.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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