TypeFunction example creatiing a conversion matrix
Steven Schveighoffer
schveiguy at gmail.com
Thu Oct 1 18:28:37 UTC 2020
On 10/1/20 2:19 PM, H. S. Teoh wrote:
> On Thu, Oct 01, 2020 at 05:55:17PM +0000, Stefan Koch via Digitalmars-d wrote:
> [...]
>> Please show me in the code where is(T : U) is used.
>> I don't find it in std variant.
>
> That's because it doesn't work.
>
> We would like to be able to do this:
>
> Variant v;
> v = 100; // v now stores an int
> long l = v.get!long; // currently does not work
I'm not going to respond to anything else here, but just want to point
out, this does work.
https://run.dlang.io/is/S3sqDF
-Steve
More information about the Digitalmars-d
mailing list