title: Assigning base data from derived class with move produces an error
body: <p>I am new to the new feature of C++ such as moving semantic (moving constructor and moving assignment operator). The code below produces an error in IDE as follows.</p>
  <p><a href="https://i.stack.imgur.com/KyFFi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KyFFi.png" alt="enter image description here" /></a></p>
  <p>How to fix it?</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class HeavyData {};
  
  class Base
  {
  protected:
      HeavyData data;
  
  public:
      Base(HeavyData data) :data{ data } {}
      Base(Base const&amp;&amp; src) :data{ move(src.data) } {}
  
      Base&amp; operator = (Base const&amp;&amp; rhs)
      {
          this-&gt;data = move(rhs.data);
          return *this;
      }
  };
  
  class  Derived : public Base
  {
  private:
      HeavyData extra;
  public:
      Derived(HeavyData data, HeavyData extra) :
          extra{ extra }, Base(data) {}
      Derived(Derived const&amp;&amp; src) :
          extra{ move(src.extra) }, data{ move(src.data) }  {}
  
      Derived&amp; operator = (Derived const&amp;&amp; rhs)
      {
          this-&gt;data = move(rhs.data);
          this-&gt;extra = move(rhs.extra);
          return *this;
      }
  };
  void main()
  {
      HeavyData data, extra;
      Derived d1(data, extra);
      Derived d2 = move(d1);
  }
  </code></pre>