title: Why I could use push_back in map but not the back_inserter in set?
body: <p>The 11th chapter (about associative containers) of C++ Primer 5th says:</p>
  
  <blockquote>
    <p>The associative containers do not support the sequential-container position-specific operations, such as push_front or back. Because the elements are stored based on their keys, these operations would be meaningless for the associative containers.</p>
  </blockquote>
  
  <p>However, after I practice two exercises, I am confused:</p>
  
  <ol>
  <li><p>Given a <code>map&lt;string, vector&lt;string&gt;&gt;</code>, one is asked to add a <code>vector&lt;int&gt;</code> to a given <code>key</code>, my (working) solution is:</p>
  
  <pre><code>using Map = map&lt;string, vector&lt;string&gt;&gt;;
  Map my_map;
  for(string ln; cin &gt;&gt; ln)
     for(string cn; cin &gt;&gt; cn)
         my_map[ln].push_back(cn);
  </code></pre></li>
  <li><p>However in the second exercise, assuming c is a multiset of strings and v is a vector of strings, is <code>copy(v.begin(), v.end(), back_inserter(c));</code> legal or illegal?</p></li>
  </ol>
  
  <p>When I use it, I got this error:</p>
  
  <blockquote>
    <p>error: 'class std::multiset >' has no member named 'push_back'`</p>
  </blockquote>
  
  <p>What I have known is <code>back_inserter</code> doesn't work since there's no <code>push_back</code>.</p>