On 11/10/2016 4:25 PM, Fernando Gomes da Silva wrote:
SNIP
That's especially weird considering that "\P" should be an invalid
escape sequence, which should give you a compiler warning/error
and/or should make "\PATH" give identical results to "\\PATH".
Unless you further escaped these before compiling it?
That is wierd. It seems to be an error on rebuild. Disregard those
results I guess. I don't know how I got it to run.
Here is another test I just tried, making this set of boost functions
and thier documentation appear even more confusing to me.
#include <iostream>
#include <sstream>
#include
// Just a garbage console application to do some manual testing.
int main()
{
std::cout << boost::filesystem::native("C://PATH") << std::endl;
std::cout << boost::filesystem::native("C:/PATH") << std::endl;
std::cout << boost::filesystem::native("C:\\PATH") << std::endl;
std::cout << boost::filesystem::native("\\PATH") << std::endl;
std::cout << boost::filesystem::native("/PATH") << std::endl;
std::cout << boost::filesystem::native("//PATH") << std::endl <<
std::endl;
std::cout << boost::filesystem::native(reinterpret_cast(L"C://PATH")) << std::endl;
std::cout << boost::filesystem::native(reinterpret_cast(L"C:/PATH")) << std::endl;
std::cout << boost::filesystem::native(reinterpret_cast(L"C:\\PATH")) << std::endl;
std::cout << boost::filesystem::native(reinterpret_cast(L"\\PATH")) << std::endl;
std::cout << boost::filesystem::native(reinterpret_cast(L"/PATH")) << std::endl;
std::cout << boost::filesystem::native(reinterpret_cast(L"//PATH")) << std::endl;
return 0;
}
0
0
0
0
0
0
1
1
1
0
0
0