File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ class Userspace {
48
48
operator bool () const { return m_ptr; }
49
49
operator FlatPtr () const { return (FlatPtr)m_ptr; }
50
50
51
+ // Disable default implementations that would use surprising integer promotion.
52
+ bool operator ==(const Userspace&) const = delete ;
53
+ bool operator <=(const Userspace&) const = delete ;
54
+ bool operator >=(const Userspace&) const = delete ;
55
+ bool operator <(const Userspace&) const = delete ;
56
+ bool operator >(const Userspace&) const = delete ;
57
+
51
58
#ifdef KERNEL
52
59
Userspace (FlatPtr ptr)
53
60
: m_ptr(ptr)
@@ -86,5 +93,5 @@ inline Userspace<T> static_ptr_cast(const Userspace<U>& ptr)
86
93
87
94
}
88
95
89
- using AK::Userspace;
90
96
using AK::static_ptr_cast;
97
+ using AK::Userspace;
You can’t perform that action at this time.
0 commit comments