Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-07-29 10:29:16

On Sat, 27 Jul 2002, David Abrahams wrote:

dave> There's no description of the reference type, other than a mention
dave> that it exists. So, for example, I can't tell whether the following
dave> code will work:
dave> dynamic_bitset<> s(5);
dave> s[1] = s[2] = s[3] = 1;
dave> or
dave> s[1] |= s[2];
dave> We need a full description of all the operations on reference.

There is a description. Here's what the docs say:

Member Typesdefs


A proxy class that acts as a reference to a single bit. It contains an
assignment operator, a conversion to bool, an operator~, and a member
function flip. It exists only as a helper class for dynamic_bitset's
operator[]. That is, it supports the expressions x = b[i], b[i] = x, b[i]
= b[j], x = ~b[i], and b[i].flip(). (Where b is a dynamic_bitset and x is
a bool.)


 Jeremy Siek
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster ( office phone: (812) 855-3608

Boost list run by bdawes at, gregod at, cpdaniel at, john at