proposal: capacity variable for dynamic arrays
Lionello Lunesu
lionello at lunesu.remove.com
Mon Jul 10 12:20:21 PDT 2006
What's the capacity of a slice?
Futhermore, the capacity can't be stored in the memory block, since you
don't know the start and end of the block. Could be stored in the array
variables itself (as are length and ptr), but that would make the
sizeof(array) and strange 12, probably being padded to 16, resulting in
twice the mem transfer for array arguments, return values.
L.
More information about the Digitalmars-d
mailing list