bitset::operator<<=
Bity bitset posune doleva určený počet pozic a vrátí výsledek cílené bitset.
bitset<N>& operator<<=(
size_t _Pos
);
Parametry
- _Pos
Počet pozic bitset bity jsou posunutí vlevo.
Vrácená hodnota
Cílené bitset upravena tak, aby byly bity vlevo posunuty požadovaný počet pozic.
Poznámky
Pokud neexistuje žádný prvek posunout do polohy, vymaže funkce bitu na hodnotu 0.
Příklad
// bitset_op_LSE.cpp
// compile with: /EHsc
#include <bitset>
#include <iostream>
int main( )
{
using namespace std;
bitset<5> b1 ( 7 );
cout << "The target bitset b1 is: ( "<< b1 << " )." << endl;
b1 <<= 2;
cout << "After shifting the bits 2 positions to the left,\n"
<< " the target bitset b1 becomes: ( "<< b1 << " )."
<< endl;
}
Požadavky
Záhlaví: <bitset>
Obor názvů: std