
Daniel Walker wrote:
On Thu, Jul 15, 2010 at 4:52 PM, Andy Venikov <avenikov@gmail.com> 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.