I\'m currently trying to implement a factory as a singleton. I practically used the textbook example of the Singleton pattern. Here\'s the .h file:
namespace
You must define the static instance, not just declare it. The definition creates the actual object you refer to.
In your cpp file, add the line:
cpp
boost::shared_ptr ImpFactory::mInstance;