Sdílet prostřednictvím


bitset::operator>>=

Posune bity bitset pravé 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í vpravo.

Vrácená hodnota

Cílené bitset upravena tak, aby byly bity posunutí vpravo 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_RSE.cpp
// compile with: /EHsc
#include <bitset>
#include <iostream>

int main( )
{
   using namespace std;
   bitset<5> b1 ( 28 );
   cout << "The target bitset b1 is: ( "<< b1 << " )." << endl;

   b1 >>= 2;
   cout << "After shifting the bits 2 positions to the right,\n"
        << " the target bitset b1 becomes: ( "<< b1 << " )." 
        << endl;
}
  
  

Požadavky

Záhlaví: <bitset>

Obor názvů: std

Viz také

Referenční dokumentace

bitset Class