Replacing AA's in druntime

Steven Schveighoffer schveiguy at yahoo.com
Thu Mar 15 10:43:02 PDT 2012


On Thu, 15 Mar 2012 13:28:00 -0400, Timon Gehr <timon.gehr at gmx.ch> wrote:

> On 03/15/2012 11:41 AM, Steven Schveighoffer wrote:
>>
>> Second, that breaks a *LOT* of code which expects AA's to just be
>> declared and used.
>>
>
> Not necessarily. The compiler could still do the auto-initialization.

Auto initialization is done by the type, not the compiler (even in  
previous implementation that did not use template wrapper).  AFAIK,  
classes can't initialize themselves.

You could make the pImpl a class.  And actually, this might be a good  
thing.  But the basic AA type should be a struct.

-Steve


More information about the Digitalmars-d mailing list