Boost logo

Boost :

Subject: [boost] [ref] provide unref( T& )?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-12-11 05:18:04


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

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?


Boost list run by bdawes at, gregod at, cpdaniel at, john at