Boost logo

Boost :

Subject: Re: [boost] "peer reviewed" - Rights and responsibilities of maintainers
From: Peter Dimov (lists_at_[hidden])
Date: 2018-10-17 00:22:44


Gavin Lambert wrote:

> Conceptually "is_destroyed" is usually a bad idea. By definition, after
> the destructor has run the memory is free to get stomped on by other
> objects and thus you can't rely on is_destroyed to return any particular
> value. Trying to rely on it is UB.

It would be undefined to access the "is_destroyed" bool if it were a member
of the singleton, but it's a function local static in Alexander's code, and
it looks OK to me in that formulation. Static bools are never destroyed.


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