assert(object) fails to adhere to the principle of least surprise
Bernard Helyer
b.helyer at gmail.com
Sat Jan 29 04:18:38 PST 2011
Further correction.
On Sat, 29 Jan 2011 12:09:41 +0000, Bernard Helyer wrote:
>> FWIW, GDC doesn't do the rewrite,
>
> On structs, it does the rewrite on class instances (boo!).
It checks for null then checks the invariant.
I think that's a good compromise, given that an object without an
invariant passes the assert.
More information about the Digitalmars-d
mailing list