template error instantiating

ref2401 refactor24 at gmail.com
Sat Nov 17 10:28:09 PST 2012


I get "template instance main.MyClass!(int) error instantiating" 
in the following case:

public class MyClass(TStuff)
{
	public void foo(TStuff item)
	{}

	public void foo(TRange)(TRange items)
	if (isInputRange!TRange && is(ElementType!TRange == TStuff))
	{}
}

void main(string[] argv)
{
	MyClass!int instance = new MyClass!int();

	return;
}

but if i rename one of the "foo" overloads then code will be 
compiled.



More information about the Digitalmars-d-learn mailing list