
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

On Aug 10, 2007, at 8:42 PM, shunsuke wrote:
See http://lists.boost.org/Archives/boost/2007/05/122004.php - Doug

Doug Gregor wrote:
See http://lists.boost.org/Archives/boost/2007/05/122004.php
That seems not to tell the reason why it is void, but the reason why it has the default type. template<typename F> struct error_this_is_not_a_nullary_function; too seems to work instead of void. Regards, -- Shunsuke Sogame
participants (2)
-
Doug Gregor
-
shunsuke