Skip to content

Commit bbf78f2

Browse files
Add all comparison operators for SoA pointer
1 parent a7b42f0 commit bbf78f2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

GPU/Common/MemLayout.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ struct wrapper<S, pointer> : public S<pointer> {
237237
constexpr bool operator==(const wrapper& other) const { return Base::apply(FirstMember{}) == other.apply(FirstMember{}); }
238238
constexpr bool operator!=(const wrapper& other) const { return !this->operator==(other); }
239239
constexpr bool operator<(const wrapper& other) const { return Base::apply(FirstMember{}) < other.apply(FirstMember{}); }
240+
constexpr bool operator<=(const wrapper& other) const { return Base::apply(FirstMember{}) <= other.apply(FirstMember{}); }
241+
constexpr bool operator>(const wrapper& other) const { return Base::apply(FirstMember{}) > other.apply(FirstMember{}); }
242+
constexpr bool operator>=(const wrapper& other) const { return Base::apply(FirstMember{}) >= other.apply(FirstMember{}); }
240243

241244
constexpr wrapper operator+(ptrdiff_t i) const { return Base::apply(Advance<Base>{i}); }
242245
constexpr wrapper operator-(ptrdiff_t i) const { return operator+(-i); }

0 commit comments

Comments
 (0)