Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning C4003: “max”宏的实参不足 #766

Closed
ccpaging opened this issue Oct 13, 2016 · 2 comments
Closed

warning C4003: “max”宏的实参不足 #766

ccpaging opened this issue Oct 13, 2016 · 2 comments
Labels

Comments

@ccpaging
Copy link

rapidjson\document.h(958): warning C4003: “max”宏的实参不足
rapidjson\document.h(964): warning C4003: “min”宏的实参不足
rapidjson\document.h(965): warning C4003: “max”宏的实参不足
rapidjson\document.h(982): warning C4003: “max”宏的实参不足
rapidjson\document.h(983): warning C4003: “max”宏的实参不足

Visual Studio 2010

Add following in _MSC_VER section of document.h

#undef max
#undef min
@miloyip
Copy link
Collaborator

miloyip commented Oct 13, 2016

These macros are not defined by Visual C++ actually.
They should have been defined by WinDef.h.
You may defined NOMINMAX macro to prevent defining such macros.
It is not safe to just undef them in document.h as there is no way to restore them.

@miloyip
Copy link
Collaborator

miloyip commented Oct 17, 2016

Fixed in #748

@miloyip miloyip closed this as completed Oct 17, 2016
@miloyip miloyip added the build label Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants