0

Is there a way to store functions of different types and signatures in one container in C++?

I want to implement some "per function" property that will be set in runtime so I will be able to set some property for function foo() if I call some API: set_function_property(foo, PROPERTY_ENUM);

For that purposes I was thinking to store all these functions in the same container but didn't find a way to do it.

I tried using templates but std::vector allows only elements of the same type, and I can't add functions of different types to it

0 Answers0