You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VC++2017 not enough actual parameters for macro 'max' #522
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.
Activity
nlohmann commentedon Mar 18, 2017
This seems to be related to #506. Please check the
developversion where we added parentheses around the min/max calls to fix this MSVC error.(Note that the
developbranch is unreleased and subject to change until version 3.0.0)BigJim commentedon 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.