std::bitset::operator&=,|=,^=,~
Aus 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. |
bitset<N>& operator&=(const bitset<N>& other ); | (1) | |
bitset<N>& operator|=(const bitset<N>& other ); | (2) | |
bitset<N>& operator^=(const bitset<N>& other ); | (3) | |
bitset<N> operator~()const; | (4) | |
Führt einen binären AND, OR, XOR und NOT .
1) 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.
You can help to correct and verify the translation. Click here for instructions.
Setzt die Bits zu dem Ergebnis der binären UND auf entsprechende Paare von Bits der *this und
2) other
.Original:
Sets the bits to the result of binary AND on corresponding pairs of bits of *this and
other
.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.
Setzt die Bits zu dem Ergebnis der binären ODER auf entsprechende Paare von Bits der *this und
3) other
.Original:
Sets the bits to the result of binary OR on corresponding pairs of bits of *this and
other
.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.
Setzt die Bits zu dem Ergebnis der binären XOR auf entsprechende Paare von Bits der *this und
4) other
.Original:
Sets the bits to the result of binary XOR on corresponding pairs of bits of *this and
other
.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.
Gibt eine temporäre Kopie der *this mit allen Bits gekippt (binary NOT) .
Original:
Returns a temporary copy of *this with all bits flipped (binary NOT).
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.
{{{1}}}
Original:
{{{2}}}
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.
Inhaltsverzeichnis |
[Bearbeiten]Parameter
other | - | anderen bitset Original: another bitset The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[Bearbeiten]Rückgabewert
1-3) *this
4)a bitset <N> temporären bei der alle Bits gekippt
Original:
a bitset<N> temporary with all bits flipped
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.
[Bearbeiten]Beispiel
#include <iostream>#include <string>#include <bitset> int main(){std::bitset<16> dest;std::string pattern_str ="1001";std::bitset<16> pattern(pattern_str); for(size_t i =0, ie = dest.size()/pattern_str.size(); i != ie;++i){ dest <<= pattern_str.size(); dest |= pattern;}std::cout<< dest <<'\n';}
Output:
1001100110011001
[Bearbeiten]Siehe auch
führt binäre Verschiebung nach links und rechts schieben 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. (öffentliche Elementfunktion) |