NotNull pointers

Walter Bright newshound2 at digitalmars.com
Mon Aug 29 14:07:54 PDT 2011


On 8/29/2011 1:32 PM, dsimcha wrote:
> How does it work for member variables of classes and structs?  E.g.:
>
> // Is this legal or not?
> struct Foo
> {
>      NotNull!(int*) notNull;
>
>      this(int* ptr)
>      {
>          notNull = ptr;
>      }
> }

Try it and see! (It works as you'd expect.)


More information about the Digitalmars-d mailing list