)]}'
{
  "commit": "ca76c3765049cd1e379186dd3f6432d12eae68f2",
  "tree": "ddcbe0c0b90c2617e2f6791e6f497878fa46f3f9",
  "parents": [
    "fe2bcc080f089c3adfd82d02e885eb42fead2251"
  ],
  "author": {
    "name": "Niels Lohmann",
    "email": "mail@nlohmann.me",
    "time": "Sat Jul 11 15:09:28 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat Jul 11 15:09:28 2026 +0200"
  },
  "message": "Add iterator+sentinel tests and docs for binary deserializers (#5265)\n\n* Add iterator+sentinel tests and docs for binary deserializers\n\nThis commit extends the C++20 ranges support (iterator+sentinel pairs) to the\nbinary format deserializers from_cbor, from_msgpack, from_ubjson, from_bjdata,\nand from_bson, matching what was already done for parse(), accept(), and\nsax_parse().\n\nChanges:\n- Add istreambuf_sentinel helper to test_utils.hpp for EOF detection in tests\n- Add 5 new test cases that read binary files directly via\n  std::istreambuf_iterator\u003cchar\u003e + sentinel, without pre-buffering\n- Update documentation for all 5 from_* functions to document overload (3)\n  with SentinelType parameter\n- All tests pass; verified against existing test suite data\n- Fix potential buffer over-read warning in heterogeneous iterator test\n\nSigned-off-by: Niels Lohmann \u003cmail@nlohmann.me\u003e\n\n* Merge iterator+sentinel overloads and fix ambiguity/CI issues\n\nAddress PR review feedback and CI failures:\n\n- Merge the separate same-type and sentinel-type iterator overloads of\n  parse(), accept(), sax_parse(), and the five from_* binary deserializers\n  into a single overload with SentinelType defaulted to IteratorType,\n  as suggested in review. Applied the same simplification to the\n  detail::input_adapter() free functions.\n- Fix a latent ambiguity: some compilers (e.g. GCC 4.8) unreliably SFINAE\n  the operator!\u003d detection for std::nullptr_t against container/string\n  types, making calls like parse(s, nullptr, ...) ambiguous with the\n  compatible-input overload. can_compare_ne now explicitly excludes\n  std::nullptr_t as a SentinelType.\n- Use a named enable_if_t template parameter instead of an unnamed\n  function parameter for the SFINAE guard, fixing a clang-tidy\n  hicpp-named-parameter/readability-named-parameter failure.\n- Update parse.md, accept.md, sax_parse.md, and the five from_*.md pages\n  to document the merged overload instead of separate (2)/(3) overloads,\n  also fixing an over-160-char line that broke the documentation\n  style_check CI job.\n- Rework the BSON iterator+sentinel test to parse a BSON file already\n  present in the test suite instead of writing/deleting a temp file.\n\nSigned-off-by: Niels Lohmann \u003cmail@nlohmann.me\u003e\n\n* Fix -Wunneeded-internal-declaration for CustomSentinel in test\n\nCustomSentinel lives in an anonymous namespace (internal linkage), and\nthe library\u0027s parse loop only ever evaluates the iterator-first\ndirection (it !\u003d last), so the reversed-order friend operator!\u003d was\nnever referenced. Clang\u0027s -Weverything flags such unused internal\ndeclarations as an error. Drop the unused overload; the used direction\nis enough to satisfy can_compare_ne\u0027s either-order detection.\n\nSigned-off-by: Niels Lohmann \u003cmail@nlohmann.me\u003e\n\n* Fix clang-tidy hicpp-named-parameter and misc-const-correctness\n\n- Drop the unused reversed-order operator!\u003d overload from\n  utils::istreambuf_sentinel (only iterator !\u003d sentinel is ever\n  evaluated) and name the remaining friend\u0027s sentinel parameter, fixing\n  hicpp-named-parameter/readability-named-parameter.\n- Mark the istreambuf_iterator first/last helper variable const in the\n  five binary-format sentinel tests, fixing misc-const-correctness.\n\nSigned-off-by: Niels Lohmann \u003cmail@nlohmann.me\u003e\n\n* Fix clang-tidy misc-const-correctness in heterogeneous sentinel test\n\njson_str is only read via .data()/.size() and never reassigned, so\nclang-tidy correctly flags it as const-able. Verified against the exact\nCI job (silkeh/clang:dev, ci_clang_tidy target) by running clang-tidy\ndirectly on this file plus the five binary-format sentinel tests\ntouched by prior commits; all are now clean.\n\nSigned-off-by: Niels Lohmann \u003cmail@nlohmann.me\u003e\n\n---------\n\nSigned-off-by: Niels Lohmann \u003cmail@nlohmann.me\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "df239713f29346637041040537847386d0cf1d15",
      "old_mode": 33188,
      "old_path": "docs/mkdocs/docs/api/basic_json/accept.md",
      "new_id": "dac5f9f36dc82f7ce767ece16fff55f5f932040f",
      "new_mode": 33188,
      "new_path": "docs/mkdocs/docs/api/basic_json/accept.md"
    },
    {
      "type": "modify",
      "old_id": "8558e36ec895014a3efd96456628c265109faa30",
      "old_mode": 33188,
      "old_path": "docs/mkdocs/docs/api/basic_json/from_bjdata.md",
      "new_id": "150f17aac78870414b5861a6085a92d5d9e8d64e",
      "new_mode": 33188,
      "new_path": "docs/mkdocs/docs/api/basic_json/from_bjdata.md"
    },
    {
      "type": "modify",
      "old_id": "7f08ca0bd2dd7f37fa2e08edd5ebefad48f64fe6",
      "old_mode": 33188,
      "old_path": "docs/mkdocs/docs/api/basic_json/from_bson.md",
      "new_id": "eb06a7177de358b8ced71acab7f35d39ee0a7305",
      "new_mode": 33188,
      "new_path": "docs/mkdocs/docs/api/basic_json/from_bson.md"
    },
    {
      "type": "modify",
      "old_id": "b736b85819c3d7f3657dadaabbaaec9fa81094e0",
      "old_mode": 33188,
      "old_path": "docs/mkdocs/docs/api/basic_json/from_cbor.md",
      "new_id": "3792307bde5ef0cd1d22148d7392348d2b3eb982",
      "new_mode": 33188,
      "new_path": "docs/mkdocs/docs/api/basic_json/from_cbor.md"
    },
    {
      "type": "modify",
      "old_id": "69f45605f65e09d177df87fdb440feedb1e5ae01",
      "old_mode": 33188,
      "old_path": "docs/mkdocs/docs/api/basic_json/from_msgpack.md",
      "new_id": "dd771980494efa20840a215c06c583e8557ac1e1",
      "new_mode": 33188,
      "new_path": "docs/mkdocs/docs/api/basic_json/from_msgpack.md"
    },
    {
      "type": "modify",
      "old_id": "82eb2d4de2c463a4fe20b63e2351445828134cd5",
      "old_mode": 33188,
      "old_path": "docs/mkdocs/docs/api/basic_json/from_ubjson.md",
      "new_id": "55c68c0aec45cc3cf6d9bd67be0523186fc1811b",
      "new_mode": 33188,
      "new_path": "docs/mkdocs/docs/api/basic_json/from_ubjson.md"
    },
    {
      "type": "modify",
      "old_id": "4d202e8a934820456e2395272a3e5bd2a5c402c2",
      "old_mode": 33188,
      "old_path": "docs/mkdocs/docs/api/basic_json/parse.md",
      "new_id": "4565c876211ec674c5b49ea69649c08d6adcbd8a",
      "new_mode": 33188,
      "new_path": "docs/mkdocs/docs/api/basic_json/parse.md"
    },
    {
      "type": "modify",
      "old_id": "81fa461a06a4c217a88b5e74993e71ce32cc1cad",
      "old_mode": 33188,
      "old_path": "docs/mkdocs/docs/api/basic_json/sax_parse.md",
      "new_id": "606ab9bbe6b440dc2c592a883b50bd080f94f3bc",
      "new_mode": 33188,
      "new_path": "docs/mkdocs/docs/api/basic_json/sax_parse.md"
    },
    {
      "type": "modify",
      "old_id": "52d221b54405cb5d99f028e27216a778c1ed72dd",
      "old_mode": 33188,
      "old_path": "include/nlohmann/detail/input/input_adapters.hpp",
      "new_id": "1ef8a6af7b57cb8935c52bd2b2cc443fd3f5c1ee",
      "new_mode": 33188,
      "new_path": "include/nlohmann/detail/input/input_adapters.hpp"
    },
    {
      "type": "modify",
      "old_id": "3d9fe8f5e42f3c7787a1918963a9eb363ad3f40b",
      "old_mode": 33188,
      "old_path": "include/nlohmann/json.hpp",
      "new_id": "a460bb29ff17779f5a3225044636807e61688feb",
      "new_mode": 33188,
      "new_path": "include/nlohmann/json.hpp"
    },
    {
      "type": "modify",
      "old_id": "6952210c1fdc7a4fcdfad699e99784bdfcd769ab",
      "old_mode": 33188,
      "old_path": "single_include/nlohmann/json.hpp",
      "new_id": "99fceb63b96927f9eb8d367900425663eaa47240",
      "new_mode": 33188,
      "new_path": "single_include/nlohmann/json.hpp"
    },
    {
      "type": "modify",
      "old_id": "37afa21e8b4e7ee103cddf5dea12ab4325c788db",
      "old_mode": 33188,
      "old_path": "tests/src/test_utils.hpp",
      "new_id": "baa802f71702f0d4f75a4081fc9e19a146b73d6a",
      "new_mode": 33188,
      "new_path": "tests/src/test_utils.hpp"
    },
    {
      "type": "modify",
      "old_id": "c8459315d1d0d6e3909f48d1cb5971e31d3e8b82",
      "old_mode": 33188,
      "old_path": "tests/src/unit-bjdata.cpp",
      "new_id": "5af4afac17cbd76e0f2fce8ccc8a7c6e2a8ee632",
      "new_mode": 33188,
      "new_path": "tests/src/unit-bjdata.cpp"
    },
    {
      "type": "modify",
      "old_id": "eed70352e82f8ca7b5c3a44e334b92a0ea3a760a",
      "old_mode": 33188,
      "old_path": "tests/src/unit-bson.cpp",
      "new_id": "28837d75e5da3b4039525504fe6e36f6b37c83dc",
      "new_mode": 33188,
      "new_path": "tests/src/unit-bson.cpp"
    },
    {
      "type": "modify",
      "old_id": "52c808027763d22a0aed655bf8dc1ae91a0499bc",
      "old_mode": 33188,
      "old_path": "tests/src/unit-cbor.cpp",
      "new_id": "af73642997e0567cb8267fd678fd5c5db9c93a90",
      "new_mode": 33188,
      "new_path": "tests/src/unit-cbor.cpp"
    },
    {
      "type": "modify",
      "old_id": "02fb7a2e401663c9b7ddb4c1c08c7499b863d780",
      "old_mode": 33188,
      "old_path": "tests/src/unit-msgpack.cpp",
      "new_id": "4358cd46465bdc173fe344d0025692108876f1af",
      "new_mode": 33188,
      "new_path": "tests/src/unit-msgpack.cpp"
    },
    {
      "type": "modify",
      "old_id": "99d07d9669c68e90cabadf6c4e41b8eae818f4f4",
      "old_mode": 33188,
      "old_path": "tests/src/unit-ubjson.cpp",
      "new_id": "8242a0cc80c562907cb3f9a2d7d7a649f4e8fdda",
      "new_mode": 33188,
      "new_path": "tests/src/unit-ubjson.cpp"
    },
    {
      "type": "modify",
      "old_id": "1a9b6394bc9c6ab3d8c31825b9b07927395b0fee",
      "old_mode": 33188,
      "old_path": "tests/src/unit-user_defined_input.cpp",
      "new_id": "cb93439e522b71bff7fcc81077bd024154083192",
      "new_mode": 33188,
      "new_path": "tests/src/unit-user_defined_input.cpp"
    }
  ]
}
