typeof(enum)

Minas minas_mina1990 at hotmail.co.uk
Fri Sep 7 15:55:24 PDT 2012


import std.stdio;

enum PI = 3.14;

void main()
{
	writeln(typeid(typeof(PI)));
}

It prints "double". Shouldn't it be immutable(double). I think it 
would make more sense, as it is a constant. Plus, it could be 
shared among threads.


More information about the Digitalmars-d-learn mailing list