* You must never assign the null literal to it (this is a compile time error)
* If you assign a null value at runtime to it, it will immediately throw an Error
at the point of assignment.
NotNull!T can be substituted for T at any time, but T cannot become
NotNull without some attention: either declaring NotNull!T, or using
the convenience function, notNull.
Condition: T must be a reference type.
Instead of: __traits(compiles, { T t; assert(t is null); } ).
intmyInt;
NotNull!(int *) not_null = &myInt;
// you can now use variable not_null anywhere you would// have used a regular int*, but with the assurance that// it never stored null.
NotNull ensures a null value can never be stored.
* You must initialize it when declared
* You must never assign the null literal to it (this is a compile time error)
* If you assign a null value at runtime to it, it will immediately throw an Error at the point of assignment.
NotNull!T can be substituted for T at any time, but T cannot become NotNull without some attention: either declaring NotNull!T, or using the convenience function, notNull.
Condition: T must be a reference type. Instead of: __traits(compiles, { T t; assert(t is null); } ).
TODO Merge with http://arsdnet.net/dcode/notnullsimplified.d