Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Page 432: Bitset example does not pass tests. The bit order tests in it are backwards. #104
The code in the book looks like this:
But the code needed to actually pass the test is this:
The original code tests the bits in human reading order, but the passing test requires them to instead be ordered in least-significant to most-significant bit order.
Perhaps you accidentally forgot to compile this example.
Alternatively, I suppose a bit ordering difference is also conceivable, although I doubt it. I'm on a 64-bit version of Windows 7, running Visual Studio C++ 2019, in case that's relevant in that case.
(Also, as usual, I'm on the Kindle ebook version of the book.)