|
Boost Users : |
Subject: Re: [Boost-users] [result_of] member function
From: er (erwann.rogard_at_[hidden])
Date: 2009-02-28 21:02:12
Steven Watanabe wrote:
> AMDG
>
> er wrote:
>> Is this feasible? How?
>>
>> class Foo
>> {
>> template<typename Signature>
>> struct result{};
>>
>> template<typename F>
>> struct result<(F::*f)(value_type)>{
>> typedef
>> value0_type if f == foo,
>> value1_type if f == bar type;
>> };
>>
>> value0_type foo(value_type);
>> value1_type bar(value_type);
>>
>> };
>>
>> How do I invoke result_of to get the result type of F::foo(value_type)?
>
> This is not what boost::result_of is for.
>
> In Christ,
> Steven Watanabe
Thak you for your answer. I was probably misinterpreting the part that reads
The implementation permits the type F to be a function pointer, function
reference, member function pointer, or class type.
in the doc of result_of. Is someone aware of an example that illustrates
the "member function pointer" part?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net