|
Boost Users : |
Subject: Re: [Boost-users] boost::filesystem::native
From: Fernando Gomes da Silva (fernandogs1989_at_[hidden])
Date: 2016-11-10 17:25:37
i did another test here, like this:
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("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::cout << boost::filesystem::native("//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("c/PATH") << std::endl;std::cout <<
boost::filesystem::native("c//PATH") << std::endl;*
No, in VS2015 - 32bits. Build Success.
2016-11-10 20:19 GMT-02:00 Gavin Lambert <gavinl_at_[hidden]>:
> On 11/11/2016 10:40, Christopher J. Pisz wrote:
>
>> On 11/10/2016 2:19 PM, Fernando Gomes da Silva wrote:
>>
>>> 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("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::cout << boost::filesystem::native("//PATH") << std::endl;
>>>
>>
>> 0
>> 0
>> 0
>> 0
>> 1
>> 0
>> 0
>> 0
>>
>> Not at all the expected results.
>>
>
> 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?
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net