|
Boost : |
From: Dan W. (danw_at_[hidden])
Date: 2004-01-03 23:14:21
Jeremy Maitin-Shepard wrote:
>>>>And if, technically, I might have just given you a document extracted
>>>>from my cpp file that contains them, is your compiler able to read this
>>>>document to verify contract correctness?
>>>the compiler should be able to read the ojbect files.
>>No, the contracts cannot be in the object file. How would your linker be able to
>>remove them when building your final app?
> There could be two versions of the object files, i.e. a debug version
> and a non-debug version.
Very true. There could be.
Next question: what happens when you're debugging your code, with the
debug version of my object code, and your code accesses my precondition
or postcondition? Suddenly you find yourself in a sea of assembler
instructions, and trying to tell what line of my beautiful, but separate
document you're looking at...
And I no longer remember what the original issue was, against having
preconditions and postconditions in the header file...
Oh, yeah, I remember now: It would add lines to the header file.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk