Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-18 12:56:56


Phil Bouchard wrote:
>>> - I have changed the code for the following:
>>> ((T *)(alignment_of<detail::max_align>::value)->* q)
>> How is that better?
> Well I anticipate certain compilers will report a warning or even an error
> when faced with a null pointer being dereferenced.

Which compilers? IMO, you shouldn't make the code even more obscure until
it's known for certain to be a problem.

> This address dissosiates
> the pointer from an undefined behavior and is aligned for all types.

"If the dynamic type of the object does not contain the member to which
the pointer refers, the behavior is

In Christ,
Steven Watanabe

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