Tests whether two owners have ownership over the same data, that is they are co-owners.
| 210 | // Tests whether two owners have ownership over the same data, that is they |
| 211 | // are co-owners. |
| 212 | friend bool operator==(const Owner& lhs, const Owner& rhs) noexcept { |
| 213 | // A reference count and arena can never occupy the same memory address, so |
| 214 | // we can compare for equality without masking off the bits. |
| 215 | return lhs.ptr_ == rhs.ptr_; |
| 216 | } |
| 217 | |
| 218 | private: |
| 219 | template <typename T> |