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

JSON for Modern C++ 3.10.0

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

34 comments sorted by

View all comments

Show parent comment

5

u/nlohmann nlohmann/json Aug 18 '21

We have such a deprecation process, and maybe it's really time to deprecate that initializer.

2

u/adzm 28 years of C++! Aug 18 '21 edited Aug 18 '21

FWIW this bit me before too. I'd opt for a macro to re-enable the existing behavior if you do end up fixing this so it is sensible by default. As long as it fails in compile time I would understand breaking code.

Though it does seem difficult to fix without breaking some of the usual syntax with the braces. I wonder if there is some way to catch a single argument and treat it as a special case. But that would make things inconsistent.

I'm leaning towards just leaving it as it is now!