
Terry Golubiewski schrieb:
How? I read the docs you referenced (previously), but I did not see a concrete example.
i thought it was straightforward, but looking into details it was not the right reference. =-O However, below is a solution which relies on BOOST_TYPEOF. BOOST_TYPEOF will have a problem if the return_type is void. So i replace it with mpl::void_.
typedef typename boost::result_of< ...what goes here???... (double)>::type f_double_return_type;
terry
HTH
Kim
# include
::type deduce_type(return_type (X::*)(Param));
typedef BOOST_TYPEOF(deduce_type<char>(&X::f)) void_;
typedef BOOST_TYPEOF(deduce_type<int>(&X::f)) int_;
typedef BOOST_TYPEOF(deduce_type<double>(&X::f)) double_;
int main() {
BOOST_MPL_ASSERT((boost::is_same