AA specialization not works
Stewart Gordon
smjg_1998 at yahoo.com
Sun Sep 23 06:00:09 PDT 2007
"JDavidLS" <jdavidls at gmail.com> wrote in message
news:fd44p2$h7t$1 at digitalmars.com...
> string[] na = ["yo","tu","el"];
>
> string[string] aa;
> aa["yo"] = "qwer";
> aa["tu"] = "qwer";
At it happens, what you've posted isn't valid because the statements aren't
in a function. But if I wrap these statements in a main function (and add
dummy code to the function bodies), then the code you've given compiles (and
seems to run) without error.
> string toString(T)(Tt) { ...} //OK
> string toString(T:T[])(Tt) { ... } // WORKS
>
> string toString(T:T[C], C)(Tt) { ... } // NOT WORKS
> string toString(T:V[C], V,C)(Tt) { ... } // NOT WORKS
> string toString(V,C,T:V[C])(Tt) { ... } // NOT WORKS
<snip>
You've given these functions, but no code that tries to call these
functions. Hence nobody can reproduce your problem.
Please post minimal but complete, self-contained examples. It makes it a
lot easier for everybody, including you. And don't just write "NOT WORKS",
state what it's doing instead of working. The best practice is to post a
code file together with the compiler (or runtime) output for that file.
See also
http://homepage1.nifty.com/algafield/sscce.html
Stewart.
--
My e-mail address is valid but not my primary mailbox. Please keep replies
on the 'group where everybody may benefit.
More information about the Digitalmars-d
mailing list