Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from using uint8_t to std::byte #199

Open
Shillaker opened this issue Dec 15, 2021 · 0 comments
Open

Switch from using uint8_t to std::byte #199

Shillaker opened this issue Dec 15, 2021 · 0 comments

Comments

@Shillaker
Copy link
Collaborator

Shillaker commented Dec 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant