bitset::operator<<=
Posune doleva určený počet pozic bity bitset a vrátí výsledek cílené bitset.
bitset<N>& operator<<=(
size_t _Pos
);
Parametry
- _Pos
Počet pozic nalevo, bity bitset mají být posunuty.
Vrácená hodnota
Cílené bitset upravena tak, aby byly bity posunuty doleva požadovaný počet pozic.
Poznámky
Pokud neexistuje žádný prvek posunout do polohy, funkce vymaže bit 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