On 4/19/22 01:46, bauss wrote: > However it should be fairly trivial like: > > void rawWriteValue(T)(T value) > { > rawWrite(*cast((T[1]*)(&value))); > } > > Or is there some downside to this that I'm missing?
Nonet that I can see. I think I used the following version in actual code (adding the missing File parameter as well):
void rawWriteValue(T)(File file, T value) { file.rawWrite((&value)[0..1]); } Ali