From: Darren Cook (darren_at_[hidden])
Date: 2004-01-03 21:36:53
In this code:
it always returns 1 when it should return 2, and this is because the functor
is being copied rather than passed by reference.
Is there a reason it is copied? Is passing functors by reference a Bad
Thing, and if so could someone point me to an article or discussion summary
In the above case I'm passing in a "this" pointer, so I'll just move
"has_errors" from the functor into the client class. But this is nearly as
ugly as using a global variable: the variable will only ever be set by the
functor, and only ever read by this block of code.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk