From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-03-01 09:23:59
Andy Little wrote:
> "Jonathan Turkanis" <technews_at_[hidden]> wrote in message
>>Andy Little wrote:
>>>>From what I have seen its very cool. :-)
Glad you like it !
>>>How does this play with boost::result_of. Is there any potential to
>>>extend result_of by this?
>>result_of should already get the right answers for these types.
There's a different intention behind result_of (as it detects the result
of a Functor concept, given that functor classes have a result_type member.
This library, in contrast, is about working with function types (making
it work on functors would be in some ways similar to making
remove_pointer work on smart pointers).
This library (once it is in stable state) could be used to implement
result_of, I believe.
> #include <iostream>
> #include "boost/utility/result_of.hpp" // v 1.32.0
> // BTW following requires #include
> #include "boost/function_types/function_type_result.hpp"
Oh nice, another typo. Fixed, now - thanks for detecting !
this line: using function_types::function_type_parameter;
should be: using function_types::function_type_result;
Assumed the bug above is fixed, this code should compile:
typedef int (*f)(int); // result_of needs ref/ptr to function to work
using namespace boost;
, result_of< f(int) >::type // see http://www.tinyurl.com/6a87k
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk