Getting a Type from TypeInfo / Getting Variant Type
Chirs Forest
CF at chrisforest.com
Thu Jan 11 08:59:01 UTC 2018
I'm using std.variant.Variant to hold a value of unknown type
(not a string, could be a numeric type or a container holding
multiple numeric types). I'm trying to retrieve this value with
.get!T but I need the type to do that... .type gives me TypeInfo,
but that's not a type so I'm not sure how to get the type without
checking the TypeInfo against all possible types (which would be
a massive pain).
More information about the Digitalmars-d-learn
mailing list