Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-11-03 18:35:55

Sebastian Redl:

>> and the standard requires a reinterpret_cast to yield a pointer to the
>> first
>> element (9.2/17).
> The standard says no such thing. It speaks of a pointer "suitably
> converted". It doesn't say that reinterpret_cast is such a suitable
> conversion; in fact, the definition of reinterpret_cast itself makes it
> very clear that it is not.

The sentence is

A pointer to a POD-struct object, suitably converted using a
reinterpret_cast, points to its initial member (or if that member is a
bit-field, then to the unit in which it resides) and vice versa.

Note the "using a reinterpret_cast" part that immediately follows the
"suitably converted" part.

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