)]}'
{
  "commit": "37c2487312d2997bed16343f642ecb5e83bac979",
  "tree": "29d0d11be9ee7eff3e28246a14758db1a30cc758",
  "parents": [
    "6577f365ebdee7dda71cb996efa29d3714cbccd0"
  ],
  "author": {
    "name": "Pedro Alves",
    "email": "pedro@palves.net",
    "time": "Thu Jul 21 21:55:37 2022 +0100"
  },
  "committer": {
    "name": "Pedro Alves",
    "email": "pedro@palves.net",
    "time": "Fri Jul 22 14:18:49 2022 +0100"
  },
  "message": "Introduce gdb::make_function_view\n\nThis adds gdb::make_function_view, which lets you create a function\nview from a callable without specifying the function_view\u0027s template\nparameter.  For example, this:\n\n    auto lambda \u003d [\u0026] (int) { ... };\n    auto fv \u003d gdb::make_function_view (lambda);\n\ninstead of:\n\n    auto lambda \u003d [\u0026] (int) { ... };\n    gdb::function_view\u003cvoid (int)\u003e fv \u003d lambda;\n\nIt is particularly useful if you have a template function with an\noptional function_view parameter, whose type depends on the function\u0027s\ntemplate parameters.  Like:\n\n    template\u003ctypename T\u003e\n    void my_function (T v, gdb::function_view\u003cvoid(T)\u003e callback \u003d nullptr);\n\nFor such a function, the type of the callback argument you pass must\nalready be a function_view.  I.e., this wouldn\u0027t compile:\n\n    auto lambda \u003d [\u0026] (int) { ... };\n    my_function (1, lambda);\n\nWith gdb::make_function_view, you can write the call like so:\n\n    auto lambda \u003d [\u0026] (int) { ... };\n    my_function (1, gdb::make_function_view (lambda));\n\nUnit tests included.\n\nTested by building with GCC 9.4, Clang 10, and GCC 4.8.5, on x86_64\nGNU/Linux, and running the unit tests.\n\nChange-Id: I5c4b3b4455ed6f0d8878cf1be189bea3ee63f626\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7af0245c570e2083a9bc99158e2695d001d6b84d",
      "old_mode": 33188,
      "old_path": "gdb/unittests/function-view-selftests.c",
      "new_id": "726c22323a8166ed8d6a510f4d1de8883313c4d3",
      "new_mode": 33188,
      "new_path": "gdb/unittests/function-view-selftests.c"
    },
    {
      "type": "modify",
      "old_id": "1875cd104b7fd4d0cdc498ccc8dd9a13cc06309f",
      "old_mode": 33188,
      "old_path": "gdbsupport/function-view.h",
      "new_id": "9f8a8680cf40532c2758e8478df18a82c4e539f1",
      "new_mode": 33188,
      "new_path": "gdbsupport/function-view.h"
    }
  ]
}
