Is there a way to specify a type parameter in a way that depends on another type parameter?
For example, a StaticMatrix takes in types {M,N,T,L}, where M,N are dimensions and L is the length of the array. Is there a way to set L=M*N? For example, if I try to define
struct foo{N <: Integer}
A::SMatrix{N,N,Float64,N*N}
end
I get the error
ERROR: MethodError: no method matching *(::TypeVar, ::TypeVar)
Sorry, my last comment did not attack exactly your case, but I am also having the problem, it really seems that inside a struct definition the N is a typevar, has no * defined for it, even if after a instance of a concrete type like Foo{10} is able to get the value and make use of it.