mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Fix the build when isinf is a macro.
This commit is contained in:
parent
695bb2f3d4
commit
dcb82310eb
11
format.h
11
format.h
@ -176,8 +176,11 @@ inline int SignBit(double value) {
|
||||
}
|
||||
|
||||
inline int IsInf(double x) {
|
||||
using namespace std;
|
||||
return ::isinf(x);
|
||||
#ifdef isinf
|
||||
return isinf(x);
|
||||
#else
|
||||
return std::isinf(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
@ -816,10 +819,10 @@ typedef BasicWriter<wchar_t> WWriter;
|
||||
|
||||
// The default formatting function.
|
||||
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;
|
||||
os << value;
|
||||
f.Write(os.str(), spec);
|
||||
w.Write(os.str(), spec);
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
|
Loading…
Reference in New Issue
Block a user