title: C++11 initialize map
body: <p>I am trying to initialize a STL map using C++11 syntax but that doesn't seem to work. After initialization, when i try to access the element, it tries to call the private constructor of Foo. Did I miss something? It works if I use at. I am wondering if I could use operator[] to access initialized values...</p>
  
  <pre><code>#include &lt;map&gt;
  #include &lt;string&gt;
  
  class Foo{
  public:
      int a, b;
      Foo(int a_, int b_){
          a = a_;
          b = b_;
      }
  
  private:
      Foo(){};
  };
  
  
  int main(){
  
      std::map&lt;std::string, Foo&gt; myMap = { {"1", Foo(10,5)}, {"2", Foo(5,10)} };
      int b  = myMap["1"].b;    // it tries to call private constructor of Foo.
      return 0;
  }
  </code></pre>