Boost logo

Boost Users :

Subject: Re: [Boost-users] boost solution for transforming stl algorithms on proxy iterators?
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2012-10-16 09:02:23


Hi,

> You should be able to equally well use zip_iterator's, or, if
> supported by Boost.Range, something like a make_zip_range.
zip_iterators are AFAIK not even writeable. At least i remember a
discussion about this issue. Also, zip iterators use tuples which are
compared lexicographically, which is not what i want. The third thing
was, that i would like more meaningful member names than get<0> and
get<1> or first/second. so my strcture uses instead key/value

> Hmmm...how is this resolved in C++11? AFAIK, C++11 still uses the old
> archaic
> iterator categories and requires a real C++ reference as the
> reference type of forward iterators.
Okay, than it is not resolved :-(.

> I agree, this is a deficiency in the standard. Unfortunately, maybe
> the only thing you can do to guarantee
> this works in a portable way is to code up your own introsort [1]
> implementation :/
and unfortunately, sort is not the only algorithm required...partition,
stable_partition, random_shuffle...*sigh*
maybe i can implement partition/stable partition and use this for a
sort? at least in my use case this should be a good solution...

Greetings,
Oswin


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net