|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-12-09 07:44:43
>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.
Surely one can call_traits the return value as well?
template <class T>
struct identity
{
typedef call_traits<T>::param_type param_type;
param_type operator()(param_type p)const { return p; }
};
- 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