Boost logo

Boost Users :

Subject: [Boost-users] [function] Compiler error with Boost 1.46.1
From: Boris Schaeling (boris_at_[hidden])
Date: 2011-03-20 17:50:53


The sample program at http://en.highscore.de/cpp/boost/src/3.4.3/main.cpp
can't be compiled anymore with Boost 1.46.1 (using VC++ 2010). Is this a
known problem?

1>------ Rebuild All started: Project: Test, Configuration: Debug Win32
------
1> main.cpp
1>c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(539):
error C2668: 'boost::mem_fn' : ambiguous call to overloaded function
1> c:\boost\include\boost-1_46_1\boost\bind\mem_fn_cc.hpp(25):
could be 'boost::_mfi::mf1<R,T,A1>
boost::mem_fn<void,world,std::ostream&>(R (__thiscall world::* )(A1))'
1> with
1> [
1> R=void,
1> T=world,
1> A1=std::ostream &
1> ]
1> c:\program files (x86)\microsoft visual studio
10.0\vc\include\xxmem_fn(32): or
'std::tr1::_Mem_fn2<_Rx,_Pmf,_Arg0,_Arg1>
std::tr1::mem_fn<void,world,std::ostream&>(_Rx (__thiscall world::*
)(_Arg1))' [found using argument-dependent lookup]
1> with
1> [
1> _Rx=void,
1> _Pmf=void (__thiscall world::* )(std::ostream &),
1> _Arg0=world,
1> _Arg1=std::ostream &
1> ]
1> while trying to match the argument list '(void (__thiscall
world::* )(std::ostream &))'
1>
c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(492) :
see reference to function template instantiation 'bool
boost::detail::function::basic_vtable2<R,T0,T1>::assign_to<F>(MemberPtr,boost::detail::function::function_buffer
&,boost::detail::function::member_ptr_tag)' being compiled
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &,
1> F=void (__thiscall world::* )(std::ostream &),
1> MemberPtr=void (__thiscall world::* )(std::ostream &)
1> ]
1>
c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(915) :
see reference to function template instantiation 'bool
boost::detail::function::basic_vtable2<R,T0,T1>::assign_to<Functor>(F,boost::detail::function::function_buffer
&)' being compiled
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &,
1> Functor=void (__thiscall world::* )(std::ostream &),
1> F=void (__thiscall world::* )(std::ostream &)
1> ]
1>
c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(722) :
see reference to function template instantiation 'void
boost::function2<R,T0,T1>::assign_to<Functor>(Functor)' being compiled
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &,
1> Functor=void (__thiscall world::* )(std::ostream &)
1> ]
1>
c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(1065) :
see reference to function template instantiation
'boost::function2<R,T0,T1>::function2<void(__thiscall world::*
)(std::ostream &)>(Functor,int)' being compiled
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &,
1> Functor=void (__thiscall world::* )(std::ostream &)
1> ]
1> c:\users\boris\documents\visual studio
2010\projects\test\main.cpp(14) : see reference to function template
instantiation 'boost::function<Signature>::function<void(__thiscall
world::* )(std::ostream &)>(Functor,int)' being compiled
1> with
1> [
1> Signature=void (world *,std::ostream &),
1> Functor=void (__thiscall world::* )(std::ostream &)
1> ]
1>c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(539):
error C2780: 'bool
boost::detail::function::basic_vtable2<R,T0,T1>::assign_to(const
boost::reference_wrapper<FunctionObj>
&,boost::detail::function::function_buffer
&,boost::detail::function::function_obj_ref_tag)' : expects 3 arguments -
2 provided
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &
1> ]
1>
c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(625) :
see declaration of
'boost::detail::function::basic_vtable2<R,T0,T1>::assign_to'
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &
1> ]
1>c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(539):
error C2780: 'bool
boost::detail::function::basic_vtable2<R,T0,T1>::assign_to(FunctionObj,boost::detail::function::function_buffer
&,boost::detail::function::function_obj_tag)' : expects 3 arguments - 2
provided
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &
1> ]
1>
c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(599) :
see declaration of
'boost::detail::function::basic_vtable2<R,T0,T1>::assign_to'
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &
1> ]
1>c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(539):
error C2780: 'bool
boost::detail::function::basic_vtable2<R,T0,T1>::assign_to(MemberPtr,boost::detail::function::function_buffer
&,boost::detail::function::member_ptr_tag)' : expects 3 arguments - 2
provided
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &
1> ]
1>
c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(533) :
see declaration of
'boost::detail::function::basic_vtable2<R,T0,T1>::assign_to'
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &
1> ]
1>c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(539):
error C2780: 'bool
boost::detail::function::basic_vtable2<R,T0,T1>::assign_to(FunctionPtr,boost::detail::function::function_buffer
&,boost::detail::function::function_ptr_tag)' : expects 3 arguments - 2
provided
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &
1> ]
1>
c:\boost\include\boost-1_46_1\boost\function\function_template.hpp(511) :
see declaration of
'boost::detail::function::basic_vtable2<R,T0,T1>::assign_to'
1> with
1> [
1> R=void,
1> T0=world *,
1> T1=std::basic_ostream<char,std::char_traits<char>> &
1> ]
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Boris


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