Template-style polymorphism in table structure

Lodovico Giaretta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 4 07:02:03 PDT 2016


On Sunday, 4 September 2016 at 09:55:53 UTC, data pulverizer 
wrote:
> [...]

Your code is not very D style and, based on your needs, there may 
be better ways to achieve your goal, but without knowing your use 
case, it's difficult to give correct advice.

Talking about that writeln statement, your code is not working 
because of a known compiler bug [1]. If you change your interface 
BaseVector to an abstract class and add the needed override 
annotation to GenericVector, then typeid returns the expected 
result.

[1] https://issues.dlang.org/show_bug.cgi?id=13833




More information about the Digitalmars-d-learn mailing list