Array views... While making my BufferedStreamReader, I once again longed for an "array view". I want to hand the compiler a type, a pointer, a length/element count and the element stride. In return I want something I can access as an array, get the length of and pass as "array of X" parameters.

Array views... While making my BufferedStreamReader, I once again longed for an "array view". I want to hand the compiler a type, a pointer, a length/element count and the element stride. In return I want something I can access as an array, get the length of and pass as "array of X" parameters.

We have TArray which is great, especially with the latest XE7 additions, but that doesn't help much when you need to expose part of an existing array, and possibly with stride <> SizeOf(T).

I'd be fine with the thing having no particular lifetime management (ie like a regular pointer).

Comments