Internal typedefs in C++ – good style or bad style?
Something I have found myself doing often lately is declaring typedefs relevant to a particular class inside that class, i.e. class Lorem { typedef boost::shared_ptr<Lorem> ptr; typedef std::vector<Lorem::ptr> vector; // // … // }; These types are then used elsewhere in the code: Lorem::vector lorems; Lorem::ptr lorem( new Lorem() ); lorems.push_back( lorem ); Reasons I … Read more