Assert Expressions???

Sean Kelly sean at f4.ca
Thu Jul 26 17:58:12 PDT 2007


Manfred Nowak wrote:
> Bill Baxter wrote
> 
>> so if it makes sense as an expression 
>> then might as well allow it to be used that way
> 
> Problem: what happens to an expression which has an `assert' as 
> subexpression, if -release is given to the compiler?

I would guess that the assert() calls would be equivalent to an empty 
statement.  Kind of like how:

     if( sometimes() )
         assert( false );
     printf( "hello\n" );

should always print "hello," regardless of whether -release is specified 
or not.


Sean


More information about the Digitalmars-d-learn mailing list