String of templated struct at compile time

divi a at b5.re
Thu Sep 19 21:35:57 UTC 2019


On Thursday, 19 September 2019 at 20:16:49 UTC, Adam D. Ruppe 
wrote:
> The reason for this is kinda crazy: the token `S` inside that 
> struct (and thus inside its template mixin) refers to the 
> *current instantiation*. Which includes the conflicting 
> constraint.

I didn't know that, and it explains a lot. I can be flexible on 
this and hadn't thought about moving the constraint inside the 
struct. It doesn't seem as aesthetically pleasing but would 
probably result in a better API I suppose.

Thanks Adam!




More information about the Digitalmars-d-learn mailing list