title: Emplace a derived movable but noncopyable in a vector gives compilation error
body: <p>I'm having compiler errors when trying to <code>emplace_back</code> in a vector of non-copyable but movable objects with a subtle inheritance twist, that should to my knowledge not change the problem.</p>
  
  <p>Is this legal C++ and this a Visual Studio 2015 bug, or am I making an obvious mistake ?</p>
  
  <pre><code>#include &lt;vector&gt;
  
  class Base
  {
  public:
      Base() {}
  
      Base(Base&amp;) = delete;
      Base&amp; operator= (Base&amp;) = delete;
  };
  
  class Test : public Base
  {
  public:
      Test(int i) : m_i(i) {}
  
      Test(Test&amp;&amp;) = default;
      Test&amp; operator= (Test&amp;&amp;) = default;
  
  protected:
      int m_i;
  };
  
  int main(int argc, char *argv[])
  {
      std::vector&lt;Test&gt; vec;
      vec.emplace_back(1);
  }
  </code></pre>
  
  <p>Output :</p>
  
  <pre><code>error C2280: 'Test::Test(Test &amp;)': attempting to reference a deleted function
  </code></pre>
  
  <p>Without the inheritance, that is with deleted copy constructor in Test and no base class, it compiles correctly.<br>
  Somehow, removing the default in the move-constructor make it compile correctly also, but then I have to define the move constructor and I don't want to go there.</p>
  
  <p>Which means this compiles fine :</p>
  
  <pre><code>#include &lt;vector&gt;
  
  class Test
  {
  public:
      Test(int i) : m_i(i) {}
  
      Test(Test&amp;) = delete;
      Test&amp; operator= (Test&amp;) = delete;
  
      Test(Test&amp;&amp;) = default;
      Test&amp; operator= (Test&amp;&amp;) = default;
  
  protected:
      int m_i;
  };
  
  int main(int argc, char *argv[])
  {
      std::vector&lt;Test&gt; vec;
      vec.emplace_back(1);
  }
  </code></pre>
  
  <p>Puzzling ?</p>