Function to_ulong


#include <include/EASTL/bitset.h>

unsigned long to_ulong() const


No description yet.


Lines 1251-1263 in include/EASTL/bitset.h. Line 200 in include/EASTL/bitset.h.

template <typename WordType>
inline unsigned long BitsetBase<1, WordType>::to_ulong() const
        #if((EA_PLATFORM_WORD_SIZE > 4) && defined(EA_PLATFORM_MICROSOFT)) // If we are using 64 bit words but ulong is less than 64 bits... Microsoft platforms alone use a 32 bit long under 64 bit platforms.
            // Verify that high bits are not set and thus that to_ulong doesn't lose information.
            if(mWord[0] >> 32)
                throw std::overflow_error("BitsetBase::to_ulong");
    return static_cast<unsigned long>(mWord[0]);

Add Discussion as Guest

Log in