|
Boost : |
Subject: Re: [boost] [iterator] why isn't there a mapped_type iterator adaptor in boost?
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2010-05-15 16:31:28
Mostafa wrote:
> any_iterator<...> it_any = my_mapped_type_iterator_adaptor(map_instance.begin());
> How
> would I go about doing that with
> ranges?
Something like this (untested):
boost::iterator_range< any_iterator<...> > range_any =
boost::make_iterator_range( map_instance | boost::adaptors::map_values );
Simply
boost::iterator_range< any_iterator<...> > range_any = map_instance | boost::adaptors::map_values;
might work just as well, but I am not sure.
> Thanks,
> -Mostafa
HTH,
Gevorg
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk