Add Handle::operator==

This commit is contained in:
yvt 2019-07-16 01:18:20 +09:00
parent 07cdbf9d1d
commit 3c90eedfb8

View File

@ -128,6 +128,8 @@ namespace spades {
}
operator bool() { return ptr != NULL; }
bool operator==(const Handle &rhs) const { return ptr == rhs.ptr; }
/**
* Attempts to cast this `Handle<T>` to `Handle<S>` using `dynamic_cast`, consuming this
* `Handle<T>`. Throws an exception if the cast was unsuccessful.