Closed BenjaminLawson closed 1 year ago
Looks like the bitwise operators return int, so we need to add static_cast around them:
ValueType MaskInValue(ValueType original_value, ValueType new_value) const {
ValueType original_mask = static_cast<ValueType>(
~(MaskToNBits(static_cast<ValueType>(~ValueType{0}), size_) << offset_));
return static_cast<ValueType>((original_value & original_mask) | (new_value << offset_));
}
In Fuchsia, implicit narrowing conversions are errors, so OffsetBitBlock fails to compile:
I'll work on a merge request.