Boost logo

Boost Users :

From: Grant Patterson (grantp_at_[hidden])
Date: 2008-04-25 21:41:20


Sorry, This seems to have been because I was using 1.33.1, which I should have
mentioned. I've got 1.34.1 and that seems to work fine.

Grant Patterson wrote:
> Hi Folks,
>
> I'm just getting started with Boost signals (actually moving from sigc++
> signals) and I'm having trouble with something that seems rather simple:
>
> #include <boost/bind.hpp>
> #include <boost/signals/slot.hpp>
>
> #include "dlg.hh" // includes <boost/signal.hpp>
>
> Dlg::Dlg()
> {
> boost::signal<void()> login;
> login.connect(boost::bind(&Dlg::Foo, this));
> }
>
> void
> Dlg::Foo()
> {
> // stuff
> }
>
> In fact, I've found an example in LyX's source http://tinyurl.com/68secc
> that seems to do exactly what I'm doing. I get:
>
> .../boost-1.33.1/include/boost-1_33_1/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 = Dlg*]':
> .../boost-1.33.1/include/boost-1_33_1/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<Dlg*>]'
> .../boost-1.33.1/include/boost-1_33_1/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, Dlg>, L =
> boost::_bi::list1<boost::_bi::value<Dlg*> >]'
> .../boost-1.33.1/include/boost-1_33_1/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, Dlg>, L =
> boost::_bi::list1<boost::_bi::value<Dlg*> >]'
> .../boost-1.33.1/include/boost-1_33_1/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, Dlg>,
> boost::_bi::list1<boost::_bi::value<Dlg*> > >]'
> .../boost-1.33.1/include/boost-1_33_1/boost/signals/slot.hpp:121:
> instantiated from 'boost::slot<SlotFunction>::slot(const F&) [with F =
> boost::_bi::bind_t<void, boost::_mfi::mf0<void, Dlg>,
> boost::_bi::list1<boost::_bi::value<Dlg*> > >, SlotFunction =
> boost::function<void ()(), std::allocator<void> >]'
> .../source_tree/dlg.cc:92: instantiated from here
> .../boost-1.33.1/include/boost-1_33_1/boost/bind.hpp:1208: error: no
> matching function for call to
> 'visit_each(boost::signals::detail::bound_objects_visitor&, Dlg* const&,
> int)'
>
> Any idea what might be causing this? Thanks!
>
>
> grant
>
>
>


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