Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add __may_alias__ attribute to gsl::byte (#668)
C++17 defines `std::byte*` to have the same aliasing properties as `char*`. Hence, we mark it with the `__may_alias__` attribute under gcc and clang. Based on the fix by Martin Moene in byte-lite. Fixes #663
- Loading branch information
d6b26b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this
byte_may_alias
attribute solve the aliasing problems withgsl::byte
?I mean in the
README.md
still states that:Which is quite old - according to the git-blame its about 3 years old now.
The question is: Should we update the
README.md
or the attribute did not solve the issue completely?