assert(0) behavior

Joseph Rushton Wakeling via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 5 01:09:47 PDT 2015


On Monday, 3 August 2015 at 23:57:36 UTC, Steven Schveighoffer 
wrote:
> At the very least, assert(0, "message") should be a compiler 
> error, the message is unused information.

Only if you compile in -release mode.  Without wanting to get 
into a bikeshedding debate, I think that flag name may be 
mislead: it's not about release vs. development, it's about the 
tradeoff you are making between speed and safety.


More information about the Digitalmars-d mailing list