 
- C 标准库
- C 标准库
- C++ 标准库
- C++ 库 - 主页
- C++ 库 - <fstream>
- C++ 库 - <iomanip>
- C++ 库 - <ios>
- C++ 库 - <iosfwd>
- C++ 库 - <iostream>
- C++ 库 - <istream>
- C++ 库 - <ostream>
- C++ 库 - <sstream>
- C++ 库 - <streambuf>
- C++ 库 - <原子>
- C++ 库 - <复杂>
- C++ 库 - <异常>
- C++ 库 - <功能>
- C++ 库 - <限制>
- C++ 库 - <语言环境>
- C++ 库 - <内存>
- C++ 库 - <新>
- C++ 库 - <数字>
- C++ 库 - <正则表达式>
- C++ 库 - <stdexcept>
- C++ 库 - <字符串>
- C++ 库 - <线程>
- C++ 库 - <元组>
- C++ 库 - <类型信息>
- C++ 库 - <实用程序>
- C++ 库 - <valarray>
C++ 位集库 - reference() 函数
描述
C++ std::bitset::reference是嵌入式类,它提供可以从std::bitset::operator[]返回的左值。通过std::bitset::reference对位集执行的任何读取或写入操作最终都会读取或写入整个底层位集。
宣言
以下是 std::bitset::reference 类形式 std::bitset 标头的声明。
C++98
class bitset::reference {
   friend class bitset;
   reference();		/* Private constructor */
public:
   ~reference();
   operator bool() const;
   reference& operator = (bool x);
   reference& operator = (const reference& x);
   reference& flip();
   bool operator~() const;
}
C++11
class bitset::reference {
   friend class bitset;
   reference() noexcept;		/* Private constructor */
public:
   ~reference();
   operator bool() const noexcept;
   reference& operator= (bool x) noexcept;
   reference& operator= (const reference& x) noexcept;
   reference& flip() noexcept;
   bool operator~() const noexcept;
}
位集.htm