diff options
Diffstat (limited to 'runtime/handle.h')
| -rw-r--r-- | runtime/handle.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/handle.h b/runtime/handle.h index e4b6d29a55..ccff575495 100644 --- a/runtime/handle.h +++ b/runtime/handle.h @@ -81,6 +81,14 @@ class Handle : public ValueObject { return reference_; } + ALWAYS_INLINE bool operator!=(std::nullptr_t) const REQUIRES_SHARED(Locks::mutator_lock_) { + return !IsNull(); + } + + ALWAYS_INLINE bool operator==(std::nullptr_t) const REQUIRES_SHARED(Locks::mutator_lock_) { + return IsNull(); + } + protected: template<typename S> explicit Handle(StackReference<S>* reference) |