Store Function Pointers to any Member Function
问题 My Event Manager For a event manager I need to store many pointers to functions in a vector to call them when the event is triggered. (I will provide the source code of the EventFunction helper class at the end of this question.) // an event is defined by a string name and a number typedef pair<string, int> EventKey; // EventFunction holds a pointer to a listener function with or without data parameter typedef unordered_map<EventKey, vector<EventFunction>> ListEvent; // stores all events and