Skip to content

Add get_mutable to const_depth_iteratort #1803

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

Conversation

NathanJPhillips
Copy link
Contributor

This gets a depth_iteratort pointing to the same element as the const_depth_iteratort so long as you can provide a non-const reference to the original root element.
It is required for #1789.

This gets a depth_iteratort pointing to the same element as the const_depth_iteratort as long as you can provide a non-const reference to the original root element.
@smowton
Copy link
Contributor

smowton commented Feb 7, 2018

Hmmm. What do you think of the alternative where instead of the const-iterator having an upgrade method, instead the non-const iterator has an alternate constructor where it gets a const reference and a get-nonconst-reference thunk to call when it needs to?

@NathanJPhillips
Copy link
Contributor Author

It seems a good idea to me. I'll close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants