New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 723967 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

flat_map iterators are not const in the key

Project Member Reported by tibell@chromium.org, May 18 2017

Issue description

The flat_map (and thus flat_tree) iterators should probably hand the user a const key as mutating the key will likely invalidate internal invariants.
 

Comment 1 by brettw@chromium.org, May 18 2017

Yeah, I tried implementing this a month or so ago but I found it broke some obvious use-cases and I didn't know how to solve them. If somebody can figure out how to make this work without needing to rewrite the syntax in all the unit tests that would be great.

Comment 2 by dcheng@chromium.org, May 19 2017

Cc: dcheng@chromium.org
What sort of obvious use cases did it break?

Comment 3 by brettw@chromium.org, May 19 2017

If I recall it was something like the constructors in the unit tests that do foo = { {1, 2}, {3, 4} }.

Sign in to add a comment