Re: Parameters of overloaded templated function

2022-05-10 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 12:12:13 UTC, Tejas wrote: Using aliases as parameters doesn't work(and the DIP that wanted to have this behaviour was de facto rejected) https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1023.md No, it wasn't rejected. The author decided it needed reworkin

Re: Parameters of overloaded templated function

2022-05-10 Thread frame via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 12:12:13 UTC, Tejas wrote: Using aliases as parameters doesn't work(and the DIP that wanted to have this behaviour was de facto rejected) https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1023.md But considering you're passing it as an argument, not a formal

Re: Parameters of overloaded templated function

2022-05-10 Thread Tejas via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 11:33:24 UTC, frame wrote: On Tuesday, 10 May 2022 at 11:26:44 UTC, frame wrote: On Tuesday, 10 May 2022 at 03:18:14 UTC, Tejas wrote: Can you try Makes no difference. OK, I tried it in separate test and works. Weird, I already tried that before, there must be s

Re: Parameters of overloaded templated function

2022-05-10 Thread frame via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 11:26:44 UTC, frame wrote: On Tuesday, 10 May 2022 at 03:18:14 UTC, Tejas wrote: Can you try Makes no difference. OK, I tried it in separate test and works. Weird, I already tried that before, there must be something wrong with my other template. Thanks

Re: Parameters of overloaded templated function

2022-05-10 Thread frame via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 03:18:14 UTC, Tejas wrote: Can you try Makes no difference.

Re: Parameters of overloaded templated function

2022-05-09 Thread Tejas via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 01:00:24 UTC, frame wrote: So `__traits(getOverloads)` returns also templated members and `__traits(isTemplate)` can select those members. Unfortunately, `Parameters!` does not work with the templated member. How can I pass a symbol of T or A... to `Parameters!` as de

Parameters of overloaded templated function

2022-05-09 Thread frame via Digitalmars-d-learn
So `__traits(getOverloads)` returns also templated members and `__traits(isTemplate)` can select those members. Unfortunately, `Parameters!` does not work with the templated member. How can I pass a symbol of T or A... to `Parameters!` as desired type without instantiating the template? ```d