checkedint call removal

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 30 11:16:53 PDT 2014


On 07/30/2014 08:06 PM, John Colvin wrote:
>
>
>>> P.S. What about version(assert)? Could the optimiser work with this:
>>>
>>> if(x > 7) x++;
>>> version(assert) auto testResult = x;
>>> assert(x <= 7);
>>
>> No, version(assert) is just about doing introspection on the
>> compiler's configuration.  In release mode that code doesn't even get
>> semantically analysed.
>
> pity.

assert({ ... }());


More information about the Digitalmars-d mailing list