NotNull pointers
Daniel Murphy
yebblies at nospamgmail.com
Wed Aug 31 08:15:22 PDT 2011
"Iain Buclaw" <ibuclaw at ubuntu.com> wrote in message
news:j3kmih$2g4m$1 at digitalmars.com...
> You should be able to do it with less changes than that. :~)
>
=/
It's really about 8 lines of code. The rest is all whitespace/alignment
changes from making the assert/message generation unconditional.
> In GDC I settled with assert(e1 != null ? e1.invariant() : _d_assert(...))
>
dmd was using "e || __assert(msg)", so I used "auto tmp = e, tmp ||
__assert(msg), tmp.__invariant"
More information about the Digitalmars-d
mailing list