diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2019-12-29 13:56:50 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2019-12-29 13:56:50 +0300 |
commit | 95df9d976cd266762f7c587ce32f496cc4350597 (patch) | |
tree | db1ea8acf3f2478495ba99747ddc3096e48cb9fb /test | |
parent | ead062146b2e0777b8da33cf3651bce7930afccf (diff) |
Merge parts of #45 and #47 to implement UNICODE agnosticism on Windows. Thanks to Nico Rieck for the inspiration and motivation.
Diffstat (limited to 'test')
-rw-r--r-- | test/tests/shared_fs_mutex.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/tests/shared_fs_mutex.cpp b/test/tests/shared_fs_mutex.cpp index 60145f58..e268427d 100644 --- a/test/tests/shared_fs_mutex.cpp +++ b/test/tests/shared_fs_mutex.cpp @@ -148,14 +148,8 @@ struct child_workers template <class... Args> child_workers(std::string name, size_t workersno, Args &&... _args) { -#ifdef _UNICODE - std::wstringstream ss1, ss2, ss3; - std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> utf16conv; - auto convstr = [&](const std::string &v) { return utf16conv.from_bytes(v); }; -#else - std::stringstream ss1, ss2, ss3; - auto convstr = [](const std::string &v) { return v; }; -#endif + std::basic_stringstream<filesystem::path::value_type> ss1, ss2, ss3; + auto convstr = [](const std::string &v) { return filesystem::path(v).native(); }; ss1 << "--kerneltestchild," << convstr(name) << ","; ss3 << ","; detail::print_args(ss3, std::forward<Args>(_args)...); |