Cpp-standard-library-cpp-bitset-reference
提供:Dev Guides
C ++ビットセットライブラリ-reference()関数
説明
- C ++ *std
- bitset :: reference* は、 `+ std :: bitset :: operator [] `から返されるl値を提供する埋め込みクラスです。 ` std :: bitset :: reference +`を介してビットセットに対して実行される読み取りまたは書き込み操作は、最終的には基になるビットセット全体を読み取りまたは書き込みます。
宣言
- 以下は、std
- bitsetヘッダーのstd :: bitset :: referenceクラスの宣言です。
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;
}