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

Use std::byte for bytes_type #73

Open
jwakely opened this issue Nov 25, 2017 · 1 comment
Open

Use std::byte for bytes_type #73

jwakely opened this issue Nov 25, 2017 · 1 comment
Labels

Comments

@jwakely
Copy link
Member

jwakely commented Nov 25, 2017

For v2 (or when merging into the IS) we should consider using std::byte instead of unsigned char.

@jwakely jwakely added the future label Nov 25, 2017
@isnullxbh
Copy link

Hello, Mr. Wakely!

Quote from en.cppreference.com:

Like char and unsigned char, it can be used to access raw memory occupied by other objects (object representation), but unlike those types, it is not a character type and is not an arithmetic type. A byte is only a collection of bits, and the only operators defined for it are the bitwise ones.

What is the advantage of usage of std::byte instead unsigned char type? Should we use type that was invented in the first place to hold a raw byte in memory without the assumption that it's a character?

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

No branches or pull requests

2 participants