Disallow side effects in assert
Marco Leise
Marco.Leise at gmx.de
Tue Feb 4 17:35:59 PST 2014
Am Tue, 04 Feb 2014 22:38:43 +0000
schrieb "bearophile" <bearophileHUGS at lycos.com>:
> Marco Leise:
>
> > Yes, this is definitely why asserts should not have side
> > effects when they succeed.
>
> Can't you define a impureAssert() in Phobos and use it for the
> few cases when you need it, and use a pure-only assert() for all
> other cases?
>
> Bye,
> bearophile
What would happen to them in release compiles?
--
Marco
More information about the Digitalmars-d
mailing list