Boost logo

Boost :

From: Jordan Chavez (jchavez_at_[hidden])
Date: 2006-05-09 06:42:39


Hi,

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.

Thanks,
Jordan Chavez
jchavez_at_[hidden]


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