Template Function Rose::BitOps::convert

Template Function Rose::BitOps::convert#

Function Documentation#

template<typename UnsignedTarget, typename UnsignedSource>
inline UnsignedTarget Rose::BitOps::convert(UnsignedSource x, bool b = false)#

Extend or truncate a value.

When the destination type is smaller than the source type, the most significant bits of the source value are discarded, otherwise the most significant bits of the destination type are set to b.