Template Base Classes, Refering to typeof(this)

Travis Boucher boucher.travis at gmail.com
Wed Nov 4 11:31:02 PST 2009


Ellery Newcomer wrote:
> Travis Boucher wrote:
>> Any hints on how to implement this so I can keep my original
>> declaration? class VectorBase(size_t S, T)
> 
> Make that bugger a struct or forget about opAssign.

Why wouldn't opAssign work for a class?  (I don't have a problem with 
structs, they make more sense for a small (2-5) Vector class anyway.)

 From what I understand, structs can't inherit from other structs. I 
could implement the specific classes using template mixins if needed.



More information about the Digitalmars-d mailing list