I am trying to write a new class that is a faster version of the dynamic array. The way I am doing it is to have a linked list with each node pointing to an array of unknown. Right now I am using variants, but I don't think it will work for records. I basically want to make it to where each node points to an array of pointers and then dynamically typecast the derefenced pointer as the type they declare it as. An example would be.
FastArray : TFastArray;
i : Integer;
x : Integer;
FastArray := TFastArray.Create(Integer);
i := FastArray.Data[x];
I need it to where Integer can be any declared type such as a record, class, string, integer... Is there any way to do this. I guess it is similar to a template class in C++.