title: Implicit move constructor and assignment operator
body: <p>What does it mean that implicit move constructor does a member-wise move and implicit move assignment operator a member-wise assignment?</p>
  
  <p>From <a href="https://en.cppreference.com/w/cpp/language/move_constructor" rel="nofollow noreferrer">https://en.cppreference.com/w/cpp/language/move_constructor</a>:</p>
  
  <blockquote>
    <p>For non-union class types (class and struct), the <strong>move constructor
    performs full member-wise move</strong> of the object's bases and non-static
    members, in their initialization order, using direct initialization
    with an xvalue argument. If this satisfies the requirements of a
    constexpr constructor, the generated move constructor is constexpr.</p>
  </blockquote>
  
  <p>From <a href="https://en.cppreference.com/w/cpp/language/move_assignment" rel="nofollow noreferrer">https://en.cppreference.com/w/cpp/language/move_assignment</a>:</p>
  
  <blockquote>
    <p>For non-union class types (class and struct), the <strong>move assignment
    operator performs full member-wise move assignment</strong> of the object's
    direct bases and immediate non-static members, in their declaration
    order, using built-in assignment for the scalars, memberwise
    move-assignment for arrays, and move assignment operator for class
    types (called non-virtually).</p>
  </blockquote>
  
  <p>Will the implicit members look like this for the following exemplary class template:</p>
  
  <pre><code>template&lt;class T&gt;
  class Holder {
  public:
      Holder(int size) : m_size(size) { m_data = new T[m_size]; }
  
      Holder(Holder &amp;&amp; other) :
          m_size(std::move(other.m_size)),
          m_data(std::move(other.m_data))
      {}
  
      Holder&amp; operator=(Holder &amp;&amp; other) {
         if(this == &amp;other) return *this;
         m_data = std::move(other.m_data);
         m_size = std::move(other.m_size);
         return *this;
      }
  
      ~Holder() { delete [] m_data; }
  private:
      T* m_data;
      int m_size;
  };
  </code></pre>
  
  <p>What's more, what will the <code>std::move()</code> in the above example transfer the resources?</p>