Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-01-05 12:17:24

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.

That's a pointer-to-function type, not a function type. Try


I know it's confusing. Most C++ programmers never see a function type
in the wild. You can use remove_pointer to turn a pointer-to-function
into a function.

Dave Abrahams
Boost Consulting

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at