From d0d4be9e351a16b74801210c49d654b49e6aa304 Mon Sep 17 00:00:00 2001 From: LeonineKing1199 Date: Thu, 18 Nov 2021 10:19:46 -0800 Subject: [PATCH] Add missing `operator==` overloads for direct `list_iterator` comparisons --- test/helpers/list.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/helpers/list.hpp b/test/helpers/list.hpp index d39c766e..3fddd6d3 100644 --- a/test/helpers/list.hpp +++ b/test/helpers/list.hpp @@ -113,6 +113,10 @@ namespace test { ptr_ = ptr_->next_; return tmp; } + + bool operator==(list_iterator y) const { return ptr_ == y.ptr_; } + bool operator!=(list_iterator y) const { return ptr_ != y.ptr_; } + bool operator==(const_iterator y) const { return ptr_ == y.ptr_; } bool operator!=(const_iterator y) const { return ptr_ != y.ptr_; } };