Boost Users :
From: Howard Hinnant (hinnant_at_[hidden])
Date: 2005-01-05 12:55:16
On Jan 5, 2005, at 11:12 AM, Kevin Lee wrote:
> should the following code return: true or false?
> boost::is_function<int (*)(int)>::value
> if the result is false, why? I don't understand it.
> if the result is true, the code of
> boost_1_32_0/libs/type_traits/test/is_function_test.cpp line 42 expect
> to be false.
> could someone help me with this?
int (*)(int) is a pointer, not a function.
boost::is_pointer<int (*)(int)>::value should be true. Also
is_function<int (int)>::value should be true. And
is_function<:remove_pointer<int (*)(int)>::type>::value should also be
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net