mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Add missing operators
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
parent
8276f1a204
commit
74d55a4938
@ -360,6 +360,10 @@ class uint128_fallback {
|
||||
-> uint128_fallback {
|
||||
return {lhs.hi_ & rhs.hi_, lhs.lo_ & rhs.lo_};
|
||||
}
|
||||
friend constexpr auto operator~(const uint128_fallback& n)
|
||||
-> uint128_fallback {
|
||||
return {~n.hi_, ~n.lo_};
|
||||
}
|
||||
friend auto operator+(const uint128_fallback& lhs,
|
||||
const uint128_fallback& rhs) -> uint128_fallback {
|
||||
auto result = uint128_fallback(lhs);
|
||||
@ -398,6 +402,10 @@ class uint128_fallback {
|
||||
lo_ = new_lo;
|
||||
hi_ = new_hi;
|
||||
}
|
||||
FMT_CONSTEXPR void operator&=(uint128_fallback n) {
|
||||
lo_ &= n.lo_;
|
||||
hi_ &= n.hi_;
|
||||
}
|
||||
|
||||
FMT_CONSTEXPR20 uint128_fallback& operator+=(uint64_t n) noexcept {
|
||||
if (is_constant_evaluated()) {
|
||||
|
Loading…
Reference in New Issue
Block a user