Re: Class templates deriving from base class

2009-11-26 Thread Michael Mittner
Ary Borenszweig wrote: > Hi Mike, > > Why do you mean with "doesn't work"? If I define class Mars {} and > compile your program it gives no error. Can you show the error the > compiler is giving you? (you normally past the compiler output if a > program doesn't compile so that others can help you

Re: Class templates deriving from base class

2009-11-26 Thread Ary Borenszweig
Michael Mittner wrote: Hi! I'm trying to do something like this (in D1): class Foo { // ... } class Bar(T) : Foo { // ... } alias Bar!(int) IntBar; alias Bar!(Mars) MarsBar; void main() { Foo x = new MarsBar(); } Common base class, one derived template class and a bunch of alias

Class templates deriving from base class

2009-11-26 Thread Michael Mittner
Hi! I'm trying to do something like this (in D1): class Foo { // ... } class Bar(T) : Foo { // ... } alias Bar!(int) IntBar; alias Bar!(Mars) MarsBar; void main() { Foo x = new MarsBar(); } Common base class, one derived template class and a bunch of aliases that are then actuall