lundi 9 mars 2015

Calling methods of different signatures by name

I have a collection of delegates using std::function that point to functions with different signatures. I want to be able to retrieve those delegates at run time using string keys. I can't seem to use a map because they point to functions with different signatures. Can I have such functionality without a switch statement?


For example, a real world use case is an RPC system. Do they really just make the methods have the same signature or use code generation?


Aucun commentaire:

Enregistrer un commentaire