Boost logo

Boost :

Subject: Re: [boost] [assign] operators+= and -= for set/reset bits in std::bitset
From: Duncan Exon Smith (duncanphilipnorman_at_[hidden])
Date: 2010-12-07 12:21:17


On 7 December 2010 10:40, Jeffrey Lee Hellrung, Jr. <jhellrung_at_[hidden]>wrote:

> I would usually consider "set bit at indices 1,3,4,5 to true" to yield
> "00111010", but it depends which direction you like to write your bitset
> bits...
>
> - Jeff

It should have the same effect as:
 bitset<8> bits;
 bits.set(1);
 bits.set(3);
 bits.set(4);
 bits.set(5);

Anything else would be terribly confusing. Note that this corresponds to
"00111010".


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk