From f45b908803511e8c007bf26a4e98371021c66087 Mon Sep 17 00:00:00 2001 From: Roman Koshelev Date: Sun, 12 Sep 2021 18:09:05 +0300 Subject: [PATCH] Removed redundant format_decimal implementation for constexpr context --- include/fmt/format.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 40ad018f0cfb7..5f3c74068ba70 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1103,14 +1103,6 @@ FMT_CONSTEXPR20 auto format_decimal(Char* out, UInt value, int size) FMT_ASSERT(size >= count_digits(value), "invalid digit count"); out += size; Char* end = out; - if (is_constant_evaluated()) { - while (value >= 10) { - *--out = static_cast('0' + value % 10); - value /= 10; - } - *--out = static_cast('0' + value); - return {out, end}; - } while (value >= 100) { // Integer division is slow so do it for a group of two digits instead // of for every digit. The idea comes from the talk by Alexandrescu