Boost logo

Boost :

Subject: Re: [boost] Does boost help in creating generic function wrappers?
From: Andy Venikov (avenikov_at_[hidden])
Date: 2010-07-16 11:57:15


Daniel Walker wrote:
> On Thu, Jul 15, 2010 at 4:52 PM, Andy Venikov <avenikov_at_[hidden]> wrote:
>> BTW, defining result<> seems to be not necessary, but I think it's a good
>> idea to have it.
>>
>
> Are you sure you're actually calling the function_adaptor object? The
> result member is necessary as soon as boost::result_of is
> instantiated, which happens when you invoke the function_adaptor's
> call operator.
>
> Also, you may be interested in an upcoming new feature. When Boost
> 1.44 is released you will no longer need to define result if your
> compiler supports C++0x decltype. To enable this new feature define
> BOOST_RESULT_OF_USE_DECLTYPE before including
> boost/utility/result_of.hpp.
>
> Daniel Walker

You're right, it is necessary. I just took result<> out and sure enough
I get a compiler error inside result_of. I really don't know why I
thought yesterday that it compiled fine. Man, too many errors for a test
program... :-(

Thanks,
     Andy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk