Boost using MS Visual Studio 2010 - C2027

View: New views
8 Messages — Rating Filter:   Alert me  

Parent Message unknown Boost using MS Visual Studio 2010 - C2027

by Christofer Weßeling :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

I've tried to build Boost using MS Visual Studio 2010, but I'm getting a
C2027 error. Basically the problem is known and located as a problem of the
MS compiler:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321192

Is there still a workaround?

Greets!

Christofer


Here comes the error....:

1>c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1657): warning C4180:
qualifier applied to function type has no meaning; ignored
 1>          c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1691) : see
reference to class template instantiation 'boost::_bi::add_cref<Pm,I>' being
compiled
1>          with
1>          [
1>              Pm=FileTime<UTC> (__thiscall File::* )(void),
1>              I=1
1>          ]
1>
 c:\projekte\ps3controlmodule\productformattingasd\fileadmin.cpp(346) : see
reference to class template instantiation 'boost::_bi::dm_result<Pm,A1>'
being compiled
1>          with
1>          [
1>              Pm=FileTime<UTC> (__thiscall File::* )(void),
1>              A1=boost::arg<1>
1>          ]
1>c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1691): error C2027: use of
undefined type 'boost::_bi::add_cref<Pm,I>'
1>          with
1>          [
1>              Pm=FileTime<UTC> (File::* )(void),
1>              I=1
1>          ]
1>
 c:\projekte\ps3controlmodule\productformattingasd\fileadmin.cpp(347) : see
reference to class template instantiation 'boost::_bi::dm_result<Pm,A1>'
being compiled
1>          with
1>          [
1>              Pm=FileTime<UTC> (__thiscall File::* )(void),
1>              A1=boost::arg<2>
1>          ]
1>
1>Build FAILED.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: Boost using MS Visual Studio 2010 - C2027

by Peter Dimov-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christofer Weßeling wrote:
> Hi!
>
> I've tried to build Boost using MS Visual Studio 2010, but I'm
> getting a C2027 error. Basically the problem is known and located as
> a problem of the MS compiler:
> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321192

This is not the same issue. The code in the bug report is incorrect (it
passes one argument to &CTest::is_A instead of two). Your code seems
correct. You might consider submitting a separate bug report against MSVC
2010.

> Is there still a workaround?

One option is to use MSVC2010's own std::bind; another is to wrap the member
function in mem_fn.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: Boost using MS Visual Studio 2010 - C2027

by Christofer Weßeling :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi!

ok.. - "wrap the member function in mem_fn. " can you give me some dummy
code how to do that, or another hint...
wrapping in case of packing it into another namespace or {..} ?



2009/11/3 Peter Dimov <pdimov@...>

> Christofer Weßeling wrote:
>
>> Hi!
>>
>> I've tried to build Boost using MS Visual Studio 2010, but I'm
>> getting a C2027 error. Basically the problem is known and located as
>> a problem of the MS compiler:
>>
>> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321192
>>
>
> This is not the same issue. The code in the bug report is incorrect (it
> passes one argument to &CTest::is_A instead of two). Your code seems
> correct. You might consider submitting a separate bug report against MSVC
> 2010.
>
>
>  Is there still a workaround?
>>
>
> One option is to use MSVC2010's own std::bind; another is to wrap the
> member function in mem_fn.
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: Boost using MS Visual Studio 2010 - C2027

by Peter Dimov-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christofer Weßeling wrote:
> hi!
>
> ok.. - "wrap the member function in mem_fn. " can you give me some
> dummy
> code how to do that, or another hint...
> wrapping in case of packing it into another namespace or {..} ?

You now have boost::bind( &File::get_file_time, _2 ), right? Change it to

    boost::bind( boost::mem_fn( &File::get_file_time ), _2 )

and see if it helps. I hope it does. :-)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: Boost using MS Visual Studio 2010 - C2027

by Zachary Turner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 11:33 AM, Christofer Weßeling <
c.wesseling@...> wrote:

> Hi!
>
> I've tried to build Boost using MS Visual Studio 2010, but I'm getting a
> C2027 error. Basically the problem is known and located as a problem of the
> MS compiler:
>
>
Are you sure using Beta 2 (only released a few days ago)?
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: Boost using MS Visual Studio 2010 - C2027

by Christofer Weßeling :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yes, Beta2

2009/11/3 Zachary Turner <divisortheory@...>

> On Tue, Nov 3, 2009 at 11:33 AM, Christofer Weßeling <
> c.wesseling@...> wrote:
>
> > Hi!
> >
> > I've tried to build Boost using MS Visual Studio 2010, but I'm getting a
> > C2027 error. Basically the problem is known and located as a problem of
> the
> > MS compiler:
> >
> >
> Are you sure using Beta 2 (only released a few days ago)?
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: Boost using MS Visual Studio 2010 - C2027

by Christofer Weßeling :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Peter,

it help for some of the errors, but one is still there:

bind.hpp(1691): error C2027: use of undefined type
'boost::_bi::add_cref<Pm,I>'

------------------
>c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1657): warning C4180:
qualifier applied to function type has no meaning; ignored
2>          c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1691) : see
reference to class template instantiation 'boost::_bi::add_cref<Pm,I>' being
compiled
2>          with
2>          [
2>              Pm=FileTime<UTC> (__thiscall File::* )(void),
2>              I=1
2>          ]
2>
 c:\projekte\ps3controlmodule\productformattingasd\fileadmin.cpp(399) : see
reference to class template instantiation 'boost::_bi::dm_result<Pm,A1>'
being compiled
2>          with
2>          [
2>              Pm=FileTime<UTC> (__thiscall File::* )(void),
2>              A1=boost::arg<1>
2>          ]
2>c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1691): error C2027: use of
undefined type 'boost::_bi::add_cref<Pm,I>'
2>          with
2>          [
2>              Pm=FileTime<UTC> (File::* )(void),
2>              I=1
2>          ]
2>
 c:\projekte\ps3controlmodule\productformattingasd\fileadmin.cpp(402) : see
reference to class template instantiation 'boost::_bi::dm_result<Pm,A1>'
being compiled
2>          with
2>          [
2>              Pm=FileTime<UTC> (__thiscall File::* )(void),
2>              A1=boost::arg<2>
2>          ]
2>
2>Build FAILED.




2009/11/3 Peter Dimov <pdimov@...>

> Christofer Weßeling wrote:
>
>> hi!
>>
>> ok.. - "wrap the member function in mem_fn. " can you give me some
>> dummy
>> code how to do that, or another hint...
>> wrapping in case of packing it into another namespace or {..} ?
>>
>
> You now have boost::bind( &File::get_file_time, _2 ), right? Change it to
>
>   boost::bind( boost::mem_fn( &File::get_file_time ), _2 )
>
> and see if it helps. I hope it does. :-)
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: Boost using MS Visual Studio 2010 - C2027

by Christofer Weßeling :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ok, sorry! just putting some more "boost::mem_fn(" in the code already
helps... - sorry for the question!


2009/11/4 Christofer Weßeling <c.wesseling@...>

> Hi Peter,
>
> it help for some of the errors, but one is still there:
>
> bind.hpp(1691): error C2027: use of undefined type
> 'boost::_bi::add_cref<Pm,I>'
>
> ------------------
> >c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1657): warning C4180:
> qualifier applied to function type has no meaning; ignored
> 2>          c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1691) : see
> reference to class template instantiation 'boost::_bi::add_cref<Pm,I>' being
> compiled
> 2>          with
> 2>          [
> 2>              Pm=FileTime<UTC> (__thiscall File::* )(void),
> 2>              I=1
> 2>          ]
> 2>
>  c:\projekte\ps3controlmodule\productformattingasd\fileadmin.cpp(399) : see
> reference to class template instantiation 'boost::_bi::dm_result<Pm,A1>'
> being compiled
>  2>          with
> 2>          [
> 2>              Pm=FileTime<UTC> (__thiscall File::* )(void),
> 2>              A1=boost::arg<1>
> 2>          ]
>  2>c:\projekte\boost\1.40.0\boost\bind\bind.hpp(1691): error C2027: use of
> undefined type 'boost::_bi::add_cref<Pm,I>'
> 2>          with
> 2>          [
> 2>              Pm=FileTime<UTC> (File::* )(void),
> 2>              I=1
> 2>          ]
> 2>
>  c:\projekte\ps3controlmodule\productformattingasd\fileadmin.cpp(402) : see
> reference to class template instantiation 'boost::_bi::dm_result<Pm,A1>'
> being compiled
>  2>          with
> 2>          [
> 2>              Pm=FileTime<UTC> (__thiscall File::* )(void),
> 2>              A1=boost::arg<2>
> 2>          ]
>  2>
> 2>Build FAILED.
>
>
>
>
> 2009/11/3 Peter Dimov <pdimov@...>
>
>> Christofer Weßeling wrote:
>>
>>  hi!
>>>
>>> ok.. - "wrap the member function in mem_fn. " can you give me some
>>> dummy
>>> code how to do that, or another hint...
>>> wrapping in case of packing it into another namespace or {..} ?
>>>
>>
>> You now have boost::bind( &File::get_file_time, _2 ), right? Change it to
>>
>>   boost::bind( boost::mem_fn( &File::get_file_time ), _2 )
>>
>> and see if it helps. I hope it does. :-)
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost
>>
>
>
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost