AK: Allow getting the key from a RedBlackTree iterator

This commit is contained in:
Andreas Kling 2021-07-15 01:25:54 +02:00
parent 4ff35c23d3
commit 980f409003
Notes: sideshowbarker 2024-07-18 08:59:44 +09:00

View file

@ -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)