Re: Is there a way to get a template’s parameters and constraints?

2023-01-22 Thread Adam Ross Walker via Digitalmars-d-learn
On Friday, 20 January 2023 at 17:15:31 UTC, Quirin Schroll wrote: Is there a trait (or a combination of traits) that gives me the constraints of a template? Apologies, I missed the key part of your question. But I think the above can be adapted if you were so inclined.

Re: Is there a way to get a template’s parameters and constraints?

2023-01-22 Thread Adam Ross Walker via Digitalmars-d-learn
There is a way but it's horrible. You can take the `.stringof` and parse the result. I knocked this up for something but it's not well tested and there are probably templates that it handles incorrectly. I'm not claiming this is any good, I just happened to have it. ```d enum TemplateParam