diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-12-29 17:45:35 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-12-29 17:45:35 +0000 |
commit | b34b48196ca5de5f83562ee9dd0050350b8e4e16 (patch) | |
tree | d753ceb92d1748ca2ded9620ba621b0a94b5110e /libcxx/include/algorithm | |
parent | 9e61291bf56234402e0bae5caa68adbfbc1814e5 (diff) | |
download | bcm5719-llvm-b34b48196ca5de5f83562ee9dd0050350b8e4e16.tar.gz bcm5719-llvm-b34b48196ca5de5f83562ee9dd0050350b8e4e16.zip |
The exception recovery mechanism for the uninitialized_* algorithms did not work for iterators into discontiguous memory.
llvm-svn: 147343
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 4679845e132..f9c6843a60a 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -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) { |