Type-stability with an elastic array in a struct

Yes an elastic array has more parameters than that. In your case you could do

struct MyStruct
    myelas::typeof(ElasticMatrix{Int64}(undef, 0, 0))
end

to get the concrete type without delving into the internals of ElasticArrays.

3 Likes