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.
1 parent 6fb6689 commit 898f9d8Copy full SHA for 898f9d8
1 file changed
src/utki/shared_ref.hpp
@@ -176,9 +176,9 @@ class shared_ref
176
* @return true if this object is less than the other object.
177
* @return false otherwise.
178
*/
179
- constexpr bool operator<(const object_type& o) const noexcept
+ friend constexpr bool operator<(const shared_ref& r, const object_type& o) noexcept
180
{
181
- return *this->p < o;
+ return r.get() < o;
182
}
183
184
/**
@@ -188,9 +188,9 @@ class shared_ref
188
* @return true if this object is equal to the other object.
189
190
191
- constexpr bool operator==(const object_type& o) const noexcept
+ friend constexpr bool operator==(const shared_ref& r, const object_type& o) noexcept
192
193
- return *this->p == o;
+ return r.get() == o;
194
195
};
196
0 commit comments