A map of functions with variadic signatures in c++
问题 From Martin Reddy's API Design for C++ - Chapter 3 (section 3.3.3 Extensible Factory Example) I found this implementation of Factory pattern to be pretty efficient which allows a user to register callback functions (essentially constructors for the derived classes) at run time, which can eventually be called when creating an object of that type. The code is shown below, as taken from the textbook - File : rendererfactory.h class RendererFactory { public: typedef IRenderer *(*CreateCallback)()