diff --git a/AK/RedBlackTree.h b/AK/RedBlackTree.h index 99a7527e009..4647b555f22 100644 --- a/AK/RedBlackTree.h +++ b/AK/RedBlackTree.h @@ -406,6 +406,8 @@ public: [[nodiscard]] bool is_end() const { return !m_node; } [[nodiscard]] bool is_begin() const { return !m_prev; } + auto key() const { return m_node->key; } + private: friend TreeType; explicit RedBlackTreeIterator(typename TreeType::Node* node, typename TreeType::Node* prev = nullptr)