Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] Review Request
From: Phil Bouchard (philippe_at_[hidden])
Date: 2011-05-02 15:19:59


On 5/2/2011 10:54 AM, Emil Dotchevski wrote:
>
> Yes but how do I know not to dereference it? Dereferencing a null
> pointer is still undefined behavior.

I was referring to the implicit destruction mechanism; the block_ptr
will not be implicitly dereferenced if its pointee is already destroyed.

If the pointer is explicitly dereferenced in the destructor then this
will cause undefined behavior.

-Phil


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