Function operator[]

Summary

#include <include/EASTL/bitset.h>

(1) reference operator[](size_type i)

(2) bool operator[](size_type i) const

Function overload

Synopsis

#include <include/EASTL/bitset.h>

reference operator[](size_type i)

Description

No description yet.

Source

Lines 1979-1989 in include/EASTL/bitset.h. Line 391 in include/EASTL/bitset.h.

template <size_t N, typename WordType>
inline typename bitset<N, WordType>::reference
bitset<N, WordType>::operator[](size_type i)
{
    #if EASTL_ASSERT_ENABLED
        if(EASTL_UNLIKELY(!(i < N)))
            EASTL_FAIL_MSG("bitset::operator[] -- out of range");
    #endif
    return reference(*this, i);
}

Synopsis

#include <include/EASTL/bitset.h>

bool operator[](size_type i) const

Description

No description yet.

Source

Lines 1992-2001 in include/EASTL/bitset.h. Line 392 in include/EASTL/bitset.h.

template <size_t N, typename WordType>
inline bool bitset<N, WordType>::operator[](size_type i) const
{
    #if EASTL_ASSERT_ENABLED
        if(EASTL_UNLIKELY(!(i < N)))
            EASTL_FAIL_MSG("bitset::operator[] -- out of range");
    #endif
    return (DoGetWord(i) & (static_cast<word_type>(1) << (i & kBitsPerWordMask))) != 0;
}





Add Discussion as Guest

Log in