Re: Dictionary of Templated Functions

2022-09-10 Thread Ali Çehreli via Digitalmars-d-learn
On 9/10/22 15:35, jwatson-CO-edu wrote: > So, my solution > will be to construct a catch-all struct `Payload` and have that be my > argument type from which various functions can draw the data of their > choice. Two Phobos features may be helpful there:

Re: Dictionary of Templated Functions

2022-09-10 Thread jwatson-CO-edu via Digitalmars-d-learn
On Saturday, 10 September 2022 at 22:13:01 UTC, frame wrote: On Saturday, 10 September 2022 at 00:24:11 UTC, jwatson-CO-edu wrote: Hello, I'm trying to create a dictionary of templated function pointers. The functions should return `bool` and take a differently-typed dynamics arrays `T[]` as

Re: Dictionary of Templated Functions

2022-09-10 Thread frame via Digitalmars-d-learn
On Saturday, 10 September 2022 at 00:24:11 UTC, jwatson-CO-edu wrote: Hello, I'm trying to create a dictionary of templated function pointers. The functions should return `bool` and take a differently-typed dynamics arrays `T[]` as an argument. This won't work as you might expect. Your

Dictionary of Templated Functions

2022-09-09 Thread jwatson-CO-edu via Digitalmars-d-learn
Hello, I'm trying to create a dictionary of templated function pointers. The functions should return `bool` and take a differently-typed dynamics arrays `T[]` as an argument. Based on my understanding of the docs, I've made two failed attempts: **Attempt 1**: