title: C++ map emplace
body: <pre><code>struct Foo {
      Foo(int a, int b) : a_(a), b_(b) {}
      int a_;
      int b_;
  };
  
  int main() 
  {
      vector&lt;Foo&gt; vec;
      vec.emplace_back(1, 2);
  }
  </code></pre>
  
  <p>The above code compiles since emplace_back constructs the Foo object in place.</p>
  
  <pre><code>int main() 
  {
      map&lt;int, Foo&gt; m;
      m.emplace(1, 2, 3);
  }
  </code></pre>
  
  <p>The above code does not compile. Why does <code>emplace</code> not construct <code>Foo</code> in place using args <code>2</code> and <code>3</code> ? If <code>Foo</code> constructor has 1 arg, the above style works.</p>
  
  <p>I am using gcc 4.9.2 which is not the latest. Does anyone think the above code would compile in later compilers ?</p>