Re: Getting a Type from TypeInfo / Getting Variant Type

2018-01-11 Thread Simen Kjærås via Digitalmars-d-learn
On Thursday, 11 January 2018 at 08:59:01 UTC, Chirs Forest wrote: 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...

Re: Getting a Type from TypeInfo / Getting Variant Type

2018-01-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, January 11, 2018 08:59:01 Chirs Forest via Digitalmars-d-learn wrote: > 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 t

Getting a Type from TypeInfo / Getting Variant Type

2018-01-11 Thread Chirs Forest via Digitalmars-d-learn
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