Commit 3b1a0374 authored by Milo Yip's avatar Milo Yip Committed by GitHub

Merge pull request #748 from sfinktah/sfinktah-minwindef-fix

Fix for winmindef.h defining min/max macros
parents 23632279 51a31ce0
...@@ -29,6 +29,14 @@ RAPIDJSON_DIAG_PUSH ...@@ -29,6 +29,14 @@ RAPIDJSON_DIAG_PUSH
#ifdef _MSC_VER #ifdef _MSC_VER
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data
#ifdef _MINWINDEF_ // see: http://stackoverflow.com/questions/22744262/cant-call-stdmax-because-minwindef-h-defines-max
#ifndef NOMINMAX
#pragma push_macro("min")
#pragma push_macro("max")
#undef min
#undef max
#endif
#endif
#endif #endif
#ifdef __clang__ #ifdef __clang__
...@@ -2573,6 +2581,12 @@ private: ...@@ -2573,6 +2581,12 @@ private:
}; };
RAPIDJSON_NAMESPACE_END RAPIDJSON_NAMESPACE_END
#ifdef _MINWINDEF_ // see: http://stackoverflow.com/questions/22744262/cant-call-stdmax-because-minwindef-h-defines-max
#ifndef NOMINMAX
#pragma pop_macro("min")
#pragma pop_macro("max")
#endif
#endif
RAPIDJSON_DIAG_POP RAPIDJSON_DIAG_POP
#endif // RAPIDJSON_DOCUMENT_H_ #endif // RAPIDJSON_DOCUMENT_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment