Update typo and rm whitespaces

This commit is contained in:
Suzy Wang 2022-11-10 12:32:40 -08:00
parent 73e5cd91c8
commit 84a8c02d78

View File

@ -16,8 +16,8 @@ std::decay_t<To> bit_cast(const From & from)
* Assume the source value is 0xAABBCCDD (i.e. sizeof(from) == 4).
* Its BE representation is 0xAABBCCDD, the LE representation is 0xDDCCBBAA.
* Further assume, sizeof(res) == 8 and that res is initially zeroed out.
* With LE, the result after bit_cast is 0xDDCCBBAA00000000 (no change to the previous behavior).
* With BE, we previously produced 0xAABBCCDD00000000 and we now produce 0x00000000AABBCCDD
* With LE, the result after bit_cast will be 0xDDCCBBAA00000000 --> input value == output value.
* With BE, the result after bit_cast will be 0x00000000AABBCCDD --> input value == output value.
*/
To res {};
static_assert(sizeof(From) <= sizeof(To));