On Monday, 3 August 2015 at 09:40:59 UTC, Atila Neves wrote:
In this case, yes. In the real-life case I was simplifying, it wasn't a ubyte[] array, it was an array of structs with non-trivial serialisation that also depended on a previous deserialised variable. It was more like this:struct Outer { static struct Header { ... } Header header; @LengthInBytes("length - headerSize") Inner[] array; } struct Inner { static struct Header { ... } Header header;@ArrayLength("length") Unit[] units; //actual length of the array instead of in bytes} struct Unit { ... } So maybe not as useless after all ;) Atila
Thanks. Very nice indeed.
