I've just started working on a new codebase where each class contains a shared_ptr typedef (similar to this) like:
typedef boost::shared_ptr<MyClass> Ptr;
Is the only purpose to save typing boost::shared_ptr?
If that is the case, is the only reason not to do
#define Ptr boost::shared_ptr
in one common header the general problems with #define? Then you can do:
Ptr<MyClass> myClass(new MyClass);
which is no more typing than
MyClass::Ptr myClass(new MyClass);
and saves the Ptr definition in each class.