TypeFunction example creatiing a conversion matrix
Stefan Koch
uplink.coder at googlemail.com
Thu Oct 1 17:45:34 UTC 2020
On Thursday, 1 October 2020 at 17:35:51 UTC, Andrei Alexandrescu
wrote:
> On 10/1/20 1:26 PM, Steven Schveighoffer wrote:
>> But when the compiler MUST implement is(T : U), and that
>> expression is well defined, I don't see why we have to
>> reimplement that feature in the runtime as well. At least
>> without a compelling example of "the compiler can't do this as
>> well".
>
> How do you implement Variant.get(T) without reifying is(T : U)?
What does it do?
is Variant.get returning type T ?
Then I would assume you don't.
You use a template + typeid that's what they are for!
Variant.get is not doing any type computation which you would
need is (T : U) for?
Where would I use it?
More information about the Digitalmars-d
mailing list