diff options
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/__bit_reference | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference index 8ff3bf6d9ee..58d475e4368 100644 --- a/libcxx/include/__bit_reference +++ b/libcxx/include/__bit_reference @@ -173,6 +173,8 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __storage_type __b = *__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b))); + if (__n == __dn) + return _It(__first.__seg_, __first.__ctz_ + __n); __n -= __dn; ++__first.__seg_; } @@ -207,6 +209,8 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __storage_type __b = ~*__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b))); + if (__n == __dn) + return _It(__first.__seg_, __first.__ctz_ + __n); __n -= __dn; ++__first.__seg_; } |

