reference& 作用
template <typename Block, typename Allocator>class dynamic_bitset
{
public:
typedef Block block_type;
typedef implementation-defined size_type;
enum { bits_per_block = CHAR_BIT * sizeof(Block) };
class reference
{
public:
// An automatically generated copy constructor.
reference& operator=(bool value);
reference& operator|=(bool value);
reference& operator&=(bool value);
reference& operator^=(bool value);
reference& operator-=(bool value);
reference& operator=(const reference& j);
reference& operator|=(const reference& j);
reference& operator&=(const reference& j);
reference& operator^=(const reference& j);
reference& operator-=(const reference& j);
bool operator~() const;
operator bool() const;
reference& flip();
};
typedef bool const_reference;
看到库文件中的bitset 第一中由上述语句,看不懂定义这个class reference有什么作用?