title: Returning reference to a const pointer to const type
body: <p>Can you look at this example code:</p>
  
  <pre><code>class Test {
    int *a;
    int b;
   public:
    Test() : b(2)
    {
      a = new int(5);
    }
  
    const int * const&amp; GetA() const
    {
      const int * const&amp; c = a;
      return a;
    }
  
    const int&amp; GetB()
    {
      return b;
    }
  
    ~Test()
    {
      delete a;
    }
  };
  </code></pre>
  
  <p>And I get a warning on return a. Why is it wrong to return a reference to a const pointer to a const variable, but it's fine to return a reference to a const variable? By the way if I return c in GetA() it compiles just fine.</p>