Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-15 08:44:21

From: "Philippe A. Bouchard" <philippeb_at_[hidden]>

> Here is ptr<> nearly fully portable:
> Now:
> - 5.7.6 footer 21:
> "Another way to approach pointer arithmetic is first to convert the
> pointer(s) to character pointer(s): In this scheme the integral value of
> the expression added to or subtracted from the converted pointer is first
> multiplied by the size of the object originally pointed to, and the
> resulting pointer is converted back to the original type. For pointer
> subtraction, the result of the difference between the character pointers
> similarly divided by the size of the object originally pointed to."
> therefore class offset is perfectly legal.

1. Footnotes are "non-normative", so it doesn't mean anything
2. Even if footnotes weren't "non-normative", the above wouldn't prove
anything, since there's no "pointer arithmetic" involved in converting
between pointer-to-derived and pointer-to-base

           David Abrahams * Boost Consulting
dave_at_[hidden] *

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