Add equality comparisons to Ptr (#774)

This commit is contained in:
Geoff Romer authored and GitHub committed 2021-08-30 11:27:52 -07:00
1 parent fe28dd9a33
commit 0ac220b30f
2 files changed
+4 -2

No files matched your search

+3
View File
@@ -32,6 +32,9 @@ class Ptr {
T* Get() const { return ptr; }
friend auto operator==(Ptr lhs, Ptr rhs) { return lhs.ptr == rhs.ptr; }
friend auto operator!=(Ptr lhs, Ptr rhs) { return lhs.ptr != rhs.ptr; }
private:
T* ptr;
};