While striving for const-correctness, I often find myself writing code such as this
class Bar; class Foo { public: const Bar* bar() const { /* code that gets
FYI - The code posted by the OP is the preferred method given in Scott Meyers' "Effective C++ - Third Edition". See Item #3.