)]}'
{
  "commit": "aad5fa9a294c48fa0dcacba0a73641c81d9d792a",
  "tree": "a943499a50e84ed389e5fc976fce540a1fb09a09",
  "parents": [
    "1d51b00830dd1b60d0e1df5bdebe283bbc332d25"
  ],
  "author": {
    "name": "Niels Lohmann",
    "email": "mail@nlohmann.me",
    "time": "Wed Aug 19 20:32:52 2026 +0200"
  },
  "committer": {
    "name": "Claude",
    "email": "noreply@anthropic.com",
    "time": "Mon Aug 31 23:24:37 2026 +0000"
  },
  "message": "Address review findings on the binary writer output sinks\n\n- binary_reserve_hint(): the 4-bytes-per-element estimate over-reserved by up\n  to 4x for arrays of small scalars (CBOR encodes 0..23 in one byte), and the\n  returned vector kept that capacity. Make the hint a strict lower bound on the\n  encoded size instead, which also removes the 1 MiB clamp whose branch no test\n  could reach (the largest container in the suite has 65793 elements).\n\n- Guard the -Wduplicated-branches pragma with __GNUC__ \u003e\u003d 7. The warning does\n  not exist before GCC 7, so naming it made GCC 4.8/4.9/5/6 - which the CI\n  matrix still builds - warn under -Wpragmas on every including translation\n  unit, breaking downstream -Werror builds.\n\n- Constrain the adapter constructor of binary_writer with the enable_if its\n  documentation already claimed, so a writer over some other sink type is no\n  longer advertised as constructible from an output adapter.\n\n- Let output_vector_adapter wrap output_vector_sink rather than duplicating the\n  append logic, so the type-erased and templated paths share one implementation.\n\n- Collapse the three copies of the memcpy/byte_swap/memcpy dance into a single\n  byte_swap_buffer() helper, and add the MSVC _byteswap_* intrinsics so MSVC no\n  longer falls back to the scalar shuffle this change exists to eliminate.\n\n- Add a vector_writer() helper for the five vector-returning to_* overloads\n  instead of spelling out the writer type at each call site, and drop a dead\n  default member initializer on output_adapter_sink.\n\n- New tests: the vector sink and the adapter sink must produce identical bytes\n  for every format (the two to_* overloads no longer delegate to each other and\n  could otherwise drift), and binary_reserve_hint() must never exceed the size\n  actually written.\n\nSigned-off-by: Niels Lohmann \u003cmail@nlohmann.me\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "27122a26b48e4cbc9f52326102507ea3ba87b22b",
      "old_mode": 33188,
      "old_path": "include/nlohmann/detail/output/binary_writer.hpp",
      "new_id": "98a2e234ed1bf05dc02ef11fe261a9cc0e183f52",
      "new_mode": 33188,
      "new_path": "include/nlohmann/detail/output/binary_writer.hpp"
    },
    {
      "type": "modify",
      "old_id": "497bde768439ba47fd5c704d7ebc0dc47397f47c",
      "old_mode": 33188,
      "old_path": "include/nlohmann/detail/output/output_adapters.hpp",
      "new_id": "7eb73121c927b44fcccfca6770c6733fa13c13b3",
      "new_mode": 33188,
      "new_path": "include/nlohmann/detail/output/output_adapters.hpp"
    },
    {
      "type": "modify",
      "old_id": "002399bc026044fb047f052159e33b51b0380390",
      "old_mode": 33188,
      "old_path": "include/nlohmann/json.hpp",
      "new_id": "128015f53a84a175c63219ad27d945224915d156",
      "new_mode": 33188,
      "new_path": "include/nlohmann/json.hpp"
    },
    {
      "type": "modify",
      "old_id": "c9cbb9809b6b9353956a0e36eeae0473bb3777b1",
      "old_mode": 33188,
      "old_path": "single_include/nlohmann/json.hpp",
      "new_id": "47552534bd0528887df2b53a0642224e15a7ecf2",
      "new_mode": 33188,
      "new_path": "single_include/nlohmann/json.hpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f60e1bf514dfbfb70c43a7933dfc13fc67a6a500",
      "new_mode": 33188,
      "new_path": "tests/src/unit-binary_writer_sinks.cpp"
    }
  ]
}
