
Since I haven't heard any more conversation about this, would it be alright to add Frank's implementation below to ref.hpp? Is anything more needed? ron On May 17, 2008, at 9:28 PM, Frank Mori Hess wrote:
On Friday 16 May 2008 22:01, Ronald Garcia wrote:
Something like the following:
template< typename F > inline F& unwrap(F& f) { return f; }
template< typename F > inline F& unwrap(reference_wrapper<F>& f) { return f; }
template< typename F > inline F& unwrap(reference_wrapper<F> const& f) { return f; }
Couldn't you do a little better (half the number of overloads) by using boost::unwrap_reference for the return type? For example,
template<typename F> boost::unwrap_reference<F>::type& unwrap(F &f) { return f; }
-- Frank
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/ listinfo.cgi/boost