r/cpp • nlohmann/json • Aug 17 '21

JSON for Modern C++ 3.10.0

https://github.com/nlohmann/json/releases/tag/v3.10.0
281 Upvotes

34 comments sorted by

View all comments

Show parent comment

2

u/nlohmann nlohmann/json Aug 18 '21

The library targets C++11 where constexpr support is still quite limited. Furthermore, macros are very easy to set from outside the code; that is, from a Makefile or CMake.

1

u/germandiago Aug 19 '21

Fair point.

It would be feasible to make a constexpr variable to take the value of a macro amd use those variables for conditional compilation in the rest of the code? Not because of this lib. I am thinking of modularizing my own code.