Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-07-01 06:22:15


alnsn_at_[hidden] wrote:
> David Abrahams wrote:
>> Maybe you should show an example of code where the use of ref/cref
>> causes a problem.
>
> using namespace std;
> using namespace boost;
>
> template<class T>
> reference_wrapper<T const> head(vector<T> const& v)
> {
> return cref(v[0]); // binds with temporary if T == bool
> }

return ref( v[0] ); // ?


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