Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-01-23 13:16:14


On Wednesday 23 January 2002 01:05 pm, you wrote:
> Ah good, that avoids using inheritance to distinguish these babies...
> but is char really guaranteed to be smaller than double (half-joking only).
>
> -Dave

It would be a fun exercise to construct a target platform to test all these
whacky possibilities. Make the null pointer not be represented all zeros,
have sizeof(double) == sizeof(char), sizeof(function pointer) != sizeof(data
pointer), etc.

BTW, type_traits also makes the assumption that sizeof(char) !=
sizeof(double). We could just change it to:

typedef char yes_type[2];
typedef char no_type[1];

        Doug


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