We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8fa74fa + 3178f5c commit 2295716Copy full SHA for 2295716
include/swift/Basic/NullablePtr.h
@@ -60,6 +60,14 @@ class NullablePtr {
60
const T *getPtrOrNull() const { return Ptr; }
61
62
explicit operator bool() const { return Ptr; }
63
+
64
+ bool operator==(NullablePtr<T> &&other) const { return other.Ptr == Ptr; }
65
66
+ bool operator!=(NullablePtr<T> &&other) const { return !(*this == other); }
67
68
+ bool operator==(const T *other) const { return other == Ptr; }
69
70
+ bool operator!=(const T *other) const { return !(*this == other); }
71
};
72
73
} // end namespace swift
0 commit comments