From a7b65bfc44f4af3a9d584fe9347fde0944c0167a Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:36:44 +0100 Subject: [PATCH] Fix compiling for MinGW-w64 using std::filesystem --- include/boost/process/detail/windows/basic_cmd.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/process/detail/windows/basic_cmd.hpp b/include/boost/process/detail/windows/basic_cmd.hpp index 53ea9931d..760b28ba0 100644 --- a/include/boost/process/detail/windows/basic_cmd.hpp +++ b/include/boost/process/detail/windows/basic_cmd.hpp @@ -159,8 +159,13 @@ struct exe_cmd_init : handler_base_ext return exe_cmd_init(std::move(sh), std::move(args_)); } +#ifdef BOOST_PROCESS_USE_STD_FS + static std:: string get_shell(char) {return shell(). string(); } + static std::wstring get_shell(wchar_t) {return shell().wstring(); } +#else static std:: string get_shell(char) {return shell(). string(codecvt()); } static std::wstring get_shell(wchar_t) {return shell().wstring(codecvt());} +#endif static exe_cmd_init cmd_shell(string_type&& cmd) {