title: How to treat std::pair as two separate variables?
body: <p>There are a few functions in the standard library, such as <a href="http://en.cppreference.com/w/cpp/container/map/insert"><code>std::map::insert</code></a>, which return a <code>std::pair</code>. At times it would be convenient to have that populate two different variables corresponding to the halves of the pair. Is there an easy way to do that?</p>
  
  <pre><code>std::map&lt;int,int&gt;::iterator it;
  bool b;
  magic(it, b) = mymap.insert(std::make_pair(42, 1));
  </code></pre>
  
  <p>I'm looking for the <code>magic</code> here.</p>