title: Why is this move allowed?
body: <p>A vector when it does a resize will attempt to use move semantics to move the objects from the old array to the new one. But if the templated object in the vector does not support a no throw <code>noexcept</code> move constructor then it will revert to using copy construction so that the <code>strong exception guarantee</code> is preserved.</p>
  
  <p>But when I try this:</p>
  
  <pre><code>#include &lt;vector&gt;
  
  class X
  {
      public:
          // Needs default constructor
          X() {}
  
          // Copy operations disabled.
          X(X const&amp;)             = delete;
          X&amp; operator=(X const&amp;)  = delete;
  
          X(X&amp;&amp;)              // throwable move constructor
          {}
          X&amp; operator=(X&amp;&amp;)   // throwable move assignment.
          {return *this;}
  };
  
  int main()
  {
      // Vector of Size zero
      std::vector&lt;X&gt;  data;
  
      // Vector of Size ten.
      // Since the move constructor can potentially throw
      // We have to copy elements when we do a resize
      //
      // But X has a disabled copy semantics
      // Thus I would expect a compile time error here.
      data.resize(10);
  }
  </code></pre>
  
  <p>This compiles without error or warning:</p>
  
  <pre><code>&gt; g++ --version
  Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
  Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
  Target: x86_64-apple-darwin14.0.0
  Thread model: posix
  &gt; g++ -std=c++11 test.cpp
  &gt;
  </code></pre>