PrevUpHomeNext

Bits or Bytes Operation

utx::bit_v

Get the bit value of the basic type.

can be constexpr: true
Example:
utx::print(
	utx::bit_v<utx::u16>,	// 16
	utx::bit_v<utx::i64>,	// 64
	utx::bit_v<utx::f32>,	// 32
	utx::bit_v<utx::uc8>,	// 8
	utx::bit_v<float>	// 32
);

utx::bit_v can not be applied to non-basic types. Incorrect Case:

utx::bit_v<utx::ext::i32>;

utx::ext::ext_integral_type::bits

A method of class utx::ext::ext_integral_type to get the underlying bit field value bits.

Examples:
utx::ext::i32 a = 9;
utx::print(a.bits()); // 32

PrevUpHomeNext