
21 Aug
2009
21 Aug
'09
2:32 p.m.
AMDG Frank Mori Hess wrote:
On Friday 21 August 2009, Edward Grace wrote:
boost::result_of<O()>::type
I don't have experience with boost::result_of, but is it right to add parenthesis? That looks to me like you are asking for the return type of a function type that takes no arguments and returns an object of type O.
This use of result_of is correct. result_of is designed to handle polymorphic function objects which can have a different return type depending on the arguments. boost::result_of<F()>::type means the result of calling an object of type F with no arguments. boost::result_of<F(int)> means the result of calling an object of type F with an int argument. In Christ, Steven Watanabe