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

VC++2017 not enough actual parameters for macro 'max' #522

Closed
pavel-pimenov opened this issue Mar 18, 2017 · 2 comments
Closed

VC++2017 not enough actual parameters for macro 'max' #522

pavel-pimenov opened this issue Mar 18, 2017 · 2 comments
Labels

Comments

@pavel-pimenov
Copy link

VC++2017

default

@nlohmann
Copy link
Owner

This seems to be related to #506. Please check the develop version where we added parentheses around the min/max calls to fix this MSVC error.

(Note that the develop branch is unreleased and subject to change until version 3.0.0)

@BigJim
Copy link

BigJim commented May 12, 2020

For the record I had the same problem in two places.

The problem was not at all the json header code, but other header files defining things that conflict with STD, STL, defaults.

My project has a couple of large dependencies with a lot of header files.
I only have #include "json.hpp" in one place. I just had to add two "#undef xxx" statements just before it. Where "xxx" where the name of the conflicting defines done elsewhere before "json.hpp".
In Visual Studio highlight the problem define and press F12 (the default jump to definition key) so you can see where the problem originated.

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

3 participants