On Sat, 03 Jan 2015 14:45:24 +1030 ted via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
p.s. also please note that structs in D are always passed by value and copied (until you not explicitly ask for something another). so: MyStruct a; MyStruct b; b = a; actually does `memcpy()` (with postblit if there is any). and it's forbidden to overwrite `const` variable contents. that's why compiler complains: by assigning to `mA` you are trying to overwrite contents of `const` variable.
signature.asc
Description: PGP signature