Implementing normal algorithms using predicate versions

Paolo Carlini pcarlini@suse.de
Sun Nov 28 16:08:00 GMT 2004


chris wrote:

> I was intending on using something like (warning: away from C++ 
> compiler, I haven't even compiled this code!)
>
> template<typename __T1, typename __T2>
> struct __default_predicate {
> bool
> operator()(const __T1& __t1, const __T2& __t2) { return __t1<__t2;}
> };

Ah, yes, this - or slight variations - look good. Maybe we should 
discuss a bit
more the optimization thing and then, possibly, actually implement the idea
in v7... :)

Thanks,
Paolo.



More information about the Libstdc++ mailing list