Checking a (base) type and accepting any specialization?

mitgedanken sara.dolores.tasche at gmail.com
Sun Jun 8 14:29:27 UTC 2025


I have following situation:

I have a struct ``Routine`` (base type) and its specializations 
``!n``.

```d
struct Routine (uint argscount = 1) {
     string name;
     void delegate(inout Arguments!argscount) return call;
}

const auto ROUTINES = [
     Routine!3(":input", toDelegate(&routine_input)),
     Routine!2(":print", toDelegate(&routine_print)),
];
```

I understand why the given types are not compatible.
But not how I can store any base type regardless its 
specialization.


More information about the Digitalmars-d-learn mailing list