boost signals, boost bind, visit_each + gcc 4.1 = broken ?

All, I encountered a problem using boost signals, with gcc 4.1.1 although all is fine using gcc 3.4.4. I am using boost 1.33.1. I get an error which terminates with: /usr/include/boost/bind.hpp: In function 'void boost::visit_each(V&, const boost::_bi::value<T>&, int) [with V = boost::signals::detail::bound_objects_visitor, T = AlignmentWidget*]': /usr/include/boost/bind.hpp:239: instantiated from 'void boost::_bi::list1<A1>::accept(V&) const [with V = boost::signals::detail::bound_objects_visitor, A1 = boost::_bi::value<AlignmentWidget*>]' /usr/include/boost/bind/bind_template.hpp:150: instantiated from 'void boost::_bi::bind_t<R, F, L>::accept(V&) const [with V = boost::signals::detail::bound_objects_visitor, R = void, F = boost::_mfi::mf0<void, AlignmentWidget>, L = boost::_bi::list1<boost::_bi::value<AlignmentWidget*> >]' /usr/include/boost/bind.hpp:1213: instantiated from 'void boost::visit_each(V&, const boost::_bi::bind_t<R, F, L>&, int) [with V = boost::signals::detail::bound_objects_visitor, R = void, F = boost::_mfi::mf0<void, AlignmentWidget>, L = boost::_bi::list1<boost::_bi::value<AlignmentWidget*> >]' /usr/include/boost/visit_each.hpp:25: instantiated from 'void boost::visit_each(Visitor&, const T&) [with Visitor = boost::signals::detail::bound_objects_visitor, T = boost::_bi::bind_t<void, boost::_mfi::mf0<void, AlignmentWidget>, boost::_bi::list1<boost::_bi::value<AlignmentWidget*> > >]' /usr/include/boost/signals/slot.hpp:121: instantiated from 'boost::slot<SlotFunction>::slot(const F&) [with F = boost::_bi::bind_t<void, boost::_mfi::mf0<void, AlignmentWidget>, boost::_bi::list1<boost::_bi::value<AlignmentWidget*> > >, SlotFunction = boost::function0<void, std::allocator<boost::function_base> >]' /usr/local/include/WSignal:603: instantiated from 'boost::signals::connection Wt::EventSignal<void>::connect(T*, void (T::*)()) [with T = AlignmentWidget]' /home/kdforc0/project/c++/sequencetool/src/web/AlignmentWidget.C:59: instantiated from here /usr/include/boost/bind.hpp:1208: error: no matching function for call to 'visit_each(boost::signals::detail::bound_objects_visitor&, AlignmentWidget* const&, int)' Since AlignmentWidget inherits indirectly from boost::signals::trackable, this specialisation should really exist ? Is this is a bug in gcc 4.1.1 or with boost ? Is there a workaround for making it work with gcc 4.1.1 ? Regards, koen

Koen Deforche wrote:
All,
I encountered a problem using boost signals, with gcc 4.1.1 although all is fine using gcc 3.4.4. I am using boost 1.33.1.
I get an error which terminates with:
/usr/include/boost/bind.hpp: In function 'void boost::visit_each(V&,
[...] The current version of bind.hpp contains several visit_each-related fixes. Unfortunately, I can't point you to a drop-in replacement of bind.hpp since these fixes have been interleaved with other work. But the following patches may be of interest to you: http://boost.cvs.sourceforge.net/boost/boost/boost/bind.hpp?r1=1.53&r2=1.54 http://boost.cvs.sourceforge.net/boost/boost/boost/bind.hpp?r1=1.55&r2=1.56 You can also try upgrading to the 1.34 RC version, available from http://engineering.meta-comm.com/boost.aspx
participants (2)
-
Koen Deforche
-
Peter Dimov