Getting the parameters of a struct/class constructor
    Rob T 
    alanb at ucora.com
       
    Thu Jan 24 13:34:48 PST 2013
    
    
  
On Thursday, 24 January 2013 at 18:41:31 UTC, mist wrote:
> You can use "magic" functions __ctor and __dtor which actually 
> serve as constructor and destructor implementations behind the 
> scene.
>
> Example and proof-of-concept: http://dpaste.1azy.net/fd924332
>
> Have no idea if it is explicitly defined by spec somewhere 
> though.
If you have more than one ctor it seems to take the first one
http://dpaste.1azy.net/b994fdf3
I don't know if you will able to rely on the order unless it's a 
part of the spec.
--rt
    
    
More information about the Digitalmars-d-learn
mailing list