In
https://codereview.chromium.org/2379863002/#ps100001, some linux builds fail when I pass a const_iterator to vector::erase. That should be allowed in C++11 (and win/mac are OK with it) but linux is unhappy:
../../ui/base/models/tree_node_model.h:96:15: error: no matching member function for call to 'erase'
children_.erase(i);
~~~~~~~~~~^~~~~
../../ui/base/models/tree_node_model_unittest.cc:276:39: note: in instantiation of member function 'ui::TreeNode<ui::TreeNodeWithValue<int> >::Remove' requested here
std::unique_ptr<TestNode> c2 = root.Remove(child2);
^
../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:986:7: note: candidate function not viable: no known conversion from '__normal_iterator<const std::unique_ptr<ui::TreeNodeWithValue<int>, std::default_delete<ui::TreeNodeWithValue<int> > > *, [...]>' to '__normal_iterator<pointer, [...]>' for 1st argument
erase(iterator __position);
^
../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:1007:7: note: candidate function not viable: requires 2 arguments, but 1 was provided
erase(iterator __first, iterator __last);
:/ Wanted to keep you informed; will work around it.
Avi