Cannot alias null

H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 12 13:42:40 PDT 2014


On Thu, Jun 12, 2014 at 03:26:13PM -0500, Tom Browder via Digitalmars-d-learn wrote:
> This will not compile:
> 
>   alias blah = null;
[...]

'null' is a value, not a type. Try:

	alias blah = typeof(null);


T

-- 
If it's green, it's biology, If it stinks, it's chemistry, If it has numbers it's math, If it doesn't work, it's technology.


More information about the Digitalmars-d-learn mailing list