Add operator==() and operator!=()

This commit is contained in:
josh committed 2026-02-24 14:44:38 -05:00
1 parent 47273edf6e
commit 4a1a0c8855
2 files changed
+25

No files matched your search

+20
View File
@@ -105,6 +105,26 @@ public:
return ptr != nullptr;
}
bool operator==(const rcp<T> & other) const
{
return ptr == other.ptr;
}
bool operator!=(const rcp<T> & other) const
{
return ptr != other.ptr;
}
bool operator==(std::nullptr_t) const
{
return ptr == nullptr;
}
bool operator!=(std::nullptr_t) const
{
return ptr != nullptr;
}
template <typename... Args>
static rcp<T> create(Args&&... args)
{