Cannot alias null
monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jun 13 07:19:51 PDT 2014
On Thursday, 12 June 2014 at 22:54:20 UTC, Ali Çehreli wrote:
> On 06/12/2014 03:38 PM, monarch_dodra wrote:
> > So there's something special about "null".
>
> The difference is that null is an expression. It is the same
> limitation as not being able to alias a literal.
>
> alias zero = 0;
> alias blah = null;
Oh! Right. That makes sense.
So you should use enum instead:
enum zero = 0;
enum blah = null;
Thanks.
More information about the Digitalmars-d-learn
mailing list