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
news:33E1C72C74DBE747B7B59C1740F7443703592F5F_at_orsmsx417.amr.corp.intel.com...

[...]

> 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.

-Phil


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