Angus Leeming
David Abrahams wrote:
Why struggle?
boost::transform_iterator should give you just what you need:
Many thanks, David.
That's altogether much nicer. However, result_of is not part of boost 1.31. Attached is an implementation of my code that works fine with 1.31. Unfortunately, I can't create a 'const_first_iterator' from a 'first_iterator'. Ie, I need:
store my_store; store const & my_const_store = my_store; // UGLY! store::const_first_iterator const begin = my_const_store.begin_first(); store::const_first_iterator const end = my_const_store.end_first();
Any further clues, or is this as far as I can go this way?
See the converting constructor described at http://tinyurl.com/229ld#transform-iterator-synopsis. As long as the underlying iterators and unaryfunctions are convertible, the initialization should work just fine.
Angus
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com