Build Hash from Array in one statement ?

Tobias Pankrath tobias at pankrath.net
Sat Feb 22 11:31:27 PST 2014


> ---
>
> Or, put differently, is there a way to convert values in an 
> array to keys of hash in one statement ?
>
> Thanks!
>  -gordon

std.array.assocArray.

--
T[] keys;
auto aa = zip(keys, repeat(true)).assocArray;


More information about the Digitalmars-d-learn mailing list