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

Cannot use with types where sizeof(T) == 1 without conversion operator #5

Open
Pharap opened this issue Jun 11, 2017 · 0 comments
Open

Comments

@Pharap
Copy link

Pharap commented Jun 11, 2017

If you use a type that isn't implicitly convertible from uint8_t, but still has a size of 1, the program won't compile because the code is trying to convert uint8_t to T but there's no suitable conversion.

Add a padding byte and it will compile fine, but that's not a desirable workaround.

Also adding such a conversion is not desirable for some types (e.g. enum class types).

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