What operators should I overload to let this conversion? I've tryed opCast and it fails in other call sites, also I've tried opAssign - it didn't works, what worked is wrapping in ctor - MyStruct(const_var). But using ctor is not convenient.
what operator(s) should I overload to prevent this?
drug via Digitalmars-d-learn Mon, 16 Oct 2017 05:06:07 -0700
I refactored `MyStructure` added own implementation of malloced array
based on pureRealloc/pureFree instead of dynamic array I used before and
now I have error:
Error: cannot implicitly convert expression get(msg.getData()) of type
const(MyStructure) to MyStructure.
- what operator(s) should I ove... drug via Digitalmars-d-learn
- Re: what operator(s) sho... Biotronic via Digitalmars-d-learn
- Re: what operator(s)... drug via Digitalmars-d-learn
- Re: what operator(s) sho... Steven Schveighoffer via Digitalmars-d-learn
