Sometimes I need to expose some of the class members. For example in the following example class Mechanic may need direct access to Engine componen
class Mechanic
Engine
They can be useful when the value you are returning is actually on the heap.
template class Singleton { private: static T* m_pSingleton; public: T& getSingleton() { assert(m_pSingleton); return(*m_pSingleton); }; }; // eo class Singleton