Implicit conversion between structs?

bearophile bearophileHUGS at lycos.com
Mon Oct 31 10:58:51 PDT 2011


Steve Teale:

> But if B is not mine to mess with?
> 
> The two structs have a common type prefix. and D guarantees that there 
> are predictable values for the remainder of the larger one, so the 
> compiler could presumably figure it out. (Easy for me to say)

Looks like a job for StructuralCast!().

Bye,
bearophile


More information about the Digitalmars-d mailing list