std::bitset
提供:cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Defined in header <bitset>
|
||
template< size_t N > class bitset; |
||
The class template bitset
represents a fixed-size sequence of bits. Bitsets can be manipulated by usual logic operators, converted to and from strings and integers.
bitset
CopyConstructible
の要件を満たしており、CopyAssignable
.Original:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] メンバータイプ
proxy class representing a reference to a bit (クラス) |
[編集] メンバ関数
bitsetを構築します Original: constructs the bitset The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
内容を比較します Original: compares the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
Original: Element access The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
特定のビットにアクセスします Original: accesses specific bit The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
特定のビットにアクセスします Original: accesses specific bit The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
(C++11) |
チェックすべての場合は、任意またはnoneビットがtrueに設定されています Original: checks if all, any or none bits are set to true The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |
trueに設定されたビットの数を返します Original: returns the number of bits set to true The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
Original: Capacity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
bitsetのが保持できるビットの大きさの数を返します Original: returns the size number of bits that the bitset can hold The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
Original: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
バイナリのAND、OR、XORとNOTを実行します Original: performs binary AND, OR, XOR and NOT The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
右バイナリシフトと左シフトを実行します Original: performs binary shift left and shift right The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
sets bits to true or given value (パブリックメンバ関数) | |
falseにビットを設定します Original: sets bits to false The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
ビットの値を切り替えることができます Original: toggles the values of bits The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
Original: Conversions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
データの文字列表現を返します Original: returns a string representation of the data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
データのunsigned long整数表現を返します Original: returns an unsigned long integer representation of the data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
(C++11) |
データのunsigned long long整数表現を返します Original: returns an unsigned long long integer representation of the data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |
[編集] 非メンバ関数
ビット集合上の2値論理演算を実行する Original: performs binary logic operations on bitsets The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (機能) | |
ビット集合のストリームの入力と出力を行います Original: performs stream input and output of bitsets The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (機能) |
[編集] ヘルパークラス
(C++11) |
std::bitsetハッシュをサポート Original: hash support for std::bitset The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレートの特殊化の2つの値を比較します) |
[編集] ノート
If the size of the bitset is not known at compile time, std::vector<bool> or boost::dynamic_bitset may be used.