Defining a custom *constructor* (not initializer!)

Mehrdad wfunction at hotmail.com
Mon May 7 00:28:15 PDT 2012


On Monday, 7 May 2012 at 06:51:43 UTC, Jacob Carlborg wrote:
> You can have a look at my Orange library:
>
> https://github.com/jacob-carlborg/orange/blob/master/orange/util/Reflection.d#L460
>
> It's basically what TypeInfo_Class.create does but it doesn't 
> call the constructor and works for LDC as well.
>
> https://github.com/D-Programming-Language/druntime/blob/master/src/object_.d#L878

Thanks for the reply.

Is this something that actually modifies the 'new' operator, or 
is it just a separate factory function that my code would need to 
switch to using?


More information about the Digitalmars-d mailing list