if (!boost::filesystem::native(test4))
{
std::cout << "Boost says the following path is not valid for the native operating system: " << test4 << std::endl;

}

return 0;
}

The Test's Output:

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?

const char invalid_chars[] =
"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"
"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"
"<>:\"/\\|";
// note that the terminating '\0' is part of the string - thus the size below
// is sizeof(invalid_chars) rather than sizeof(invalid_chars)-1. I
const std::string windows_invalid_chars(invalid_chars, sizeof(invalid_chars));

The string does not begin with a . UNLESS the whole string is either "." or "..".

Otherwise the requirements are:

String is not empty.

String does not begin with a space.

String does not contain /.

Since the path separator is forbidden in both scenarios, we can conclude that this function is only intended to validate the individual components of the path (i.e. directory names, file names), not the full path.