Template method and overloading

gerleim elf_qt at _deletethisifyouarenotaspammer_yahoo.com
Tue May 29 12:47:09 PDT 2007


Oh, I see, thanks. Didn't know that template parameter lists have to differ.
(Is that documented?)

I tried to workaround with a tuple template parameter.

gerleim

> Yeh that's not allowed.  I presume the reason was it was easier to 
> implement this way.
> The workaround is to give them different *template* parameter lists. 
> Something like:
>   	public void Foo(T)(T p1)
>   	{
>   	}
> 
>   	public void Foo(T,dummy=float)(T p1, bool b)
>   	{
>   	}
> 
> It's silly that you have to do that, but since that workaround is 
> available, I don't think Walter considers fixing it a very high priority.
> 
> --bb



More information about the Digitalmars-d-learn mailing list