On Sunday, 16 August 2015 at 02:42:18 UTC, BBasile wrote:
---
enum Ti {tibyte, tiubyte, ...}
Ti getTypeInfo(T)(T t){statif is(t == ubyte) return Ti.tibyte; else...}

You could also just use D's own run time typeinfo with the typeid() thing. It returns an instance of class TypeInfo. (This is what std.variant does btw)

Reply via email to