thanks for the code on class invariant..
but that got another question into my head. (i guess i just can't stop asking dumb questions)..
i felt that your class invariant code was very dependant on assertions. if assertions were disabled then all the checking for data state consistency would be lost. is that not required during the normal working of the code and not only during debugging?
if yes then your earlier statement of assertions only for debugging is not so assertive!