Is there a similar way to read integer pairs from stdin to vector<pair<int,int> > in C++
<p>I am wondering if there is a way as slick as the following</p>

<pre><code>copy(istream_iterator&lt;int&gt;(cin), istream_iterator&lt;int&gt;(),back_inserter(v));
</code></pre>

<p>to copy pairs of <code>int</code> into a <code>vector&lt;pair&lt;int,int&gt; &gt;</code> when the input is given in pairs in the order of their appearance?</p>

<p>Thanks.</p>
