class MyObject{ public: void testFunctionMap(){ std::unordered_map<std::string, std::function<void()> > functionMap; std::pair<std::string, std::function<void()> > myPair("print", std::bind(&MyObject::printSomeText, this) ); functionMap.insert( myPair ); functionMap["print"](); } void printSomeText() { std::cout << "Printing some text"; } }; MyObject o; o.testFunctionMap(); This works fine. Is there another way to use the MyObject::printSomeText function as the value for the pair?