title: Does a const getter returning a modifiable reference in C++ make sense?
body: <p>is the following getter make sense?</p>
  <pre class="lang-cpp prettyprint-override"><code>MyType&amp; MyClass::getMyType() const { return mMyType; }
  </code></pre>
  <p>I don't modify <code>this</code> but I give access to someone else to modify it.
  Is it something to avoid?</p>
  <p>My IDE generate getter the following way:</p>
  <pre class="lang-cpp prettyprint-override"><code>MyType       &amp; MyClass::getMyType()       { return mMyType; }
  MyType const &amp; MyClass::getMyType() const { return mMyType; }
  </code></pre>
  <p>is it better? I don't need the const version</p>