[Issue 11706] std.traits.OriginalType should support std.typecons.Typedef
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Apr 24 04:08:31 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=11706
--- Comment #4 from bearophile_hugs at eml.cc ---
(In reply to Andrej Mitrovic from comment #3)
> https://github.com/D-Programming-Language/phobos/pull/2116
Thank you. But:
> // safely cast to get the value that's being wrapped
> int x = cast(OriginalType!MyInt)myInt;
casts are not safe. That example is not good.
Safer and shorter:
int x = myInt.get;
--
More information about the Digitalmars-d-bugs
mailing list