title: Emplacing in vector using default constructor
body: <p>I want to use <code>vector::emplace</code> to default construct a <strong>non-copyable</strong> and <strong>non-assignable</strong> object and then use specific methods on the object using an iterator to the newly created object. Note that there are no parameterized constructors of the class just the default constructor. A simple example is:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  using namespace std;
  
  class Test {
  public:
      Test() {}
  private:
      Test(const Test&amp;) = delete;             // To make clas un-copyable.
      Test&amp; operator=(const Test&amp;) = delete;
  
      int a_;
  };
  
  int main() {
      vector&lt;Test&gt; test_vec;
      test_vec.emplace_back();     // &lt;---- fails
  
      return 0;
  }
  </code></pre>
  
  <p><code>vector::emplace()</code> constructs a new object but requires arguments to a non-default constructor. <code>vector::emplace_back()</code> will construct at the end of the vector.</p>
  
  <p>Is there a way to emplace with default construction. Is there a way to use piecewise construction or default forwarding perhaps using <code>std::piecewise_construct</code> as there is for maps? For example, in the case of maps, we can use:</p>
  
  <pre><code>std::map&lt;int,Test&gt; obj_map;
  int val = 10;
  obj_map.emplace(std::piecewise_construct,
                  std::forward_as_tuple(val),
                  std::forward_as_tuple());
  </code></pre>
  
  <p>Is there something similar for vectors?</p>