Show a patch.

GET /api/patches/24907/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 24907,
    "url": "https://patchwork.libcamera.org/api/patches/24907/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24907/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20251030165816.1095180-5-barnabas.pocze@ideasonboard.com>",
    "date": "2025-10-30T16:57:58",
    "name": "[RFC,v3,04/22] libcamera: base: cxx20: Add `type_identity{, _t}`",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "613d7a641ba9b1de9f4d925e004dda4f7d560cee",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24907/mbox/",
    "series": [
        {
            "id": 5545,
            "url": "https://patchwork.libcamera.org/api/series/5545/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5545",
            "date": "2025-10-30T16:57:54",
            "name": "libcamera: Add `MetadataList`",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5545/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24907/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24907/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 8A3F5C32D4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Oct 2025 16:58:33 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6CB0B60990;\n\tThu, 30 Oct 2025 17:58:28 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A97DB608DC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Oct 2025 17:58:21 +0100 (CET)",
            "from pb-laptop.local (185.221.140.239.nat.pool.zt.hu\n\t[185.221.140.239])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A62D1E33;\n\tThu, 30 Oct 2025 17:56:31 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"b+QMKywT\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761843391;\n\tbh=WtclvwcEGVeNjqk9NUASUu+f9QRky4OsOLH0IVX3Lns=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=b+QMKywT2PTtroazp8hhsNWYJxSd57XuxXiFuTNtaWWWt6nnHXzHoe0ZpSNUWLA4Z\n\tzRqu+uvzJItc0mj8F/odD8DCVHNFnKkvzx0Er2xmOf1mFIrs3MMrrloc6IL0Ds9BW4\n\tWOrPA5ns5Hf6DOgUQGW6KjJ+aQYYMtGcIC6bmUPM=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>",
        "Subject": "[RFC PATCH v3 04/22] libcamera: base: cxx20: Add `type_identity{,\n\t_t}`",
        "Date": "Thu, 30 Oct 2025 17:57:58 +0100",
        "Message-ID": "<20251030165816.1095180-5-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.51.1",
        "In-Reply-To": "<20251030165816.1095180-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20251030165816.1095180-1-barnabas.pocze@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "`type_identity_t` can be used to force non-deduced contexts\nin templates, such as:\n\n  void f(T x, type_identity_t<T> y)\n\nwhen calling `f(1u, 2)`, without `type_identity_t`, the compiler\ncould not unambiguously deduce `T` (unsigned int vs int). However,\nwith `type_identity_t`, the type of the argument passed to `y`\nwill not be used to deduce `T`, only the argument passed to `x`.\n\nSee https://en.cppreference.com/w/cpp/types/type_identity\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/base/internal/cxx20.h | 24 ++++++++++++++++++++++++\n 1 file changed, 24 insertions(+)",
    "diff": "diff --git a/include/libcamera/base/internal/cxx20.h b/include/libcamera/base/internal/cxx20.h\nindex 70a43f83c9..1f4caf56f8 100644\n--- a/include/libcamera/base/internal/cxx20.h\n+++ b/include/libcamera/base/internal/cxx20.h\n@@ -15,4 +15,28 @@\n \n namespace libcamera::internal::cxx20 {\n \n+/**\n+ * \\internal\n+ * \\brief std::type_identity\n+ *\n+ * Implementation of std::type_identity for C++17.\n+ */\n+template<typename T> struct type_identity {\n+\t/**\n+\t * \\internal\n+\t * \\brief std::type_identity<T>::type\n+\t *\n+\t * Type alias matching the template parameter.\n+\t */\n+\tusing type = T;\n+};\n+\n+/**\n+ * \\internal\n+ * \\brief std::type_identity_t\n+ *\n+ * Implementation of std::type_identity_t for C++17.\n+ */\n+template<typename T> using type_identity_t = typename type_identity<T>::type;\n+\n } /* namespace libcamera::internal::cxx20 */\n",
    "prefixes": [
        "RFC",
        "v3",
        "04/22"
    ]
}