A few simple syntactic proposals
e-t172
e-t172 at akegroup.org
Thu Apr 17 02:04:29 PDT 2008
Robert Fraser a écrit :
> The only time I've run into the problem is in array declarations, but I
> know it's also a problem for template metaprogramming. An example of the
> array thing is declaring a literal array of strings:
>
> auto cities = [ "New York", "London", "Paris", "Tokyo" ]
It will compile if you replace "auto" by "char[][]":
char[][] cities = [ "New York", "London", "Paris", "Tokyo" ];
This solves the problem, I guess, because the "char[][]" removes the
static/dynamic array ambiguity.
More information about the Digitalmars-d
mailing list