New hash
Andrej Mitrovic
andrej.mitrovich at gmail.com
Fri Mar 23 21:55:18 PDT 2012
On 3/24/12, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> I have a much simpler version:
>
> template Assoc(T)
> {
> static if (is(T K : V[K], V))
> alias AA!(K,V) Assoc;
> else
> static assert(0);
> }
>
> :-)
Yeah but with a type string[int][int] this will store a AA!(int,
string[int]), IOW you will be using a druntime hash inside of your new
hash. Mine converts this to AA!(int, AA!(string, int)) to properly
test the new AA nested hashes.
Also your version won't work since AA!(int, string[int]) fails
currently (that same toHash error as my last post).
More information about the Digitalmars-d
mailing list