I don't think you can distinguish between entities evaluated through different templates. TemplateOf will paradoxically not work on pure templates of the form "template X() {}" only things like template functions and template structs. isSame, is, and isInstanceOf will only work on the fully evaluated type or alias (pred) not the template that was used to evaluate it.

If I understood your usecase correctly, you could do something like this though:

https://run.dlang.io/is/VwZoAx

That is use an enum as a template parameter instead of wrapping the predicate in a template.

Reply via email to