This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Implementing normal algorithms using predicate versions
- From: caj <caj at cs dot york dot ac dot uk>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sun, 28 Nov 2004 15:00:31 +0000
- Subject: Implementing normal algorithms using predicate versions
Hi!
I apologise, as I'm sure this question has a simple answer, but I can't
find it...
Many algorithms have a predicated version, and a version which simply
uses operator<. Why not implement the operator< versions using the
predicated versions? This would seem to half the size of the algorithm
heaader, remove lots of redundant code, and on -O2 seems to produce
identical code...
Chris