aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/support/ref_counted_ptr.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/lib/support/ref_counted_ptr.h b/src/core/lib/support/ref_counted_ptr.h
index dc2385e369..83e99d8ca6 100644
--- a/src/core/lib/support/ref_counted_ptr.h
+++ b/src/core/lib/support/ref_counted_ptr.h
@@ -76,6 +76,19 @@ class RefCountedPtr {
T& operator*() const { return *value_; }
T* operator->() const { return value_; }
+ bool operator==(const RefCountedPtr& other) const {
+ return value_ == other.value_;
+ }
+ bool operator==(T* other) const {
+ return value_ == other;
+ }
+ bool operator!=(const RefCountedPtr& other) const {
+ return value_ != other.value_;
+ }
+ bool operator!=(T* other) const {
+ return value_ != other;
+ }
+
private:
T* value_ = nullptr;
};