The exception recovery mechanism for the uninitialized_* algorithms did not work for iterators into discontiguous memory.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@147343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-12-29 17:45:35 +00:00
parent 5586c020c9
commit 8292d74270
2 changed files with 66 additions and 20 deletions

View File

@@ -4751,6 +4751,8 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
while (true)
{
__restart:
if (__nth == __last)
return;
difference_type __len = __last - __first;
switch (__len)
{