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
#include
#include "dlg.hh" // includes
Dlg::Dlg()
{
boost::signal 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]'
.../boost-1.33.1/include/boost-1_33_1/boost/bind/bind_template.hpp:150:
instantiated from 'void boost::_bi::bind_t::accept(V&) const [with V =
boost::signals::detail::bound_objects_visitor, R = void, F =
boost::_mfi::mf0, L = boost::_bi::list1 >]'
.../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&, int) [with V =
boost::signals::detail::bound_objects_visitor, R = void, F =
boost::_mfi::mf0, L = boost::_bi::list1 >]'
.../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, boost::_bi::list1 > >]'
.../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,
boost::_bi::list1 > >, SlotFunction =
boost::function]'
.../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