std::bitset::flip
De 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. |
<metanoindex/>
<tbody> </tbody> bitset<N>& flip(); |
(1) | |
bitset<N>& flip( size_t pos ); |
(2) | |
Flips bits, i.e. changes true values to false and false values to true. Equivalent to a logical NOT operation on part or all of the bitset.
1) Flips all bits (equivalent to operator~())
2) Flips the bit at the position pos.
Parâmetros
| pos | - | the position of the bit to flip |
Valor de retorno
*this
Exceções
1)
2)
lança std::out_of_range se
pos não corresponde a uma posição válida no bitset.Original:
throws std::out_of_range if
pos does not correspond to a valid position within the bitset.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.
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |
Veja também
sets bits to true or given value (função pública membro) | |
os bits para falseOriginal: sets bits to falseThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
executa binário AND, OR, XOR e 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. (função pública membro) | |