On 11/11/2016 09:05, Christopher J. Pisz wrote:
Great! I say to myself. I then Google up the boost doc here: http://www.boost.org/doc/libs/1_62_0/libs/filesystem/doc/portability_guide.h... [...] Boost says the following path is not valid for the native operating system: D:\Programing Projects\Git Workspace\Common\x64\Debug Boost says the following path is not valid for the native operating system: D:Programing Projects\Git Workspace\Common\x64\Debug\ Boost says the following path is not valid for the native operating system: D:/Programing Projects/Git Workspace/Common/x64/Debug Boost says the following path is not valid for the native operating system: D:/Programing Projects/Git Workspace/Common/x64/Debug/
What is wrong with that path that it says it is not valid for my native Windows 10 operating system?
After looking at the implementation and reading the docs more carefully: Your assumptions were wrong. :) It turns out that the portability functions (native() and friends) do not check *paths* for validity, they check *path components* (eg. individual filenames). In particular the path separator characters are considered invalid. This is why "\PATH" is considered valid, because this is treated as "PATH", while "\\PATH" is not valid because the backslash is invalid in a filename. So if you wanted to use those, you'd need to wrap it in a path() first and iterate over each element to test if it is valid.