Throwing specific Error Obejct for asserts

bearophile bearophileHUGS at lycos.com
Thu Jan 10 06:28:43 PST 2013


monarch_dodra:

> After:
> //----
> auto opSlice(size_t i, size_t j)
> {
>     version(assert)
>         if (i > j)
>             throw new RangeError();
> }

But now opSlice can't be nothrow, nor transitively all the code 
that calls that :-(

Bye,
bearophile


More information about the Digitalmars-d mailing list