Boost logo

Boost :

From: Mark Rodgers (mark.rodgers_at_[hidden])
Date: 2001-08-25 15:44:01


[Apologies for the delay in responding - I've been on holiday]

> I'm now convinced that your original idea - having functional.hpp
> include mem_fun.hpp - is the best solution.

Yes, I think that is probably best if we can reconcile our differences.

Given your analysis of compiler compatibility and compile times, I
personally don't think that is a major issue, but I would be interested
to hear from others on that.

The other issue is use of call_traits instead of simple pass by value.
I refuse to budge on this. The call_traits documentation says param_type
'Defines a type that represents the "best" way to pass a parameter of
type T to a function.' I absolutely insist that we use this "best" way.
If passing a double by value is best, I hope call_traits will define
param_type accordingly on those platforms. If it doesn't then that's a
bug in call_traits, not functional.

I would also comment that passing an expensive-to-copy object by value is
not necessarily completely unheard of. If I need to make a mutable copy
for some reason, I will usually write

   void f( BigObject b ) { /* modify b */ }

rather than

   void f( const BigObject &b ) { BigObject bb(b); /* modify bb */ }

Mark


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk