casts / wildcards for parametrized types

Meta jared771 at gmail.com
Thu Aug 1 17:44:19 PDT 2013


One more way, not necessarily a workaround but a little trick 
that doesn't require you to know the exact type of box, is to use 
typeof(box).

auto box = Box!int();
auto item = cast(Item)box;
auto box2 = cast(typeof(box));



More information about the Digitalmars-d-learn mailing list