Arithmetic on integer type parameters


I’m trying to do something along the likes of

struct Simplex{d}

I know of the workaround in this answer but is there some other solution that doesn’t involve changing my type signature?
If not, would this be a reasonable feature request? By declaring d<:Int I feel like the compiler shouldn’t have a problem figuring out simple arithmetic.

Save memory of a translational symmetric matrix

No, it’s sort of d::Int but certainly not d<:Int.


Not directly but kind of. This is


Yes d::Int of course. Thanks for pointing me to the ticket.
There I found the solution (at least for my specific usecase):

struct Simplex{d}