mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 13:19:48 +01:00
Add support for built-in __int128 when available
This commit is contained in:
committed by
Victor Zverovich
parent
16e3c48bb0
commit
6de0454b42
@@ -158,7 +158,7 @@ FMT_FUNC void format_error_code(internal::buffer<char>& out, int error_code,
|
||||
static const char ERROR_STR[] = "error ";
|
||||
// Subtract 2 to account for terminating null characters in SEP and ERROR_STR.
|
||||
std::size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2;
|
||||
auto abs_value = static_cast<uint32_or_64_t<int>>(error_code);
|
||||
auto abs_value = static_cast<uint32_or_64_or_128_t<int>>(error_code);
|
||||
if (internal::is_negative(error_code)) {
|
||||
abs_value = 0 - abs_value;
|
||||
++error_code_size;
|
||||
|
||||
Reference in New Issue
Block a user