Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-10-17 06:28:49


>Where? The type_traits.htm file merely says "True if T is a regular
>pointer type - including function pointers - but excluding pointers to
>member functions (3.9.2 p1 and 8.3.1)." This might be sort of clear if
>"Regular pointers" were defined by the standard, but they're not. As far
>as I'm concerned a char* const *is* a regular pointer.

At the start of the table:

"Compound Types
The following will only ever be true for cv-unqualified types, as defined
by the Standard."

Ok not heavily emphasised I admit.

BTW when we were thrashing this out, I originally held the position that
you do now (that a cv-qualified pointer is a pointer) but was persuaded
otherwise. I guess you could say that this is a tough one for me to argue

However - changing it now requires a big change (more or less a complete
rewrite) of many of the classes in the header, this is not just an
is_pointer issue. I am now more or less convinced by Steve Cleary's
argument: arithmetic types, pointers, arrays and references, are defined
first as non-cv-qualified types. The notion of cv-qualification comes
later. Finally a cv-qualified int is not an int (for example you can not
assign an integral expression to it if it is const-qualified), types that
are cv-qualified in general require special handling, I think that it is
defensible to exclude these by default.

- John.

Boost list run by bdawes at, gregod at, cpdaniel at, john at