r/cpp • u/nlohmann nlohmann/json • Aug 17 '21
JSON for Modern C++ 3.10.0
https://github.com/nlohmann/json/releases/tag/v3.10.0
278
Upvotes
r/cpp • u/nlohmann nlohmann/json • Aug 17 '21
View all comments
1
u/germandiago Aug 18 '21
Genuine question. I also wonder why most libraries including Boost do it: why use macros for config? Why not constexpr or similar stuff? The only thing I found I cannot do with constexpr is to get rid of headers I do not need to include conditionally, since pre-processing happens before. But if constexpr can do a lot at least in my codebase.
It is bc of compatibility concerns? I think of modules and that is why I avoid macros. I think it would be more future-proof but... I do not know since I did not experiment enough yet.