title: C++ return type qualifiers heaven
body: <p>It's hell actually. Can someone please explain in plain English why the below segments work or not?</p>
  
  <pre><code>class Hey;
  
  class Bitmap {
  
  public:
      const Hey* const&amp; getHey() { return hey; }; // works
      const Hey* &amp; getHey2() { return hey; }; // error C2440: 'return' : cannot convert from 'Hey *' to 'const Hey *&amp;'
  
  private:
      Hey* hey;
  };
  </code></pre>