
3 Nov
2007
3 Nov
'07
10:35 p.m.
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.