On 06/01/2014 09:59 AM, Philippe Sigaud via Digitalmars-d-learn wrote:
On Sun, Jun 1, 2014 at 12:34 AM, Timon Gehr via Digitalmars-d-learn
<digitalmars-d-learn@puremagic.com> wrote:

This behaviour is independent of templates. Struct values of the same size
can be reinterpret-cast to each other this way even if their types are
completely unrelated.

Do you know if this is by design?


Well, it had to be explicitly implemented. The behaviour contradicts the documentation at http://dlang.org/expression#CastExpression though.

Reply via email to