title: Why can I not pass 'this' to an inner class's method in this case?
body: <p>I have a class containing an inner class that looks somewhat like this:</p>
  <pre><code>class Foo
  {
      class Bar
      {
      public:
          void update(const Foo&amp; f)
          {
              //Updates using public getters of Foo
          }
      };
  public:
      void doStuff() const
      {
          b_.update(*this);
      }
  private:
      Bar b_;
  };
  </code></pre>
  <p>The line <code>b_.update(*this)</code> is currently giving me the error <code>cannot convert 'this' pointer from 'const Foo::Bar' to 'Foo::Bar &amp;'</code></p>
  <p>Why is that? The <code>update</code> method's parameter is of type <code>const Foo&amp;</code>, meaning it couldn't possibly modify the <code>Foo</code> object if it wanted to. Shouldn't that satisfy the const method <code>doStuff</code>?</p>
  <p>I've tried googling for someone having the same problem for an hour but I can't seem to word it correctly in order to find a similar question.</p>
  <p>Is what I'm trying to do possible, or do I need to change my design?</p>