title: how an unordered_map is initialized with the values of array
body: <p>I have come across a code where i get confused , An unordered_map is initialised like below </p>
  
  <pre><code>std::unordered_map&lt;std::string, int&gt; wordMap;
  
  // Inserting elements through an initializer_list
  wordMap.insert({ {"First", 1}, {"Second", 2}, {"Third", 3} } );
  </code></pre>
  
  <p>But what surprise me is the below code</p>
  
  <pre><code>int arr[] = { 1, 5, 2, 1, 3, 2, 1 };
  unordered_map&lt;int, int&gt; hash; 
      for (int i = 0; i &lt; n; i++) 
          hash[arr[i]]++;
  </code></pre>
  
  <p>Here i am not getting how key and value is inserted in the map</p>