Merge N sorted in vectors c++
<p>I have a vector of sorted c++ classes that have comparison operators.  I need a vector of the objects sorted.  Is there any open source algorithms that would take either a list of vectors or vector of vectors and make one sorted vector?</p>

<p>for n=2, this works fine:</p>

<pre><code>std::vector&lt;Data&gt; dst;
std::merge(v1.begin(), v1.end(), v2.begin(), v2.end(), std::back_inserter(dst));
</code></pre>