[patch] : more delegation in stl_algo.h
Chris Jefferson
caj@cs.york.ac.uk
Wed Mar 9 01:03:00 GMT 2005
For those interested, the reason why I couldn't use the existing bind2nd
is that it assumes you inherit from binary_function or at least define
various typedefs. We I think shouldn't start assuming now user code does
this, and also such things aren't compatable with clever templated
operator()s , like we already added!
Apart from that, this patch is hopefully mostly fairly obvious, with the
exception that replace_copy of used to have a construct "z = p ? x : y"
which I've replaced with "if(z) p=x else p=y", as in theory x and y can
be of different types, neither convertable to the other but both
convertable to typeof(z).
Previously mentioned optimisations to search and search_n will follow
shortly once I can figure out why they don't seem to be working :)
Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050309/65deccaa/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patchfile
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050309/65deccaa/attachment-0001.ksh>
More information about the Libstdc++
mailing list