function XXXX conflict with YYYY

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Nov 14 09:11:55 PST 2013


On Thu, Nov 14, 2013 at 05:27:38PM +0100, Agustin wrote:
> final uint registerEvent(T, J)(IPlugin, void delegate(J))
> {
>  ....
> }
> 
> final uint registerEvent(IPlugin, EventHandler, EventInfo, ulong)
> {
>  ....
> }
> 
> There seems to be a problem when having two function with same name
> but different parameters. Only happend when one of the function use
> templates. Is that a compiler limitation?

On older compilers, you can work around this limitation by adding empty
compile-time parameters to the second function:

	final uint registerEvent()(IPlugin, EventHandler, EventInfo, ulong)
	{ ... }

>From what I heard, this limitation has been removed in the latest
compiler.


T

-- 
It only takes one twig to burn down a forest.


More information about the Digitalmars-d-learn mailing list