From 07790fdddf7705454310633b9e38bd816d23de8e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Jun 2021 14:43:06 +0200 Subject: [PATCH] ref: Add equality operators --- src/libutil/ref.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libutil/ref.hh b/src/libutil/ref.hh index 0be2a7e74..2549ef496 100644 --- a/src/libutil/ref.hh +++ b/src/libutil/ref.hh @@ -73,6 +73,16 @@ public: return ref((std::shared_ptr) p); } + bool operator == (const ref & other) const + { + return p == other.p; + } + + bool operator != (const ref & other) const + { + return p != other.p; + } + private: template