Fix GCC6 compilation error in count_digits
GCC6 appears to need the explicit return type there. Otherwise, it fails with: > error: use of 'fmt::v9::detail::count_digits(UInt)::<lambda(UInt)> [with int BITS = 4; UInt = long long unsigned int]' before deduction of 'auto'
This commit is contained in:
parent
a33701196a
commit
8455bb8a00
@ -1107,7 +1107,7 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int {
|
|||||||
return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
|
return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
|
||||||
#endif
|
#endif
|
||||||
// Lambda avoids unreachable code warnings from NVHPC.
|
// Lambda avoids unreachable code warnings from NVHPC.
|
||||||
return [](UInt m) {
|
return [](UInt m) -> int {
|
||||||
int num_digits = 0;
|
int num_digits = 0;
|
||||||
do {
|
do {
|
||||||
++num_digits;
|
++num_digits;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user