Hi All,
I'm writing a factory class, and was wondering if it is possible to get the address of a constructor, without having an object. I'd like to do something like follows:
The specific classes inherit from the Generic class. This sort of thing is no problem with member functions...if you have an object, but is there a way to do this with a constructor for a class with no instantiated object?
Basically, I'd like to get away from a long if/else clause in "makeObject".
Constructors are not "real" functions, and therefore the C++ standard explicitly disallows you from trying to take the address of a constructor either with or without an instance.