aa literals
Philippe Sigaud
philippe.sigaud at gmail.com
Sat Mar 13 13:38:06 PST 2010
On Sat, Mar 13, 2010 at 20:17, Ellery Newcomer
<ellery-newcomer at utulsa.edu>wrote:
> anyone know of a good (or any) syntax for an empty aa
>
> impetus:
>
> auto aa = reduce!(g)(emptyaa, lst);
>
To associate a list of key/value pairs into one AA?
I use .init, but AA in general have become buggy for the past few releases.
auto aa = reduce!g((V[K]).init, lst); // this used to work, I think
But, as I said, it has become quite buggy recently:
auto aa = (int[string]).init; // empty AA?
aa["abc"] = 3; // error, no operator [] overload for
AssociativeArray!(string, int). I mean, come on.
Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20100313/dfb47a86/attachment.htm>
More information about the Digitalmars-d-learn
mailing list