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)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@208096 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__bit_reference b/include/__bit_reference
index 37b7923..d9ebfbe 100644
--- a/include/__bit_reference
+++ b/include/__bit_reference
@@ -174,7 +174,7 @@
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 @@
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_;
}