How to create map of pointers to static member functions in C++11?
问题 I want to create a class that contains some static member functions and a map with pointers to these functions. They can, however, take different numbers and types of arguments. So following this thread I tried something like: class BeliefCondFunc { static std::unordered_map<std::string, std::function<bool()>> FuncMap; static bool Greater(int A, int B) { return A > B; } static bool Between(float A, float B, float C) { return A > B && A < C; } static void InitMap() { FunctionMap["Greater"] =