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
P1272 Byteswapping for fun&&nuf #270
Comments
Titus Winters 2018-11-10 04:17:10 UTC This goes into <bit>. Require that bit-width is a power-of-two, forward to LWG for C++20. |
I'm going to schedule this in LWG. |
@mclow, this might need some CWG attention (at your discretion), similar to bit_cast. For example, what about padding bits in the object representation of an integer? |
Interesting idea. Do we have any integral types that do not "completely fill" an even number of bytes? (bool and char/unsigned char, yes, I think we can just call disable them) |
@mclow, note that "byte" equals (the size of) char/unsigned char in the C++ standard by definition (and might not be related to an octet, i.e. an 8-bit quantity); see [intro.memory]. |
SG6: Leave the issue to other committees. |
LWG reviewed this on Thursday AM. U/consent for C++20 (after minor edits |
P1272R1 Byteswapping for fun&&nuf (Isabella Muerte) |
D1272R3 approved by CWG in Cologne 2019. |
Scheduled for LWG review 2021-01-29. |
Discussed in LWG 2021-01-29. Author will clarify with core details w.r.t. to padding bits. https://wiki.edg.com/bin/view/Wg21telecons2021/P1272-20210129 |
Note to self: CWG are tracking this so LWG should inform them when we decide on a final disposition. |
@jwakely The author reach out to me indicating she has no time to work on her papers at the moment. |
The concern was that this is unimplementable by the library. The parameter is passed by value, we have no idea if it came from a bit-field. However, reading it again, I'm not sure that's a problem. If a bit-field gets promoted and/or converted to an integral type then there are no padding bits, the "extra" bits are zero bits that are part of the value representation. I think this is forbidding byte swapping something like I'll check with Core so Izzy doesn't need to. |
New revision -- planned as backup paper for re-review on 2021-09-24 https://wiki.edg.com/pub/Wg21telecons2021/LibraryWorkingGroup/D1272R4.html |
LWG reviewed and approved during 2021-09-24 telecom https://wiki.edg.com/bin/view/Wg21telecons2021/P1272-20210924 poll: put P1272r4 into C++23
|
P1272R4 Byteswapping for fun&&nuf (Isabella Muerte, Corentin Jabot) |
Adopted 2021-10. |
P1272R0 Byteswapping for fun&&nuf (Isabella Muerte)
https://issues.isocpp.org/show_bug.cgi?id=560
The text was updated successfully, but these errors were encountered: