Either I'm just too stupid, or D is lacking something
Wolfgang Draxinger
wdraxinger at darkstargames.de
Tue Jul 25 07:12:46 PDT 2006
Sean Kelly wrote:
> This may make IFTI much more achievable in the short-term, as
> overloading template functions basically doesn't work at all
> now. I think mixing the two might be more complicated for the
> compiler to sort out:
>
> template fn( T )
> {
> void fn( T[] x ) {}
> void fn( T x ) {}
> }
>
> template fn( T : int[] )
> {
> void fn( T[] x ) {}
> }
>
> template fn( T : int )
> {
> void fn( T x ) {}
> }
Umm, even me, being not a compiler, wouldn't know how to decide
which of those templates to use. That's a highly ambiguos
example of code and no sane compiler would process that.
Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith at jabber.org, ICQ: 134682867
GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E
More information about the Digitalmars-d
mailing list