Skip to content

Commit 898f9d8

Browse files
committed
fix msvc build
1 parent 6fb6689 commit 898f9d8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/utki/shared_ref.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ class shared_ref
176176
* @return true if this object is less than the other object.
177177
* @return false otherwise.
178178
*/
179-
constexpr bool operator<(const object_type& o) const noexcept
179+
friend constexpr bool operator<(const shared_ref& r, const object_type& o) noexcept
180180
{
181-
return *this->p < o;
181+
return r.get() < o;
182182
}
183183

184184
/**
@@ -188,9 +188,9 @@ class shared_ref
188188
* @return true if this object is equal to the other object.
189189
* @return false otherwise.
190190
*/
191-
constexpr bool operator==(const object_type& o) const noexcept
191+
friend constexpr bool operator==(const shared_ref& r, const object_type& o) noexcept
192192
{
193-
return *this->p == o;
193+
return r.get() == o;
194194
}
195195
};
196196

0 commit comments

Comments
 (0)