Boost logo

Boost :

From: Phil Bouchard (philippe_at_[hidden])
Date: 2008-06-06 04:05:42

"Simonson, Lucanus J" <lucanus.j.simonson_at_[hidden]> wrote in message


> Pointers are certainly not guaranteed to be the same width as int by the
> standard. The standard doesn't get to say anything about the size of
> the built-in types, which may differ by hardware and compiler flags.
> void * p = ordered_malloc(s);
> get()->push_back(numeric::interval<int>((int) p, int((char *)(p) + s)));
> There are many platforms in which int is not the same number of bytes as
> a pointer. Most commonly such casts will cause code to fail to port to
> 64 bit platforms.


Indeed I think I forgot to delete that sentence before posting because there
is no such integral promotion of pointer types.


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