ref: Add equality operators

This commit is contained in:
Eelco Dolstra 2021-06-25 14:43:06 +02:00
parent 9cf991f421
commit 07790fdddf

View file

@ -73,6 +73,16 @@ public:
return ref<T2>((std::shared_ptr<T2>) p);
}
bool operator == (const ref<T> & other) const
{
return p == other.p;
}
bool operator != (const ref<T> & other) const
{
return p != other.p;
}
private:
template<typename T2, typename... Args>