Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-08-01 06:18:26


At 02:01 PM 7/31/2002, Keith Burton wrote:

>Operations documentation
>"
>remove
>void remove( const path & ph );
>
>Postcondition: !exists( ph )
>
>Throws: if !exists(ph) || !is_empty(ph)
>"
>
>the throw specification needs amplification and correction :
>
>Throws : pre-condition : if ( ! exists( ph ) || ( is_directory( ph ) &&
>! is_empty( ph ) ) )
> : post-condition : if ( exists( ph ) )

Fixed. Thanks!

>Incidentally , I do not believe that remove should throw if ! exists( ph
>).
>My rationale being the ones who care can use exists( ph ) before and
>those who do not get least surprise.

The remove_all function can be used if unconditional semantics are
required.

Thanks,

--Beman


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