casting to structure
Moritz Maxeiner via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 24 14:50:43 PDT 2017
On Saturday, 24 June 2017 at 21:11:13 UTC, Igor Shirkalin wrote:
> Is it possible without such a constructor?
No. Also, the above works because of the following [1]:
> Casting a value v to a struct S, when value is not a struct of
> the same type, is equivalent to: `S(v)`
[1] https://dlang.org/spec/expression.html#CastExpression
More information about the Digitalmars-d-learn
mailing list