llvm.org GIT mirror llvm / d76b9ef
[Support][Endian] Overload += and -= This patch is to overload operator+= and operator-= for {u}{little}{big}{16,32,64}_t. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217637 91177308-0d34-0410-b5e6-96231b3b80d8 Rui Ueyama 5 years ago
1 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
9292 (void*)Value.buffer, newValue);
9393 }
9494
95 packed_endian_specific_integral &operator+=(value_type newValue) {
96 *this = *this + newValue;
97 return *this;
98 }
99
100 packed_endian_specific_integral &operator-=(value_type newValue) {
101 *this = *this - newValue;
102 return *this;
103 }
104
95105 private:
96106 AlignedCharArray::value,
97107 sizeof(value_type)> Value;