TypeFunction example creatiing a conversion matrix

Stefan Koch uplink.coder at gmail.com
Thu Oct 1 10:16:47 UTC 2020


On Thursday, 1 October 2020 at 10:10:47 UTC, user1234 wrote:
>
> (note I leave the serious domain)
>
> I'm amused actually by the alternative. It's a FFT that makes 
> you travel from the type domain to the string domain and an 
> iFFT that makes you travel from the string domain to the type 
> domain if I have followed correctly.

Well it's is just kindof what happens.
They transform a type an Object representing the type.
which includes the mangle, which of course identifies the type 
uniquely.
Therefore you can go from TypeObject -> string -> Type
All of which has to be in template land of course.
Type -> TypeObject has to be done in a template there's no way 
around that.
And string -> Type has to be done in a template as well, and that 
string has to be a template parameter.
Therefore you still have to work within templates.



More information about the Digitalmars-d mailing list