Date: 2000-01-15 15:05:08
Jim Argeropoulos writes:
> First and most important to me, it doesn't solve the problem of comparing by
> more than one attribute. You can't chain multiple calls to compose_f_gx_hy()
> with logical_and or logical_or because they require the same type.
This is the fault of the definition of
logical_and/logical_not. Actually, most of std functors have this
problem, I agree it is annoying. Perhaps the thing to do is create
versions of the std functors that allow the operands to be different
> Second, few practicing programmers are going to figure it out. If we call it
> a solution I would like to see some helper functions for it. Of the 30
> programmers I work with I would only expect one other to ever figure out how
> to put compose_f_gx_hy() to use on their own. Its just too abstract for
> them. Maybe in a few years, but not today. Those who partake in this mailing
> list think at a different level than the average programmer.
You have a good point. The right implementation approach would be to
use the compose library to implement your library. A few typedefs and
some small functions would be all that it would take. Also such
an implementation would be a good resource for people to look at and
learn about programming with functors.
PS. BTW, which compiler do you use?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk