diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2014-05-06 15:33:23 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2014-05-06 15:33:23 +0000 |
| commit | 0fc6e981b05ba7db0b7d7f295182b95c1eff1b27 (patch) | |
| tree | 2fafb4705eb52b527d917dc9eee960e969e0cce2 /libcxx/include/__bit_reference | |
| parent | 8fbbfbbec37e987be1786dda6d4fcdfc888a4f11 (diff) | |
| download | bcm5719-llvm-0fc6e981b05ba7db0b7d7f295182b95c1eff1b27.tar.gz bcm5719-llvm-0fc6e981b05ba7db0b7d7f295182b95c1eff1b27.zip | |
Fix PR 19663. Some calls to find(vector<bool>) were returning iterators that were subtly invalid (didn't compare equal). Thanks to Erik Verbruggen for the report (and diagnosis)
llvm-svn: 208096
Diffstat (limited to 'libcxx/include/__bit_reference')
| -rw-r--r-- | libcxx/include/__bit_reference | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference index 37b79237128..d9ebfbe5e61 100644 --- a/libcxx/include/__bit_reference +++ b/libcxx/include/__bit_reference @@ -174,7 +174,7 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type if (__b) return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -210,7 +210,7 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type if (__b) return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } |

