Storing objects in the array
问题 I want to save boost signals objects in the map (association: signal name → signal object). The signals signature is different, so the second type of map should be boost::any . map<string, any> mSignalAssociation; The question is how to store objects without defining type of new signal signature? typedef boost::signals2::signal<void (int KeyCode)> sigKeyPressed; mSignalAssociation.insert(make_pair("KeyPressed", sigKeyPressed())); // This is what I need: passing object without type definition