Error:
C:\testa\game.cpp|147|error: no matching function for call to 'game::register_handler(PacketFamily, PacketAction,
<unresolved overloaded function type>)'|
Heres part of the code since it's too big.
I had to typedef handler_callback inside class game otherwise one of the two would be undefined for the other.
game.h
class game
{
typedef bool (game::*handler_callback)(PacketReader reader);
public:
bool default_handler_init (PacketReader reader);
void register_default_handlers();
void register_handler(PacketFamily family, PacketAction action,handler_callback callback);
};
game.cpp
void game::register_default_handlers()
{
register_handler(PACKET_F_INIT, PACKET_A_INIT,default_handler_init);
}
void game::register_handler(PacketFamily family, PacketAction action,handler_callback callback)
{
handlers.insert(std::make_pair(std::make_pair(family, action), callback));
}
line 147?register_handler(PACKET_F_INIT, PACKET_A_INIT, &default_handler_init);