名前空間
変種
操作

<div class="t-tr-text">C + +の概念:<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">C++ concepts:</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> BitmaskType

提供: cppreference.com
< cpp‎ | concept

 
 
C + +の概念
基本
Original:
Basic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ライブラリワイド
Original:
Library-Wide
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
コンテナ
Original:
Container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
コンテナ要素
Original:
Container Elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
イテレータ
Original:
Iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
乱数
Original:
Random Numbers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
同時実行
Original:
Concurrency
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
BasicLockable(C++11)
Lockable(C++11)
TimedLockable(C++11)
Mutex(C++11)
TimedMutex(C++11)
その他
Original:
Other
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
に設定されていることを示しています。定数値のセットまたはそれらの値の任意の組み合わせを表すために使用できるタイプを定義します。この特性は、通常、追加の演算子のオーバーロードを持つ整数型、std::bitset、または列挙(スコープとスコープを持たない)によって実装されてい.
Original:
Defines a type that can be used to represent a set of constant values or any combination of those values. This trait is typically implemented by integer types, std::bitset, or enumerations (scoped and unscoped) with additional operator overloads.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 要件

ビットマスク型は、ビットマスク型の異なる値であるビットマスク要素は、有限数を支持するよう、その任意のペアCiとCjに対する、Ci & Ci != 0Ci & Cj == 0.
Original:
The bitmask type supports a finite number of bitmask elements, which are distinct values of the bitmask type, such that, for any pair Ci and Cj, Ci & Ci != 0 and Ci & Cj == 0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ビット演算子operator&operator|operator^operator~operator&=operator|=、とoperator^=ビットマスク型の値に対して定義されており、ビットマスク要素が異なる整数値であった場合は、符号なし整数の演算子を持っているであろう対応するには組み込み型と同じ意味を持っています2の累乗.
Original:
The bitwise operators operator&, operator|, operator^, operator~, operator&=, operator|=, and operator^= are defined for values of the bitmask type and have the same semantics as the corresponding built-in operators on unsigned integers would have if the bitmask elements were the distinct integer powers of two.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
次の式は、整形式であり、どのBitsetType X
Original:
The following expressions are well-formed and have the following meaning for any BitsetType X
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
X |= Y
オブジェクトX
Original:
sets the value Y in the object X
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
X &= ~Y
における値Yを設定します。オブジェクトX
Original:
clears the value Y in the object X
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
X&Y != 0
の値yを消去します。値Yは、オブジェクトX
Original:
indicates that the value Y is set in the object X
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ための次のような意味を持っています。各representibleビットマスク要素はビットマスク型のconstexpr値として定義されてい.
Original:
Each representible bitmask element is defined as a constexpr value of the bitmask type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 用法

以下の標準的なライブラリー·タイプはBitmaskType満たす
Original:
The following standard library types satisfy BitmaskType:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • std::ctype_base::mask
  • std::ios_base::fmtflags
  • std::ios_base::iostate
  • std::ios_base::openmode
  • std::regex_traits::char_class_type
  • std::regex_constants::syntax_option_type
  • std::regex_constants::match_flag_type
  • std::launch,
int n = std::ios_base::hexは必ずしもstd::ios_base::fmtflagsに暗黙的に変換できませんので、いくつかの特定の実装オプション(例えばint)に依存しているコードは、移植性のないです.
Original:
Code that relies on some particular implementation option (e.g. int n = std::ios_base::hex), is nonportable because std::ios_base::fmtflags is not necessarily implicitly convertible to int.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.