|
Boost : |
From: Vladimir Frolov (voidbent_at_[hidden])
Date: 2006-06-05 10:32:00
Sebastian Redl <sebastian.redl_at_[hidden]> wrote:
> If this is implemented as I guess it is, you might also suffer from the
> not clearly defined temporary destruction semantics.
I think that concept of accessors will work correctly with any
optimization of temporary object returning.
In case if no optimization applied copy constructor will be invoked
(maybe even several times) but recursive mutex will handle this
situation. In case if any optimization applied compiler will destroy
any object after it becomes inaccessible (just after expression where
temporary object is created and used). So we have only two kinds of
situations: either we have some accessor object (it can be temporary,
automatic, dynamic or any other) resource is locked and we can access
it, or we have no accessor objects, resource is unlocked and we can
access it only by creation accessor. Am I right or it is possible on a
single compiler that some object destroys not exactly after it becomes
inaccessible?
--- With respect, Vladimir Frolov
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk