Function operator>>=

Synopsis

#include <include/EASTL/bitset.h>

void operator>>=(size_type n)

Description

No description yet.

Source

Lines 1436-1451 in include/EASTL/bitset.h. Line 252 in include/EASTL/bitset.h.

template <typename WordType>
inline void BitsetBase<2, WordType>::operator>>=(size_type n)
{
    if(n) // to avoid a shift by kBitsPerWord, which is undefined
    {
        if(EASTL_UNLIKELY(n >= kBitsPerWord))   // parent expected to handle n >= 64
        {
            mWord[0] = mWord[1];
            mWord[1] = 0;
            n -= kBitsPerWord;
        }

        mWord[0] = (mWord[0] >> n) | (mWord[1] << (kBitsPerWord - n)); // Intentionally use | instead of +.
        mWord[1] >>= n;
    }
}





Add Discussion as Guest

Log in