title: Move-semantics with a member std::vector
body: <p>Sorry if this has been asked before, but as I understand it, in C++11, <code>std::vector</code> has a move constructor so that copies cost hardly anything in certain situations, like returning one by value. However, if I have a class like this, with a <code>vector</code> as a member variable:</p>
  
  <pre><code>class MyClass {
  public:
      MyClass() { }
      MyClass(const MyClass&amp; rhs) { }
  
      // other interfaces
  
  private:
      std::vector&lt;int&gt; myvec;
  
      // implementation
  };
  </code></pre>
  
  <p>And have a function which returns one of these by value, such as</p>
  
  <pre><code>MyClass somefunc() {
      MyClass mc;
      // fill mc.myvec with thousands (maybe even millions) of ints
      return mc;
  }
  </code></pre>
  
  <p>Will the move constructor of <code>mc.myvec</code> be called and the move constructor of <code>std::vector</code> taken advantage of even though <code>MyClass</code> itself doesn't know anything about move constructors? Or will the copy constructor of <code>vector</code> be called and all those thousands (maybe even millions) of <code>int</code>s have to be copied one by one?</p>