std::pair<difference_type, _Distance_precision>& __dist,
bool __check_dereferenceable) const
{
+ if (_M_value_initialized() && __rhs._M_value_initialized())
+ {
+ __dist = std::make_pair(0, __dp_exact);
+ return true;
+ }
+
if (_M_singular() || __rhs._M_singular() || !_M_can_compare(__rhs))
return false;
std::pair<difference_type,
_Distance_precision>& __dist) const
{
+ if (this->_M_value_initialized() && __rhs._M_value_initialized())
+ {
+ __dist = std::make_pair(0, __dp_exact);
+ return true;
+ }
+
if (this->_M_singular() || __rhs._M_singular()
|| !this->_M_can_compare(__rhs))
return false;
--- /dev/null
+// { dg-do run { target c++11 } }
+// { dg-require-debug-mode "" }
+
+// PR libstdc++/114316
+
+#include <set>
+#include <algorithm>
+
+#include <testsuite_hooks.h>
+
+int main()
+{
+ std::set<int>::iterator it{};
+ VERIFY( std::find(it, it, 0) == it );
+ return 0;
+}
--- /dev/null
+// { dg-do run { target c++11 } }
+// { dg-require-debug-mode "" }
+
+// PR libstdc++/114316
+
+#include <vector>
+#include <algorithm>
+
+#include <testsuite_hooks.h>
+
+int main()
+{
+ std::vector<int>::iterator it{};
+ VERIFY( std::find(it, it, 0) == it );
+ return 0;
+}