[Support][Endian] Define |= and &= for u{big,little}{16,32,64}_t.

llvm-svn: 239716
This commit is contained in:
Rui Ueyama 2015-06-15 03:00:15 +00:00
parent 1c2e89a57a
commit 55144e2423
1 changed files with 10 additions and 0 deletions

View File

@ -104,6 +104,16 @@ struct packed_endian_specific_integral {
return *this;
}
packed_endian_specific_integral &operator|=(value_type newValue) {
*this = *this | newValue;
return *this;
}
packed_endian_specific_integral &operator&=(value_type newValue) {
*this = *this & newValue;
return *this;
}
private:
AlignedCharArray<PickAlignment<value_type, alignment>::value,
sizeof(value_type)> Value;