Boost logo

Boost :

Subject: [boost] [Endian] Reading/writing from/to byte buffers
From: Olaf van der Spek (ml_at_[hidden])
Date: 2017-01-27 06:00:40


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<big_int64_buf_t&>(*p) but I think
functions would be more convenient.

On second guess one probably has to use memcpy rather then reinterpret_cast.

The functions are probably implemented already but aren't exposed.

https://github.com/boostorg/endian/issues/17

-- 
Olaf

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk