@nogc, exceptions, generic containers... Issues.

via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 8 10:41:11 PDT 2014


On Monday, 8 September 2014 at 17:33:35 UTC, ketmar via 
Digitalmars-d wrote:
> On Mon, 08 Sep 2014 16:46:58 +0000
> yazd via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
>
> the whole idea behind exceptions is that you can omit such 
> checks.
> otherwise we can just use "return codes" and be happy.

The type could throw by itself, if it is invalid and is accessed 
(i.e. a method called). Just use `alias getOrThrow() this`. Of 
course, such usage wouldn't be nothrow anymore, even if the 
ultimate methods that are going to be called by `getOrThrow()` 
are.


More information about the Digitalmars-d mailing list