Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overloads for const nodes #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion include/sk/patricia.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,8 @@ namespace sk {
class patricia_map_iterator {
using iterator_type = patricia_iterator<T, Alloc, is_const>;
using node_type = patricia_node<T, Alloc>;
using node_pointer
= std::conditional_t<is_const, node_type const*, node_type*>;
iterator_type current;

public:
Expand All @@ -1773,7 +1775,7 @@ namespace sk {

explicit patricia_map_iterator() noexcept = default;

explicit patricia_map_iterator(node_type *node) noexcept
explicit patricia_map_iterator(node_type_pointer node) noexcept
: current(iterator_type(node))
{
}
Expand Down