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] ); // ?