This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] Simplifying <algorithm>: Part 2
Paolo Carlini wrote:
... another observation: we are missing a couple of stl_algobase.h
bits (min, max)
right?
Yep, and also some functions in stl_heap.h (make_heap, pop_heap, etc.).
this is not yet the end :) but I decided to ship some things, just in
case I was doing something horribly wrong :)
One further change I intend to make to stl_algo.h (after some benchmark
testing I'm undertaking at the moment) is possibly merging those
funtions which take either a value OR a comparison operator, by
something like (WARNING: horrible code ahead)
template<class T>
struct object_equal
{
T& obj;
object_equal(T& _obj) : obj(_obj) {}
operator()(T& in) { return in == obj; }
};
Although obviously such things would require some careful benchmarking
(in particular I can't see why this would generate alising problems, but
I should check)...
Chris