auto declarations

Ellery Newcomer ellery-newcomer at utulsa.edu
Fri Jan 7 13:32:42 PST 2011


auto a = 1, b = null;

int a = 1, *b = null;


The first is accepted by dmd, and it should result in typeof(a) == int 
and typeof(b) == void*. It is somewhat contradictory to the error 
message resulting from the second:

multiple declarations must have the same type, not int and int*

I am skeptical of dmd's permitting the first. Does anyone else see any 
utility in it?


More information about the Digitalmars-d-learn mailing list