Add operator==() and operator!=()
This commit is contained in:
1 parent
47273edf6e
commit
4a1a0c8855
2 files changed
+25
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user