Casting to union type?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 25 20:24:22 PDT 2014


On Tuesday, 26 August 2014 at 02:33:25 UTC, cc wrote:
> Is it possible to allow implicit casting from a base type to a
> union type?

All implict conversions are done using alias this:

http://dlang.org/class.html#AliasThis

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list