Nrgyzer <nrgy...@gmail.com> wrote:

I just figured out that this doesn't work, when I use a array with
super class as base type, for example: Drawable[] textures;

Then, I'll get the following error:

"Error: function draw!(void*).draw non-virtual functions cannot be
abstract".

I just implemented the draw-function as empty function, which doesn't
create any errors, but I seems that it's not calling the draw-
function of any texture instance. It seems that it is always calling
Drawable.draw() - the empty function. When I create a new instance of
my Texture-class, it calls the draw-function of the texture-instance.

Yes indeed. This was what I meant by saying that template functions
cannot be virtual. D sadly has no way to create templated functions
that work in a class hierarchy. :(

--
Simen

Reply via email to