static property without return type
Peter Alexander
peter.alexander.au at gmail.com
Sat Mar 16 20:44:05 PDT 2013
On Sunday, 17 March 2013 at 02:41:18 UTC, Jonathan M Davis wrote:
> D's auto is the basically the same as C++11's auto, which means
> that the type
> is inferred, which is something completely different.
Not quite, in C++11, auto is required for type inference, in D it
isn't.
Here's all the D spec says about type inference:
"If a declaration starts with a StorageClass and has a
NonVoidInitializer from which the type can be inferred, the type
on the declaration can be omitted."
No mention of auto. Any storage class will do.
More information about the Digitalmars-d
mailing list