This question already has an answer here:
I came across this answer in the review queue:
Sort the other range only, and then use std::merge.
I thought, that answer may be the solution, but instead of simply posting a link, the AP should elaborate a bit, adding even the smallest code example in case the linked resource ceases to exist.
When I did that, I saw the Big Bad Blame Screen of Death:
STOP! Look and Listen.
This was an audit, designed to see if you were paying attention. You didn't pass. Your review was inappropriate. This was a high quality post and you should have considered leaving it as-is or even upvoting.
OK, is adding a comment something so bad that I should be ashamed of trying to do that with so highly upvoted answer? Maybe it's time to fix review audits a bit?
--edit-- I've added my comment anyway!