I have this code:
namespace VE
{
template<typename Func>
using VESignal = boost::signals2::signal<Func>;
}
class NodeManager {
public:
static VE::VESignal<void(int guid)> NodeDestroyed;
}
And this code:
class Map : public VE::Nodes::VENode
{
public:
explicit Map(VE::Nodes::VEId veid);
virtual ~Map();
void Initialize() override;
void RemovePlayer(int guid);
}
Than I do this:
void Map::Initialize()
{
NodeManager::NodeDestroyed.connect(boost::bind(&Map::RemovePlayer, this, _1));
}
This however does not let me do it. Gives me error:
In template: no matching function for call to object of type 'boost::_mfi::mf1<void, Map, int>' error occurred here in instantiation of function template specialization 'boost::_bi::list2<boost::_bi::value<Map *>, boost::_bi::value<std::_Placeholder<1>>>::operator()<boost::_mfi::mf1<void, Map, int>, boost::_bi::rrlist1<int>>' requested here
Why is that and how can I fix i ?