Skip to content

Add get_mutable to const_depth_iteratort#1803

Closed
NathanJPhillips wants to merge 1 commit intodiffblue:developfrom
NathanJPhillips:feature/depth_iterator_get_mutable
Closed

Add get_mutable to const_depth_iteratort#1803
NathanJPhillips wants to merge 1 commit intodiffblue:developfrom
NathanJPhillips:feature/depth_iterator_get_mutable

Conversation

@NathanJPhillips
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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