In a C++ project that uses smart pointers, such as boost::shared_ptr, what is a good design philosophy regarding use of \"this\"?<
boost::shared_ptr
this
One example of correct use is return *this; in functions like operator++() and operator<<().
return *this;
If you need to use this, just use it explicitly. Smart pointers wrap only pointers of the objects they own - either exclusivelly (unique_ptr) or in a shared manner (shared_ptr).
unique_ptr
shared_ptr