Out contracts: how to refer to objects' start state
Peter Williams
pwil3058 at bigpond.net.au
Sat May 25 17:38:36 PDT 2013
For some class methods, to express comprehensive out{} contracts it is
necessary to be able to refer to the state of the class object before
the operation as well as after it e.g. if the method adds something to a
container you need to be able to specify that nothing was accidentally
deleted from the container during the method. I've scoured the language
specification and Andrei's book for advice on how to do this without any
luck.
Can it be done and, if so, how?
Thanks
Peter
More information about the Digitalmars-d
mailing list