Boost logo

Boost :

From: Mark Rodgers (mark.rodgers_at_[hidden])
Date: 2001-12-08 10:01:12


From: "Peter Dimov" <pdimov_at_[hidden]>
> > identity
> > project1st
> > project2nd
> > select1st
> > select2nd
>
> call_trait-izing these has the unfortunate side effect of always returning
> by value. I think that the pass by const ref, return by const ref approach
> might be preferable.

I see your point. OTOH I do want identity<const int&>(), etc to be able
to work, which it wouldn't if we pass by const T&. Perhaps the answer is
to return call_traits<T>::param_type. I'll need to think about this some
more.

Mark


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