Boost logo

Boost :

From: Yariv Tal (yariv_tal2003_at_[hidden])
Date: 2005-04-18 02:20:44

Hi Victor,

as you wrote:
"Victor A. Wagner Jr." <vawjr_at_[hidden]> wrote in message
> I assumed (dangerous, I know) that NO post conditions would be tested on
> exception but those explicitly done in the exception stuff. (maybe they
> will be if NO exception conditions are mentioned? like a default
> constructor being built by the compiler).
You are right.
If an exception occurs NO post conditions are tested.
If you want a condition to be tested when an exception is thrown, define an
(I find this useful for testing that the object was not changed = the strong
exception guarentee).

By the way, I use the EXCEPtTIONAL condition as a technique to ensure that
no exception is thrown
(this can be useful if a method's interface allows throwing but you are sure
that your current implementation
does not throw):
EXCEPTIONAL(lambda::constant(false)); // this will always fail if an
exception is thrown

Hope that clarifies things for you.


Boost list run by bdawes at, gregod at, cpdaniel at, john at