Boost using MS Visual Studio 2010 - C2027

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?Feedba... 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.

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?Feedba...
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.

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@pdimov.com>
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?Feedba...
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

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. :-)

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@pdimov.com>
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

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@googlemail.com>
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@pdimov.com>
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

On Tue, Nov 3, 2009 at 11:33 AM, Christofer Weßeling < c.wesseling@googlemail.com> 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)?

yes, Beta2 2009/11/3 Zachary Turner <divisortheory@gmail.com>
On Tue, Nov 3, 2009 at 11:33 AM, Christofer Weßeling < c.wesseling@googlemail.com> 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
participants (3)
-
Christofer Weßeling
-
Peter Dimov
-
Zachary Turner