Function operator>>=

Synopsis

#include <include/EASTL/bitset.h>

void operator>>=(size_type n)

Description

No description yet.

Source

Lines 766-783 in include/EASTL/bitset.h. Line 119 in include/EASTL/bitset.h.

template <size_t NW, typename WordType>
inline void BitsetBase<NW, WordType>::operator>>=(size_type n)
{
    const size_type nWordShift = (size_type)(n >> kBitsPerWordShift);
    if(nWordShift)
    {
        for(size_t i = 0; i < NW; ++i)
            mWord[i] = ((nWordShift < (NW - i)) ? mWord[i + nWordShift] : (word_type)0);
    }
    if(n &= kBitsPerWordMask)
    {
        for(size_t i = 0; i < (NW - 1); ++i)
            mWord[i] = (word_type)((mWord[i] >> n) | (mWord[i + 1] << (kBitsPerWord - n)));
        mWord[NW - 1] >>= n;
    }
}





Add Discussion as Guest

Log in