)]}'
{
  "commit": "ccb7129f54fcef8db14c7e662cec4ae98ad13541",
  "tree": "6a8926204eb51e63a2a802fcc812c86c824db276",
  "parents": [
    "e8e8d6ab22f39938607f31d457d4d359c130f078"
  ],
  "author": {
    "name": "Scott Wolchok",
    "email": "swolchok@meta.com",
    "time": "Mon Feb 16 23:00:21 2026 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Feb 16 23:00:21 2026 -0800"
  },
  "message": "Improve performance of enum_ operators by going back to specific implementation (#5887)\n\n* Improve performance of enum_ operators by going back to specific implementation\n\ntest_enum needs a patch because ops are now overloaded and this affects their docstrings.\n\n* outline call_impl to save on code size\n\nThis does cause more move constructions, as shown by the needed update to test_copy_move. Up to reviewers whether they want more code size or more moves.\n\n* add function_ref.h to PYBIND11_HEADERS.\n\n* Update test_copy_move tests with C++17 passing values just so we can see mostly-not-red tests\n\n* Remove stray TODO\n\n* fix clang-tidy\n\n* fix clang-tidy again. add function_ref.h to test_files.py\n\n* Add static assertion for function_ref lifetime safety in call_impl\n\nAdd a static_assert to document and enforce that function_ref is\ntrivially copyable, ensuring safe pass-by-value usage. This also\ndocuments the lifetime safety guarantees: function_ref is created\nfrom cap-\u003ef which lives in the capture object, and is only used\nsynchronously within call_impl without being stored beyond its scope.\n\n* Add #undef cleanup for enum operator macros\n\nUndefine all enum operator macros after their last use to prevent\nmacro pollution and follow the existing code pattern. This matches\nthe cleanup pattern used for the previous enum operator macros.\n\n* Rename PYBIND11_THROW to PYBIND11_ENUM_OP_THROW_TYPE_ERROR\n\nRename the macro to be more specific and avoid potential clashes with\npublic macros. The new name clearly indicates it\u0027s scoped to enum\noperations and describes its purpose (throwing a type error).\n\n* Clarify comments in function_ref.h\n\nReplace vague comments about \u0027extensions to \u003cfunctional\u003e\u0027 and \u0027functions\u0027\nwith a clearer description that this is a header-only class template\nsimilar to std::function but with non-owning semantics. This makes it\nclear that it\u0027s template-only and requires no additional library linking.\n\n---------\n\nCo-authored-by: Ralf W. Grosse-Kunstleve \u003crgrossekunst@nvidia.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "097b4eba251d83cf2cf86e5f7836cb1a7ddc1c6e",
      "old_mode": 33188,
      "old_path": "CMakeLists.txt",
      "new_id": "bca0c22dc073f7fdc1240b531c5dd0ac1a4f11bb",
      "new_mode": 33188,
      "new_path": "CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "9fc5b2d618ec72dc6efe9986d96abce1aa123f99",
      "old_mode": 33188,
      "old_path": "include/pybind11/detail/common.h",
      "new_id": "d1ab6deeb4d0a1fee7212fe2dff4b5b95eb5cb55",
      "new_mode": 33188,
      "new_path": "include/pybind11/detail/common.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a81bdfe13f78b0512ecf5c63c0030c9203f7af37",
      "new_mode": 33188,
      "new_path": "include/pybind11/detail/function_ref.h"
    },
    {
      "type": "modify",
      "old_id": "0f31262c47c1391c8f6815440a3fb33e31fc41b1",
      "old_mode": 33188,
      "old_path": "include/pybind11/pybind11.h",
      "new_id": "76d998a3ba4c65f0a299fc61aeb801ffa5913484",
      "new_mode": 33188,
      "new_path": "include/pybind11/pybind11.h"
    },
    {
      "type": "modify",
      "old_id": "1539b171a230b20c181fc6f4c5756cf09583ae99",
      "old_mode": 33188,
      "old_path": "tests/extra_python_package/test_files.py",
      "new_id": "d96e9afc1ff577721efb4924553979a4c449db6f",
      "new_mode": 33188,
      "new_path": "tests/extra_python_package/test_files.py"
    },
    {
      "type": "modify",
      "old_id": "3a3f29341471ddf4b7c00f41dd22c033011e874a",
      "old_mode": 33188,
      "old_path": "tests/test_copy_move.py",
      "new_id": "d843793350deac1fc6c9ec3a9d3a256e81accb0c",
      "new_mode": 33188,
      "new_path": "tests/test_copy_move.py"
    },
    {
      "type": "modify",
      "old_id": "f295b0145787b5250dcf15bc5663d8b2951d2767",
      "old_mode": 33188,
      "old_path": "tests/test_enum.py",
      "new_id": "52083caa03e4652a24f704f414a7ab9cddc92756",
      "new_mode": 33188,
      "new_path": "tests/test_enum.py"
    }
  ]
}
