|
Boost : |
Subject: Re: [boost] [contract] move operations and class invariants
From: Peter Dimov (lists_at_[hidden])
Date: 2017-12-01 02:10:58
Lorenzo Caminiti wrote:
> 2. How useful is a class like the one above with "crippled" invariants and
> is_valid() preconditions on all its useful public methods like read()?
A read() member that takes no arguments and returns void is not very
realistic. read() can fail, so you can drop its "valid" precondition and
just fail when the handle is invalid.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk