On Tue, 24 Feb 2015 12:05:50 +0000, amber wrote: > Hi, > > Is it possible in D to have inheritance using value types, i.e. structs? > > Also I don't quite understand how copy ctors work in D. Do I need to > implement opAssign(S other) {}, or this(this) {} and what's the > difference between these two? > > Thanks, > Amber
p.s. sometimes compiler can use "move" instead of "copy" for structures. in this case it will not call postblit. so if you have some fields in your struct that depends of the structure address... you're in trouble.
signature.asc
Description: PGP signature