How to specialize template function for associative arrays?
Extrawurst
spam at extrawurst.org
Fri Oct 19 13:27:49 PDT 2007
what about just this :
void foo(A, B)(A[B] _aa)
{
foreach(it; _aa)
{
writefln("%s",it);
}
}
void main()
{
string[int] bar = [2:"test"[], 55:"bar"];
foo!(string,int)(bar);
writefln("byye");
}
~Extrawurst
Aarti_pl schrieb:
> void parse(T)() {
> }
>
> //What to write here???
> void parse(T : ?????)() {
> }
>
> void main() {
> parse!(int[char[]])();
> }
More information about the Digitalmars-d-learn
mailing list