)]}'
{
  "commit": "73224f617590d68585ebed70b33f34d5dee1f45a",
  "tree": "e5d14d9f3ba9c9b6cb02ed65f30d73a32e7682e1",
  "parents": [
    "42e02c7ebfc4ac74de7a0e4676268c887436f3b4"
  ],
  "author": {
    "name": "Abseil Team",
    "email": "absl-team@google.com",
    "time": "Thu Oct 15 02:23:03 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu Oct 15 23:09:57 2026 -0700"
  },
  "message": "functional: Add C++26 bind_front\u003cConstFn\u003e(args...)\n\nPassing a function pointer or pointer-to-member as a runtime argument to\n`absl::bind_front(func, args...)` stores the pointer inside the returned\nfunctor (8 bytes for a function or data-member pointer, 16 bytes for a\nmember-function pointer) and erases the target identity into the pointer\ntype. When the resulting functor is passed to algorithms such as\n`std::sort`, the compiler cannot inline member function calls or\nconstant-propagate member offsets across the indirect call.\n\nImplement the C++26 `absl::bind_front\u003cauto ConstFn\u003e(BoundArgs\u0026\u0026...)`\noverload [1], which binds a compile-time constant invocable as a non-type\ntemplate parameter. Where the standard library provides\n`std::bind_front\u003cConstFn\u003e`, `absl::bind_front` delegates to it instead. That\nis detected with `__cpp_lib_bind_front \u003e\u003d 202306L`, plus\n`_LIBCPP_VERSION \u003e\u003d 230000` because libc++ 17 through 22 define the macro as\n202306L in C++26 mode without implementing the overload.\n\nabsl\u0027s implementation returns `absl::bind_front(ConstFnInvoker\u003cConstFn\u003e{},\nargs...)`, where the stateless `ConstFnInvoker` calls `ConstFn`. This\nreuses the runtime overload\u0027s checks on the bound arguments, and doesn\u0027t\npromise properties of the result (such as emptiness) that the standard\ndoesn\u0027t, since those would break once `absl::bind_front` delegates to\n`std::bind_front`. Include `\u003cfunctional\u003e` in front_binder.h for\n`std::invoke`, which `ConstFnInvoker` uses.\n\nBesides the basic uses, the tests check that `ConstFn` is always invoked\nthrough its `const\u0026` overload whatever the value category of the result,\nand that the result is not invocable if that overload is deleted. An\nadapted copy of libc++\u0027s tests for `std::bind_front\u003cConstFn\u003e` [2] also\npassed against this implementation. Their remaining cases are covered by\nthe existing tests or only exercise the runtime `bind_front`, so they were\nnot kept.\n\n[1] https://en.cppreference.com/cpp/utility/functional/bind_front\n[2] https://github.com/llvm/llvm-project/tree/018a9e4a74ba5d383351bda907a8b116bc5d8c47/libcxx/test/std/utilities/function.objects/func.bind.partial\n\nPiperOrigin-RevId: 999982148\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d1b46c79b1ec14d89b17cb69bbaffa9c6f89be03",
      "old_mode": 33188,
      "old_path": "absl/functional/BUILD.bazel",
      "new_id": "0cad083ec16f5fd51bee5ca2ada7bdedef1d0bd7",
      "new_mode": 33188,
      "new_path": "absl/functional/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "1ddfa291b1cd47cd7b594a73cc07c85a66c0b913",
      "old_mode": 33188,
      "old_path": "absl/functional/CMakeLists.txt",
      "new_id": "231c9dd4f9d34f1e1c54753928d2935767de105f",
      "new_mode": 33188,
      "new_path": "absl/functional/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "45ca4fc45da1da9aaad6b997feb8fee135069e49",
      "old_mode": 33188,
      "old_path": "absl/functional/bind_front.h",
      "new_id": "06b6e52509373815eb06d5b9d1f978b9b35c84e2",
      "new_mode": 33188,
      "new_path": "absl/functional/bind_front.h"
    },
    {
      "type": "modify",
      "old_id": "6e87d43c422a2559ad56f66c8f44b1b4d1c29de8",
      "old_mode": 33188,
      "old_path": "absl/functional/bind_front_test.cc",
      "new_id": "300466c64950942251037cac4c08bb1ae3a7dbee",
      "new_mode": 33188,
      "new_path": "absl/functional/bind_front_test.cc"
    },
    {
      "type": "modify",
      "old_id": "fcada9ceca02109fce399bbcf41895913b689979",
      "old_mode": 33188,
      "old_path": "absl/functional/internal/front_binder.h",
      "new_id": "33d4fb45b2072a5b058db7f032edd36403e10813",
      "new_mode": 33188,
      "new_path": "absl/functional/internal/front_binder.h"
    }
  ]
}
