class Foo { public: /* * Modifies m_widget and the user * may modify the returned widget. */ Widget *widget(); /* * Does not modify m_widget but the * user may modify the returned widget. */ Widget *widget() const; /* * Modifies m_widget, but the user * may not modify the returned widget. */ const Widget *cWidget(); /* * Does not modify m_widget and the user * may not modify the returned widget. */ const Widget *cWidget() const; private: Widget *m_widget; }