std::bitset::reference
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
template <size_t N> class bitset { // ... public: class reference { friend class bitset; reference() noexcept; public: ~reference() noexcept; reference& operator=(bool x) noexcept; reference& operator=(const reference&) noexcept; bool operator~() const noexcept; operator bool() const noexcept; reference& flip() noexcept; }; // ... };
(noexcept规格从(C++11))
原文:
(noexcept specifications are from (C++11))
的bitset类包括std::bitset::reference可公开访问的嵌套类。这个类被用作一个代理对象,允许用户进行交互的各个位的一个bitset,因为标准C + +类型(如引用和指针),不建有足够的精度来指定单个位.
原文:
The bitset class includes std::bitset::reference as a publicly-accessible nested class. This class is used as a proxy object to allow users to interact with individual bits of a bitset, since standard C++ types (like references and pointers) are not built with enough precision to specify individual bits.
的std::bitset::reference的主要用途是提供一个l值,可以返回运算符[]..
原文:
The primary use of std::bitset::reference is to provide an l-value that can be returned from 运算符[].
读取或写入到一个bitset通过std::bitset::reference发生的可能读取或写入整个基础bitset的.
原文:
Any reads or writes to a bitset that happen via a std::bitset::reference potentially read or write to the entire underlying bitset.
[编辑] 另请参阅
访问特定位 (公共成员函数) |