Function from_uint64

Synopsis

#include <include/EASTL/bitset.h>

void from_uint64(uint64_t value)

Description

No description yet.

Source

Lines 893-907 in include/EASTL/bitset.h. Line 132 in include/EASTL/bitset.h.

template <size_t NW, typename WordType>
inline void BitsetBase<NW, WordType>::from_uint64(uint64_t value)
{
    reset();
    #if(EA_PLATFORM_WORD_SIZE == 4)
        mWord[0] = static_cast<word_type>(value);
        EASTL_CT_ASSERT(NW > 2); // We can assume this because we have specializations of BitsetBase for <1> and <2>.
        //if(NW > 1) // NW is a template constant, but it would be a little messy to take advantage of it's const-ness.
            mWord[1] = static_cast<word_type>(value >> 32);
    #else
        mWord[0] = static_cast<word_type>(value);
    #endif
}





Add Discussion as Guest

Log in