I would like to have a template constrant to enforce that a type can be explicitly cast to another type:
void (T)(T t) if (cast(int) T)//force `cast(int) T` to be possible { // Yay I know `t` can be cast to an `int`! } Is this possible?
I would like to have a template constrant to enforce that a type can be explicitly cast to another type:
void (T)(T t) if (cast(int) T)//force `cast(int) T` to be possible { // Yay I know `t` can be cast to an `int`! } Is this possible?