Error in assignment to 'this' inside constructor

TommiT tommitissari at hotmail.com
Sun May 12 08:00:10 PDT 2013


On Sunday, 12 May 2013 at 10:38:41 UTC, evilrat wrote:
> the problem with structs in your case is that this a value 
> type, so may be you could use copy contructor?
>
> struct Something {
> // copy ctor
> this(Something s) {}
> }

D doesn't have copy constructors. What you have there is just a 
regular constructor.


More information about the Digitalmars-d-learn mailing list