Boost logo

Boost :

From: yahoo_at_[hidden]
Date: 2001-08-28 07:48:12

--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> I can't use call_traits; using call_traits changes the semantics of
the call
> thanks to that wonderful invention called std::auto_ptr. ;-) The
> should not specify optimizations, only behavior.

If I am not misunderstanding, the problem with using
boost::call_traits<>::param_type is that classes with "move"
 semantics instead of copy (for example the infamous std::auto_ptr<>)
fail when used as argument.
Could it be considered that boost::mem_fun<> is right in its aim
for efficiency, that boost::call_traits<>::param_type should take into
account a bool is_copy_safe<> set to true by default and false for
std::auto_ptr<> and the like ...

I do think that call_traits is great, and use it all the time
(I can type boost::call_traits<>::param_type faster that typedef
typename !!), but maybe "best" way to pass parameter is a bit ambitious
I'd call it cheapest way :-)


Boost list run by bdawes at, gregod at, cpdaniel at, john at