On Thursday, 26 March 2015 at 02:39:56 UTC, Steven Schveighoffer wrote:

An array as an output range writes to the front. You can use std.array.Appender to get appending behavior. I know, it's weird.

Alternatively, you can add more bytes to the array, and append to the slice, but that may be ugly/hard to do.

-Steve

Hmm... isnt that't what the std.bitmanip.write function is for? It even provides an index.

I could make an 8 byte buffer and then make a slice with the last 4 bytes and use append there, but it would be rather a hack around something that should have worked.

Perhaps I have found a bug. Actually I am not sure because I am not yet familiar with the way to use templates, so there is the possibility that I am using incorrect arguments.

If only the documentation and/or test units were more clear...



Reply via email to