|
Boost : |
Subject: Re: [boost] [Iterator][MultiIndex]iterator-specificpartition_point-relatedfunctions
From: David Abrahams (dave_at_[hidden])
Date: 2008-12-26 21:03:52
on Fri Dec 26 2008, Arno Schödl <aschoedl-AT-think-cell.com> wrote:
>> > The counting_iterator example above shows that people may want to,
>> > for special cases and not inside a library, but as an optimization
>> > for their special iterator implementation. It feels funny to me to
>> > use different techniques for different functions. And you pay the
>> > overhead of boost::bind for any call to lower_bound, customized or
>> > not. I am willing to do it, though, if that's what you prefer.
>
>> You don't have to use boost::bind. Just use the standard binders.
>
> Are they preferable over boost/std::bind if the extra functionality of
> more general boost/std::bind is not needed?
If you don't want to pay the compilation overhead of boost::bind, then
yes. ?? You're the one who brought that up.
> I think one of my functors worked with boost::bind, but didn't with
> std::bind1st/2nd. Maybe some typedef was missing? I have to look.
>
>> Furthermore, if you publish the type of the function object used, people
>> can still customize all of those individual variants if they're crazy
>> enough to want to do that.
>
> I don't understand what you mean.
The customizer simply writes a partition_point overload where the
function object type is specific, e.g. something like
binder2nd<std::less<T>, T> (I forget the real signatures)
> O.k., I am happy we finally have agreement:-) I will send out the new version. Do you
> want to include it into Boost.Iterator (my preference), or as a separate library?
I'm sorry, but what component(s) are you proposing should be included
into Boost.Iterator? Not the default partition_point,
boost::lower_bound, et. al.?
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk