diff --git a/src/prevector.h b/src/prevector.h index d4d90c7350f..91be488039e 100644 --- a/src/prevector.h +++ b/src/prevector.h @@ -426,21 +426,8 @@ public: } } - bool operator==(const prevector& other) const { - if (other.size() != size()) { - return false; - } - const_iterator b1 = begin(); - const_iterator b2 = other.begin(); - const_iterator e1 = end(); - while (b1 != e1) { - if ((*b1) != (*b2)) { - return false; - } - ++b1; - ++b2; - } - return true; + constexpr bool operator==(const prevector& other) const { + return std::ranges::equal(*this, other); } bool operator<(const prevector& other) const {