Building with clang c++17, wide chars #63
Labels
available on master
Fix is done on master branch, issue closed on next release
bug
Something isn't working
Milestone
Describe the bug
Building in Visual Studio with the wide character flag: GHC_WIN_WSTRING_STRING_TYPE
With clang 11, and c++17, I have these warnings/errors:
1>In file included from D:\filesystem\test\filesystem_test.cpp:62: 1>D:\filesystem\include\ghc/filesystem.hpp(4509,50): error : suggest braces around initialization of subobject [-Werror,-Wmissing-braces] 1>D:\filesystem\include\ghc/filesystem.hpp(4510,42): error : suggest braces around initialization of subobject [-Werror,-Wmissing-braces] 1>D:\filesystem\include\ghc/filesystem.hpp(4511,46): error : suggest braces around initialization of subobject [-Werror,-Wmissing-braces] 1>D:\filesystem\include\ghc/filesystem.hpp(1649,13): error : no matching function for call to 'toUtf8' 1>D:\filesystem\include\ghc/filesystem.hpp(2628,29): message : in instantiation of function template specialization 'ghc::filesystem::path::path<std::basic_string_view<wchar_t, std::char_traits<wchar_t> >, ghc::filesystem::path>' requested here 1>D:\filesystem\include\ghc/filesystem.hpp(1536,20): message : candidate template ignored: could not match 'basic_string' against 'basic_string_view' 1>D:\filesystem\include\ghc/filesystem.hpp(1542,20): message : candidate template ignored: could not match 'basic_string' against 'basic_string_view' 1>D:\filesystem\include\ghc/filesystem.hpp(1571,20): message : candidate template ignored: could not match 'basic_string' against 'basic_string_view' 1>D:\filesystem\include\ghc/filesystem.hpp(1581,20): message : candidate template ignored: could not match 'const charT *' against 'std::basic_string_view<wchar_t, std::char_traits<wchar_t> >'
Please find my Visual Studio project file for filesystem_test attached. (just trim the .txt extension)
Note! clang compiles with only the first three warnings with c++11 (without the actual basic_string_view error)
To create the Visual Studio solution and projects, I ran:
cmake -G "Visual Studio 15 2017 Win64"
I am working with latest on master: commit 9a047b9
To Reproduce
Compile as above
Expected behavior
Compiles, no errors. Warnings are negotiable. :)
Additional context
Thank you for creating this library. I was working with the Windows filesystem, which I found did not support path appending as expected. And I want to have standard cross-platform support.
filesystem_test.vcxproj.txt
The text was updated successfully, but these errors were encountered: