template instance does not match template declaration

Fabrice Marie via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jan 7 19:27:26 PST 2017


Hi,

On my first attempt to create a templated class, I'm hitting an 
issue that I can't seem to resolve.

I've dustmite'd the code down to:

class Cache(O, K, F)
{
}


void main()
{
	class BasicObject
	{
	}

	BasicObject lookupBasicObject() {
	}

         Cache!(BasicObject, string, lookupBasicObject);
}


and I'm hitting the following error:

cache.d(23): Error: template instance Cache!(BasicObject, string, 
lookupBasicObject) does not match template declaration Cache(O, 
K, F)

Any help would be much appreciated in understanding what I am 
doing wrong.

Thanks.

Take care,
Fabrice.


More information about the Digitalmars-d-learn mailing list