Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-08-10 20:42:10


Hi,

I hope this is the last question about result_of.

I want to know the reason why result_of<F()>::type returns void by default
instead of an incomplete type like

  template<typename F>
  struct error_this_is_not_a_nullary_function;

which could make error message more readable.

I found the one reason: The function composition.
result_of<F(result_of<G()>::type)>::type is always well-formed
unless result_of<A_NonNullary_Function()> is specialized for some reason.

Was result_of designed with a view to the function composition?

Regards,

-- 
Shunsuke Sogame

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