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: Not enough actual parameters for macro 'max' #984

Closed
mtebele opened this issue Jun 14, 2017 · 3 comments
Closed

Warning: Not enough actual parameters for macro 'max' #984

mtebele opened this issue Jun 14, 2017 · 3 comments

Comments

@mtebele
Copy link

mtebele commented Jun 14, 2017

Hi! I'm getting the following warnings when compiling my project:

1>c:\users\matt-pc\desktop\uba\7542-sonic\sonic\libs\rapidjson\document.h(958): warning C4003: not enough actual parameters for macro 'max'

1>c:\users\matt-pc\desktop\uba\7542-sonic\sonic\libs\rapidjson\document.h(964): warning C4003: not enough actual parameters for macro 'min'

1>c:\users\matt-pc\desktop\uba\7542-sonic\sonic\libs\rapidjson\document.h(965): warning C4003: not enough actual parameters for macro 'max'

1>c:\users\matt-pc\desktop\uba\7542-sonic\sonic\libs\rapidjson\document.h(982): warning C4003: not enough actual parameters for macro 'max'

1>c:\users\matt-pc\desktop\uba\7542-sonic\sonic\libs\rapidjson\document.h(983): warning C4003: not enough actual parameters for macro 'max'

It happens with the latest release v1.1.0.

@miloyip
Copy link
Collaborator

miloyip commented Jun 15, 2017

It uses the C++ standard library
std::numeric_limits<uint64_t>::max() and so on.
I think your project may include a header which defines a macro max(a, b).

If it is due to windef.h, see stackoverflow.

@mtebele
Copy link
Author

mtebele commented Jun 15, 2017

Thanks!

@mladenmilev
Copy link

I get the same error and my question is how to resolve it if the rest of the code uses the windef.h min(a,b,)andmax(a,b)`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants