New append_arrays
compile time option
Adds the compile time option (and wrapper) append_arrays
, which appends data to types like std::vector rather than overwrite. (#1549)
Example:
std::vector<int> v{};
constexpr glz::opts append_opts{.append_arrays = true};
expect(not glz::read<append_opts>(v, "[1,2,3]"));
expect(v == std::vector<int>{1,2,3});
expect(not glz::read<append_opts>(v, "[4,5,6]"));
expect(v == std::vector<int>{1,2,3,4,5,6});
Improvements
- Support for dynamically sized Eigen types by @WanZhiQiu-ac in #1541
- Support for reflection with Eigen vector types in #1552
- Improved glz::async_string with more methods and std::format support by @stephenberry in #1536, #1538
- Cleanup of map writing in #1542
- Fix for always_null_t in object handling and faster always null write in #1545
- More efficient numerical keys in dynamic maps in #1546
Minor Deprecation
- Removed global
glz::trace
in #1544
Because C++ has inline variables and other ways to make global instances it is better to let the programmer handle global instances of glz::trace rather than offer two separate APIs. This also removes the unnecessary glz::write_file_trace as
glz::write_file_json(trace
is more generic and there is no longer a global instance of the trace.
New Contributors
- @WanZhiQiu-ac made their first contribution in #1541
Full Changelog: v4.2.4...v4.3.0