Boost logo

Boost Users :

Subject: Re: [Boost-users] boost 1.46.1 vs. boost 1.49.0 ?
From: JIA Pei (jp4work_at_[hidden])
Date: 2012-03-28 19:47:10


Problem solved. Change

path tempp(dir_path, native );

to

path tempp = path(dir_path );

cheers
Pei

On Wed, Mar 28, 2012 at 4:41 PM, JIA Pei <jp4work_at_[hidden]> wrote:

>
>
> It looks like there is something to do with the compiler?
> Whenever I tried to use gcc, I will get the errors like
>
> íÎ󣺴ÓÀàÐÍ¡®bool (*)(const string&) {aka bool (*)(const
> std::basic_string<char>&)}¡¯µ½ÀàÐÍ¡®boost::enable_if_c<true, void>::type*
> {aka void*}¡¯µÄת»»ÎÞЧ [-fpermissive]
> C:/boost/boost/filesystem/v3/path.hpp:131:5: ´íÎó£º
> ³õʼ»¯¡®boost::filesystem3::path::path(const Source&, typename
> boost::enable_if<boost::filesystem3::path_traits::is_pathable<typename
> boost::decay<Source>::type> >::type*) [with Source =
> std::basic_string<char>, typename
> boost::enable_if<boost::filesystem3::path_traits::is_pathable<typename
> boost::decay<Source>::type> >::type = void]¡¯µÄʵ²Î 2 [-fpermissive]
>
>
> If I'm using Visual Studio 2010, there is no error report. I just finished
> testing my code using boost 1.49.0 under Windows7.
> I was testing my code with CodeLite with GCC compiler, and Visual Studio
> 2010.
>
>
> How come this type of error report?
>
>
> Cheers
> Pei
>
>
>
> On Wed, Mar 28, 2012 at 1:04 PM, JIA Pei <jp4work_at_[hidden]> wrote:
>
>>
>> Hi, all:
>>
>> My code is as simple as:
>>
>>> path tempp(dir_path, native );
>>
>>
>> It used to work for boost 1.42. And now, it's working fine with boost
>> 1.49.0 ...
>> However, current Ubuntu 11.10 affords boost 1.46.1.
>> Whenever I tried to compile my code with boost 1.46.1, I got the
>> following errors:
>>
>> invalid conversion from ‘bool (*)(const string&) {aka bool (*)(const
>>> std::basic_string<char>&)}’ to ‘boost::enable_if_c<true, void>::type* {aka
>>> void*}’ [-fpermissive]
>>
>>
>>
>> In addition, I notice there are some other errors at the same time, which
>> seems to have something to do with filesystem3 ?
>>
>>
>> Invalid arguments '
>>> Candidates are:
>>> bool is_directory(boost::filesystem3::file_status)
>>> bool is_directory(const boost::filesystem3::path &)
>>> bool is_directory(const boost::filesystem3::path &,
>>> boost::system::error_code &)
>>> '
>>
>>
>>
>>
>> However, why my code is able to compile with boost 1.49.0 then?
>>
>>
>> Cheers
>> Pei
>>
>>
>>
>>
>> --
>>
>> Pei JIA
>>
>> Email: jp4work_at_[hidden]
>> cell: +1 604-362-5816
>>
>> Welcome to Vision Open
>> http://www.visionopen.com
>>
>
>
>
> --
>
> Pei JIA
>
> Email: jp4work_at_[hidden]
> cell: +1 604-362-5816
>
> Welcome to Vision Open
> http://www.visionopen.com
>

-- 
Pei JIA
Email: jp4work_at_[hidden]
cell:    +1 604-362-5816
Welcome to Vision Open
http://www.visionopen.com


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