The cast to void[] is implicit: void[] bytesof = (&structvar)[0..1]; and there's no need for the .sizeof if you leave the pointer of type struct*. It also makes sense to make the cast to byte[] NOT implicit, since the resulting array might not be portable on a system with different endianess. L.