TSalm wrote:
Le Sun, 01 Mar 2009 03:07:16 +0100, Christopher Wright
a écrit:
TSalm wrote:
Does something have an idea on how to do something like this ?
You don't. Templates cannot participate in polymorphism. I've dealt
with this in the past and ended up making another class with a
temp
Le Sun, 01 Mar 2009 03:07:16 +0100, Christopher Wright
a écrit:
TSalm wrote:
Does something have an idea on how to do something like this ?
You don't. Templates cannot participate in polymorphism. I've dealt with
this in the past and ended up making another class with a template
parame
TSalm wrote:
Does something have an idea on how to do something like this ?
You don't. Templates cannot participate in polymorphism. I've dealt with
this in the past and ended up making another class with a template
parameter that corresponds to the desired function template parameter...
Ba
Hello,
I need to do something like this :
/* CODE */
import tango.io.Stdout;
interface I
{
bool cmpType(U)(U val);
}
class A(T):I
{
bool cmpType(U)(U val)
{
static if ( is (U==T) )
return true;
else
return false;
}
}
void main()
{
I a = new A!(int);