mirror of
https://github.com/fmtlib/fmt.git
synced 2025-08-02 20:24:43 +02:00
Fix the build when isinf is a macro.
This commit is contained in:
11
format.h
11
format.h
@@ -176,8 +176,11 @@ inline int SignBit(double value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline int IsInf(double x) {
|
inline int IsInf(double x) {
|
||||||
using namespace std;
|
#ifdef isinf
|
||||||
return ::isinf(x);
|
return isinf(x);
|
||||||
|
#else
|
||||||
|
return std::isinf(x);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -816,10 +819,10 @@ typedef BasicWriter<wchar_t> WWriter;
|
|||||||
|
|
||||||
// The default formatting function.
|
// The default formatting function.
|
||||||
template <typename Char, typename T>
|
template <typename Char, typename T>
|
||||||
void Format(BasicWriter<Char> &f, const FormatSpec &spec, const T &value) {
|
void Format(BasicWriter<Char> &w, const FormatSpec &spec, const T &value) {
|
||||||
std::basic_ostringstream<Char> os;
|
std::basic_ostringstream<Char> os;
|
||||||
os << value;
|
os << value;
|
||||||
f.Write(os.str(), spec);
|
w.Write(os.str(), spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
Reference in New Issue
Block a user