state of an object

bearophile bearophileHUGS at lycos.com
Sun Jul 1 23:55:04 PDT 2012


Namespace:

> Is it possible to figure out how is the state of an object at 
> compile time?
> E.g. if the object is null or not:
>
> class Foo { }
>
> Foo f;
>
> static if (is_null(f)) { }

In general you need a tool that analyzes D code statically (and 
maybe in some cases doesn't give a certain answer).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list