class reference {
public:
reference& operator=(const reference& x);
reference& operator=(bool x);
void flip();
bool operator~() const;
operator bool() const;
};
The type describes an object that can serve as a reference to an element of the controlled sequence. Specifically, for
two objects x
and y
of class reference
:
bool(x)
yields the value of the element designated by x
~x
yields the inverted value of the element designated by x
x.flip()
inverts the value stored in x
y = bool(x)
and y = x
both assign the value of the element designated by x
to the element designated by y
It is unspecified how member functions of class vector<bool, A>
construct objects of class reference
that
designate elements of a controlled sequence. The default constructor for class reference
generates an object that
refers to no such element.