[Boost.dynamic_bitset bug]: operators <<= and >>= interchanged?
boost_1_33_1
Dear all,
I suspect that the shift operator of the dynamic_bitset are reversed.
Best regards,
Martin Moene
___
C:\>dynamic_bitset.exe
x :11111
x <<= 1:01111
x >>= 2:11100
/*
* dynamic_bitset bug: operator <<= and >>= interchanged.
*
* cl -GX -ID:/Libraries/boost_1_33_1/ dynamic_bitset.cpp
* cl -GX -IC:/Libraries/boost_1_33_1/ dynamic_bitset.cpp
* cl -GX -I%BOOST% dynamic_bitset.cpp
*/
#include <iostream>
#include
On Wed, 17 Jan 2007, Martin Moene wrote:
boost_1_33_1
Dear all,
I suspect that the shift operator of the dynamic_bitset are reversed.
They are not, the problem is that you display the bits in reversed order (least to most significant) in your operator<< . -- François Duranleau LIGUM, Université de Montréal
François Duranleau wrote:
On Wed, 17 Jan 2007, Martin Moene wrote:
boost_1_33_1
Dear all,
I suspect that the shift operator of the dynamic_bitset are reversed.
They are not, the problem is that you display the bits in reversed order (least to most significant) in your operator<< . Thanks,
I'm working on (bit-)images and am used to look at pixels from left to right. Had better better read the documentation of std::bitset and its dynamic analogue first... From the SGI documentation: bitset's interface resembles that of unsigned integers. ... In general, bit 0 is the least significant bit and bit N-1 is the most significant bit. Martin.
participants (3)
-
François Duranleau
-
Martin J. Moene
-
Martin Moene