
11 Dec
2008
11 Dec
'08
10:18 a.m.
Hi, To be able to call a function object wrapped in boost::reference_wrapper<T>, we need something like the following: template< class T > inline typename boost::unwrap_reference<T>::type& unref( T& value ) { return static_cast<typename boost::unwrap_reference<Fun>::type&>(value); } which can then be used like template< class Fun > int algorithm( Fun fun ) { return unref(fun)(42); } any objections to adding this to ref.hpp? -Thorsten