|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-08-01 10:53:53
At 04:23 AM 8/1/2002, Mattias Flodin wrote:
>> ( This being much preferable to an attempt to avoid the exception by
>> doing if ( exists( ph ) ) remove( ph ) ; and the post condition not
>> being true )
>
>This kind of code is dangerous because the two subexpressions of the
>condition are not evaluated in one atomic operation. Perhaps the
>documentation should mention this, to prevent people from trying it.
>exists() must be true at the point of calling remove(), not 0.5
>nanoseconds before.
That's what index.htm#Dangers was supposed to explain.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk