Implement N3644 "Null Forward Pointers" in _LIBCPP_DEBUG mode.
This functionality is tested in std/containers/sequences/vector/iterators.pass.cpp
(and similarly for all containers, but vector is the only one to be tested that
uses debug iterators).
Differential Revision: https://reviews.llvm.org/D100881
GitOrigin-RevId: bbc6893b11cd85147543e84351176da7c3869cc4
diff --git a/src/debug.cpp b/src/debug.cpp
index 20055fc..dd5963f 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -438,7 +438,7 @@
__i_node* j = __find_iterator(__j);
__c_node* ci = i != nullptr ? i->__c_ : nullptr;
__c_node* cj = j != nullptr ? j->__c_ : nullptr;
- return ci != nullptr && ci == cj;
+ return ci == cj;
}
void