summaryrefslogtreecommitdiff
path: root/absl/numeric/int128.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/numeric/int128.h')
-rw-r--r--absl/numeric/int128.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/numeric/int128.h b/absl/numeric/int128.h
index 235361a8..198aa195 100644
--- a/absl/numeric/int128.h
+++ b/absl/numeric/int128.h
@@ -810,6 +810,14 @@ inline bool operator>=(uint128 lhs, uint128 rhs) { return !(lhs < rhs); }
// Unary operators.
+constexpr inline uint128 operator+(uint128 val) {
+ return val;
+}
+
+constexpr inline int128 operator+(int128 val) {
+ return val;
+}
+
inline uint128 operator-(uint128 val) {
uint64_t hi = ~Uint128High64(val);
uint64_t lo = ~Uint128Low64(val) + 1;