mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Implement signbit for MSVC.
This commit is contained in:
parent
ce60483833
commit
10108c75a5
10
format.cc
10
format.cc
@ -135,6 +135,16 @@ void FormatDecimal(char *buffer, uint64_t value, unsigned num_digits) {
|
||||
buffer[1] = DIGITS[index + 1];
|
||||
buffer[0] = DIGITS[index];
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
int signbit(double value) {
|
||||
if (value < 0) return 1;
|
||||
if (!isnan(value)) return 0;
|
||||
int dec = 0, sign = 0;
|
||||
ecvt(value, 0, &dec, &sign);
|
||||
return sign;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BasicFormatter::operator<<(int value) {
|
||||
|
Loading…
Reference in New Issue
Block a user