On type functions

Panke tobias at pankrath.net
Sun May 3 11:19:23 UTC 2020


On Sunday, 3 May 2020 at 11:11:03 UTC, Stefan Koch wrote:
>
> struct from spec is exactly one of the things that will not be 
> possible without wrapping it in a template.
>
> template structFromString(string spec)
> {
>     alias structFromStringTypeFn(string spec)
>     {
>         ...
>     }
>     alias = structFromString = structFromStringTypeFn!(spec);
> }
> that looks a bit strange but it allows me to not have to worry 
> about certain constraints that I would otherwise have to worry 
> about.

I have no problem with wrapping it in a template, but want to 
know what can be done inside of structFromStringTypeFn?


More information about the Digitalmars-d mailing list