# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/fmt/hotfix-uint128-fallback.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Add missing operator~ to the uint128 fallback used on targets without native __int128 (e.g. i686), needed by format_hexfloat(). Signed-off-by: René Rebe --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -326,6 +326,9 @@ class uint128 { -> uint128 { return {lhs.hi_ & rhs.hi_, lhs.lo_ & rhs.lo_}; } + friend constexpr auto operator~(const uint128& n) -> uint128 { + return {~n.hi_, ~n.lo_}; + } friend FMT_CONSTEXPR auto operator+(const uint128& lhs, const uint128& rhs) -> uint128 { auto result = uint128(lhs);