[Issue 1597] It is not possible to specialize template on associative array.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 19 16:35:45 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1597





------- Comment #6 from andrei at metalanguage.com  2007-10-19 18:35 -------
(In reply to comment #5)
> (In reply to comment #2)
> But in other hand probably you will admit that current solution:
> void parse(T : T[]) 
> 
> is even worse? 
> 
> Inside function you get something completely different than you put when
> instantiating template. Inside function T means element of array, while it
> is instantiated as T[].

That's very ugly but Walter cannot be convinced to give it up.

> So maybe:
> void parse(T : auto E[]) {} and
> void parse(T : auto V[K]) {}
> to say that these symbols are inferred?

This idea has been iterated a number of times. In the end, there was admission
that the current syntax of appending the symbols to the list is as good as any
other.


-- 



More information about the Digitalmars-d-bugs mailing list