title: How to add elements to vector without invoking copy-constructor?
body: <p>For some reason my temporary local object is always copy-constructed/destroyed when added to a vector which is causing problems due to nested <code>std::reference_wrapper</code> which are getting invalid because of the copy-construction and destruction afterwards (<code>std::reference_wrapper</code> targets are inside the object which gets destroyed -> so they are invalid in the copy-constructed object, if the source object is destroyed). But if possible I want to avoid the additional copying / destroying completely - that seems impossible, because whatever I tried always it wants to invoke the copy constructor (even using <code>std::vector::emplace_back</code>).</p>
  
  <p>Considering this simple example (for easier understanding without <code>std::reference_wrapper</code> involved), it always tries to invoke the copy-constructor - I don't get why.</p>
  
  <pre><code>#include &lt;vector&gt;
  
  class A{
  public:
    A(int a) : a(a){ }
    int getInt() const{ return a; }
    A(const A&amp;) = delete; /* to deny copy-construction */
  private:
    int a;
  };
  
  int main(int argc, char* argv[]){
    std::vector&lt;A&gt; vec;
    vec.emplace_back(3);              /* tries to call copy constructor */
    vec.push_back(A(3));              /* tries to call copy constructor */
    vec.push_back(std::move(A(3)));   /* tries to call copy constructor */
    return 0;
  }
  </code></pre>
  
  <p>Any ideas what I'm missing here?</p>