$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Boost.Algorithm design question
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-10-31 11:56:05
on Mon Oct 31 2011, "Peter Dimov" <pdimov-AT-pdimov.com> wrote:
> Dave Abrahams wrote:
>> I think you're missing the point, which is:
>
>>
>>   When the specification for an algorithm exposes the actual expressions
>>   used in a given implementation of an algorithm, it tends to lock down
>>   the implementation in ways that don't necessarily make sense (and can
>>   prevent optimizations).  Tiny details that one usually doesn't
>>   consider, like whether part of the expression is an lvalue or an
>>   rvalue, const or non-const, become encoded into the specification of
>>   the algorithm.
>
> None of this has anything to do with the fact that you want to require
> operator== to be an equivalence relation, and it doesn't have to be. 
Again, missing my point.
I long ago stipulated that this algorithm could be useful even in places
where op== is not an equivalence relation, and that it was desirable to
support those uses.  My instinct to require equivalence was part of a
reaction against writing the algorithm's specification in terms of valid
expressions.  I think such specifications need to be given scrutiny than
they have been, historically.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com