Re: Is there other way to do that?

2021-02-15 Thread mw via Digitalmars-d-learn
On Monday, 15 February 2021 at 07:26:56 UTC, Jack wrote: I need to check if an instance is of a specific type derived from my base class but this class has template parameter and this type isn't available at time I'm checking it. Something like: class B { } class A(T) : B { } class X : B { }

Re: Is there other way to do that?

2021-02-15 Thread Rumbu via Digitalmars-d-learn
On Monday, 15 February 2021 at 07:26:56 UTC, Jack wrote: I need to check if an instance is of a specific type derived from my base class but this class has template parameter and this type isn't available at time I'm checking it. Something like: class B { } class A(T) : B { } class X : B { }

Re: Is there other way to do that?

2021-02-15 Thread evilrat via Digitalmars-d-learn
On Monday, 15 February 2021 at 07:26:56 UTC, Jack wrote: I need to check if an instance is of a specific type derived from my base class but this class has template parameter and this type isn't available at time I'm checking it. Something like: Non-templated interface/base class is

Is there other way to do that?

2021-02-14 Thread Jack via Digitalmars-d-learn
I need to check if an instance is of a specific type derived from my base class but this class has template parameter and this type isn't available at time I'm checking it. Something like: class B { } class A(T) : B { } class X : B { } class Z : B { } auto c = can be any derived class from B