S
swcamry
class bitset::reference {
friend class bitset;
reference(); // no public
constructor
public:
~reference();
operator bool () const; // convert to bool
reference& operator= ( bool x ); // assign from bool
reference& operator= ( const reference& x ); // assign from bit
reference& flip(); // flip bit value
bool operator~() const; // return inverse value
}
What is the purpose of resolution operator :: in the above
declaration?
Why did the creator of bitset need to introduce other name
("reference")?
Regards,
Sam
friend class bitset;
reference(); // no public
constructor
public:
~reference();
operator bool () const; // convert to bool
reference& operator= ( bool x ); // assign from bool
reference& operator= ( const reference& x ); // assign from bit
reference& flip(); // flip bit value
bool operator~() const; // return inverse value
}
What is the purpose of resolution operator :: in the above
declaration?
Why did the creator of bitset need to introduce other name
("reference")?
Regards,
Sam