[Endian] Reading/writing from/to byte buffers
Hi,
One often needs to read or write values from/to a buffer while having a
pointer. Could you support this?
I guess one could use *reinterpret_cast
Aliasing rules in C++ prohibit the use of reinterpret_cast in this situation unless the dynamic type pointed to by p is actually big_int64_buf_t.
On Sat, Jan 28, 2017 at 6:13 AM, David Stone
Aliasing rules in C++ prohibit the use of reinterpret_cast in this situation unless the dynamic type pointed to by p is actually big_int64_buf_t.
Right, so something like read_be64(const void*) would be nice to have. Beman? -- Olaf
Ping ;)
On Wed, Feb 1, 2017 at 12:04 PM, Olaf van der Spek
On Sat, Jan 28, 2017 at 6:13 AM, David Stone
wrote: Aliasing rules in C++ prohibit the use of reinterpret_cast in this situation unless the dynamic type pointed to by p is actually big_int64_buf_t.
Right, so something like read_be64(const void*) would be nice to have.
Beman?
-- Olaf
-- Olaf
participants (2)
-
David Stone
-
Olaf van der Spek