diff options
Diffstat (limited to 'src/common/intrusive_red_black_tree.h')
| -rw-r--r-- | src/common/intrusive_red_black_tree.h | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/common/intrusive_red_black_tree.h b/src/common/intrusive_red_black_tree.h index 93046615e..bc2940fa0 100644 --- a/src/common/intrusive_red_black_tree.h +++ b/src/common/intrusive_red_black_tree.h | |||
| @@ -96,10 +96,6 @@ public: | |||
| 96 | return m_node == rhs.m_node; | 96 | return m_node == rhs.m_node; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | constexpr bool operator!=(const Iterator& rhs) const { | ||
| 100 | return !(*this == rhs); | ||
| 101 | } | ||
| 102 | |||
| 103 | constexpr pointer operator->() const { | 99 | constexpr pointer operator->() const { |
| 104 | return m_node; | 100 | return m_node; |
| 105 | } | 101 | } |
| @@ -242,19 +238,21 @@ public: | |||
| 242 | 238 | ||
| 243 | template <typename T> | 239 | template <typename T> |
| 244 | concept HasRedBlackKeyType = requires { | 240 | concept HasRedBlackKeyType = requires { |
| 245 | { std::is_same<typename T::RedBlackKeyType, void>::value } -> std::convertible_to<bool>; | 241 | { |
| 246 | }; | 242 | std::is_same<typename T::RedBlackKeyType, void>::value |
| 243 | } -> std::convertible_to<bool>; | ||
| 244 | }; | ||
| 247 | 245 | ||
| 248 | namespace impl { | 246 | namespace impl { |
| 249 | 247 | ||
| 250 | template <typename T, typename Default> | 248 | template <typename T, typename Default> |
| 251 | consteval auto* GetRedBlackKeyType() { | 249 | consteval auto* GetRedBlackKeyType() { |
| 252 | if constexpr (HasRedBlackKeyType<T>) { | 250 | if constexpr (HasRedBlackKeyType<T>) { |
| 253 | return static_cast<typename T::RedBlackKeyType*>(nullptr); | 251 | return static_cast<typename T::RedBlackKeyType*>(nullptr); |
| 254 | } else { | 252 | } else { |
| 255 | return static_cast<Default*>(nullptr); | 253 | return static_cast<Default*>(nullptr); |
| 256 | } | ||
| 257 | } | 254 | } |
| 255 | } | ||
| 258 | 256 | ||
| 259 | } // namespace impl | 257 | } // namespace impl |
| 260 | 258 | ||
| @@ -322,10 +320,6 @@ public: | |||
| 322 | return m_impl == rhs.m_impl; | 320 | return m_impl == rhs.m_impl; |
| 323 | } | 321 | } |
| 324 | 322 | ||
| 325 | constexpr bool operator!=(const Iterator& rhs) const { | ||
| 326 | return !(*this == rhs); | ||
| 327 | } | ||
| 328 | |||
| 329 | constexpr pointer operator->() const { | 323 | constexpr pointer operator->() const { |
| 330 | return Traits::GetParent(std::addressof(*m_impl)); | 324 | return Traits::GetParent(std::addressof(*m_impl)); |
| 331 | } | 325 | } |