You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please adjust your Boost implementation to properly support Windows paths?
main.cpp: In function 'int main(int, const char**)':
main.cpp:353:104: error: cannot convert 'const value_type* {aka const wchar_t*}' to 'const char*'for argument '1' to 'void PerFileWrapper(const char*, const ECTOptions&)'for(unsigned i = 0; i < paths.size(); i++){PerFileWrapper(paths[i].c_str(), Options);}
^
main.cpp:359:65: error: cannot convert 'const value_type* {aka const wchar_t*}' to 'const char*'for argument '1' to 'void PerFileWrapper(const char*, const ECTOptions&)'PerFileWrapper(paths[i].c_str(), Options);}
^
As defined by Boost:
classBOOST_FILESYSTEM_DECL path
{
public:// value_type is the character type used by the operating system API to// represent paths.
# ifdef BOOST_WINDOWS_API
typedefwchar_t value_type;
BOOST_STATIC_CONSTEXPR value_type preferred_separator = L'\\';
# elsetypedefchar value_type;
BOOST_STATIC_CONSTEXPR value_type preferred_separator = '/';
# endiftypedef std::basic_string<value_type> string_type;
typedef std::codecvt<wchar_t, char,
std::mbstate_t> codecvt_type;
Boost also defines functions for wchar conversion in the boost::filesystem::path_traits namespace that you can use for this. Thanks!
The text was updated successfully, but these errors were encountered:
Hi Felix,
Can you please adjust your Boost implementation to properly support Windows paths?
As defined by Boost:
Boost also defines functions for wchar conversion in the boost::filesystem::path_traits namespace that you can use for this. Thanks!
The text was updated successfully, but these errors were encountered: