
1 Jul
2004
1 Jul
'04
11:22 a.m.
alnsn@yandex.ru 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] ); // ?