1. 5
  1.  

  2. 3

    I wonder if that exact problem would have been easier if C++ had compile-time reflections built into the core language.

    1. 3

      I’ve been using that JSON library a few months. It’s good, but the developer seems to be ignoring std::optional in general. My biggest gripe is that you have to first use ‘contains’ to check for a property before you ‘get’ it, if you don’t want a potential exception. Why isn’t there a ‘get_if’ method that returns an optional?

      1. 1

        my guess is that library has been around for much longer than std::optional.