Template for function or delegate (nothing else)
useo
useo at start.bg
Thu Feb 10 06:09:03 PST 2011
I implemented all I wanted and it works perfectly ;).
But I'm using the "if (is(T == delegate) || is(T == function))"-
statement in another class/template.
class Example(T) if (is(T == delegate) || is(T == function)) {
...
}
Now, when I declare Example!(void function()) myVar; I always get:
Error: template instance Example!(void function()) does not match
template declaration Example(T) if (is(T == delegate) || is(T ==
function))
Error: Example!(void function()) is used as a type
When I declare myVar as Example!(function), I get some other errors.
What's wrong with my code?
More information about the Digitalmars-d-learn
mailing list