mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Workaround a gcc 9.1 bug (#2334)
This commit is contained in:
@ -148,8 +148,7 @@ template <> FMT_FUNC int count_digits<4>(detail::fallback_uintptr n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if __cplusplus < 201703L
|
#if __cplusplus < 201703L
|
||||||
template <typename T>
|
template <typename T> constexpr const char basic_data<T>::digits[][2];
|
||||||
constexpr const typename basic_data<T>::digit_pair basic_data<T>::digits[];
|
|
||||||
template <typename T> constexpr const char basic_data<T>::hex_digits[];
|
template <typename T> constexpr const char basic_data<T>::hex_digits[];
|
||||||
template <typename T> constexpr const char basic_data<T>::signs[];
|
template <typename T> constexpr const char basic_data<T>::signs[];
|
||||||
template <typename T> constexpr const unsigned basic_data<T>::prefixes[];
|
template <typename T> constexpr const unsigned basic_data<T>::prefixes[];
|
||||||
|
@ -875,8 +875,7 @@ template <typename T = void> struct basic_data {
|
|||||||
static const uint64_t log10_2_significand = 0x4d104d427de7fbcc;
|
static const uint64_t log10_2_significand = 0x4d104d427de7fbcc;
|
||||||
|
|
||||||
// GCC generates slightly better code for pairs than chars.
|
// GCC generates slightly better code for pairs than chars.
|
||||||
using digit_pair = char[2];
|
FMT_API static constexpr const char digits[][2] = {
|
||||||
FMT_API static constexpr const digit_pair digits[] = {
|
|
||||||
{'0', '0'}, {'0', '1'}, {'0', '2'}, {'0', '3'}, {'0', '4'}, {'0', '5'},
|
{'0', '0'}, {'0', '1'}, {'0', '2'}, {'0', '3'}, {'0', '4'}, {'0', '5'},
|
||||||
{'0', '6'}, {'0', '7'}, {'0', '8'}, {'0', '9'}, {'1', '0'}, {'1', '1'},
|
{'0', '6'}, {'0', '7'}, {'0', '8'}, {'0', '9'}, {'1', '0'}, {'1', '1'},
|
||||||
{'1', '2'}, {'1', '3'}, {'1', '4'}, {'1', '5'}, {'1', '6'}, {'1', '7'},
|
{'1', '2'}, {'1', '3'}, {'1', '4'}, {'1', '5'}, {'1', '6'}, {'1', '7'},
|
||||||
|
Reference in New Issue
Block a user