
11 Jan
2012
11 Jan
'12
4:59 p.m.
Den 11-01-2012 06:23, John M. Dlugosz skrev:
Consider something like this:
themap_type::iterator search_for (int val) { return boost::find_if (themap|map_values, my_predicate(val)); }
[snip]
auto it2= boost::find_if (themap|map_values, my_predicate(val)); if (it2 == themap::end()) // same problem!
As stated, iter.base() should work. That said, it is still somewhat of a usability problem. We should seriously consider to add A. an implicit conversion operator to the underlying iterator (explicit in C++0x) B. overloaded comparison opearators between iterators and wrapped iterators. -Thorsten