$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] How to deduce (possibly void) return type of member function?
From: Terry Golubiewski (tjgolubi_at_[hidden])
Date: 2010-05-22 11:31:18
How?  I read the docs you referenced (previously), but I did not see a 
concrete example.
typedef typename boost::result_of< ...what goes here???... (double)>::type 
f_double_return_type;
terry
----- Original Message ----- 
From: "Kim Kuen Tang" <kuentang_at_[hidden]>
Newsgroups: gmane.comp.lib.boost.user
To: <boost-users_at_[hidden]>
Sent: Saturday, May 22, 2010 10:15 AM
Subject: Re: How to deduce (possibly void) return type of member function?
> Hi Terry,
>
> Terry Golubiewski schrieb:
>> If I have a class...
>>
>> struct X {
>>  int f(double x);
>>  void f(int y);
>> };
>>
>> .... and a template Y that wants to deduce the return-type of some member 
>> functions of T...
>>
>> template<class T>
>> struct Y {
>>  typedef typename what_goes_here<T>::type f_double_return_type;
>>  typedef typename what_goes here<T>::type f_int_return_type;
>> };
>
> you should use boost::result_of to do such of things.