Re: Fake IFTI-compatible struct constructors

2021-05-01 Thread Chad Joan via Digitalmars-d-learn
On Saturday, 1 May 2021 at 23:21:33 UTC, Basile B. wrote: On Saturday, 1 May 2021 at 21:57:54 UTC, Chad Joan wrote: ... Rather, this setup doesn't work at all, because IFTI doesn't seem to work on function-templates with alias parameters. Yes your observation is correct. That should work but

Re: Fake IFTI-compatible struct constructors

2021-05-01 Thread Basile B. via Digitalmars-d-learn
On Saturday, 1 May 2021 at 21:57:54 UTC, Chad Joan wrote: I came up with a couple techniques for making it seem like templated structs deduce their template parameters from constructor invocations. These are given further down in the post. ... However, this was not to be. Rather, this setup

Fake IFTI-compatible struct constructors

2021-05-01 Thread Chad Joan via Digitalmars-d-learn
I came up with a couple techniques for making it seem like templated structs deduce their template parameters from constructor invocations. These are given further down in the post. This has been a profitable exercise. However, the techniques I came up with have some drawbacks. Thus, I have