struct inheritance need?

Christopher Wright dhasenan at gmail.com
Sat Dec 20 05:46:44 PST 2008


Sergey Gromov wrote:
> Thu, 18 Dec 2008 18:36:07 -0500, Christopher Wright wrote:
> 
>> Weed wrote:
>>> Compile-time creation an object of class or (most likely wrong) struct 
>>> inheritance.
>>>
>>> I have prepared a distinct feature request and send it later
>> You aren't providing a use case, though. Why not show an example (actual 
>> code) of what you would do if you had this ability?
> 
> static invariant Identity = new Matrix([[1,0,0], [0,1,0], [0,0,1]]);

Okay, do you want to access that matrix in a template? Is there a reason 
it can't be a struct?


More information about the Digitalmars-d-learn mailing list