
Jordan Chavez wrote:
I was fiddling around with the type traits library today and I found that is_pointer<> is false for const function pointers:
bool b = boost::is_pointer<void (*)()>::value; // true b = boost::is_pointer<void (*const)()>::value; // false
I also tried with a variety of other function pointer signatures, all const versions were not considered pointers. The compiler I'm using is MSVC 7.1 and I haven't tested this on any other platforms. From reading the source I have no idea why this happens...is_pointer is explicitly specialized for const pointer types so maybe it's a compiler issue, but I haven't checked.
Sorry for the delay in getting back to you, yes it should work as you suggest, and does with gcc-3.4.4, but not with VC7.1 or VC8. I don't really have a fix either, so suggestions welcome :-) John.