|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-09-01 05:33:21
>I don't believe that optimizations - such as using
call_traits<>::param_type - should be part of the interface. As long as the
'effects' are the same, the implementor is free to use whatever tools are
available to him/her to improve the efficiency of the implementation.
<
Which is surely the core of the issue - the intent is that
call_traits<>::param_type is just "one of the tools that the implementor
uses to improve the efficiency of the implementation", it isn't supposed to
alter semantics at all, if it does then it's a defect.
Now we were happy that everything was OK, and then along came auto_ptr (and
surely we're not the first to be tripped by that one!), the question is how
to fix that...
>I've outlined something close to a rationale for this decision in a
previous
>post. Basically, in the absence of information about which method for
>parameter passing is 'best', it's reasonable to choose the const
reference.
>In these cases, however, we do have information which method has been
chosen
>by the function designer, so it's reasonable to use it.
My point was that mem_fun/ptr_fun and bind_1st all have the same
information available to them (how the underlying function takes it's
args), but they do different things. Whatever there's not much we can do
about that other than shrug I guess :-)
Whatever,as I said, I'm sure you want to get this out the door, so do
whatever you think is best.
- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk