None of the lines from 22 through 26 can throw exceptions. This is also essentially the same as the previous version of insert, except simpler. In the clause in lines 4 through 8, all we have to make sure of is that line 8 is moved immediately after line 4. After that, it's harmless for any of the next lines to throw exceptions. Similarly, in the second clause, we only have to worry about lines 13 through 15.
Construction can certainly fail.
So what we need to do is keep track of the range of fully constructed elements. Also, as usual, the destructor can't throw an exception. In the case of vector , we already have that restriction. The iterators are pointers, and, for other reasons, we already know that valid pointer arithmetic may not result in exceptions.