faabric icon indicating copy to clipboard operation
faabric copied to clipboard

Switch from using `uint8_t` to `std::byte`

Open Shillaker opened this issue 3 years ago • 0 comments

std::byte is the standard way to represent raw memory, which we currently do with uint8_t.

std::byte avoids the temptation to use any character or arithmetic semantics, and should thus reduce the risk of dodgy memory manipulation that may otherwise be possible.

However, std::byte is not interoperable with uint8_t, so if we make the change bit-by-bit we'll end up with some awkward casting. Instead we should do a wholesale change in a single PR.

Shillaker avatar Dec 15 '21 11:12 Shillaker