The way char vs wchar_t strings are handled on Windows makes hard to write portable code. Currently, if UNICODE is defined the API is wide and if not it is narrow. On POSIX it is always narrow.
The only way to write portable code with this API is to use the preprocessor to select completely separate implementations based on #ifdef UNICODE.
Instead both narrow and wide versions should always be defined and it is up to the caller which they use.
The problem did not exist in previous versions of Boost.Process.
The way
charvswchar_tstrings are handled on Windows makes hard to write portable code. Currently, ifUNICODEis defined the API is wide and if not it is narrow. On POSIX it is always narrow.The only way to write portable code with this API is to use the preprocessor to select completely separate implementations based on
#ifdef UNICODE.Instead both narrow and wide versions should always be defined and it is up to the caller which they use.
The problem did not exist in previous versions of Boost.Process.