Function to_ulong

Synopsis

#include <include/EASTL/bitset.h>

unsigned long to_ulong() const

Description

No description yet.

Source

Lines 910-921 in include/EASTL/bitset.h. Line 327 in include/EASTL/bitset.h.

template <size_t NW, typename WordType>
inline unsigned long BitsetBase<NW, WordType>::to_ulong() const
{
    #if EASTL_EXCEPTIONS_ENABLED
        for(size_t i = 1; i < NW; ++i)
        {
            if(mWord[i])
                throw std::overflow_error("BitsetBase::to_ulong");
        }
    #endif
    return (unsigned long)mWord[0]; // Todo: We need to deal with the case whereby sizeof(word_type) < sizeof(unsigned long)
}





Add Discussion as Guest

Log in