title: C++ converting map<int, set<int> > into map<int, vector<int>>
body: <p>I have to convert an std::map like this:</p>
  
  <pre><code>std::map&lt;int, std::set&lt;int&gt; &gt; t_contents;
  </code></pre>
  
  <p>in a map like this:</p>
  
  <pre><code>std::map&lt;int, std::vector&lt;int&gt; &gt; seq;
  </code></pre>
  
  <p>I am doing the conversion this way:</p>
  
  <pre><code>std::map&lt;int, std::set&lt;int&gt; &gt;::const_iterator it;
  for(it = t_contents.begin(); it != t_contents.end(); ++it)
  {    
      std::move((*it).second.begin(), (*it).second.end(), 
          std::back_inserter(seq[(*it).first])
      );   
  }
  </code></pre>
  
  <p>Consider that the map contains up to 1 million elements and each set can contain also up ti 10 thousand. This is the best solution I have found in terms of space wasting and time; is there any better way to do this work?</p>