Show a patch.

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

{
    "id": 16859,
    "url": "https://patchwork.libcamera.org/api/patches/16859/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16859/",
    "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": "<20220728111303.15241-1-laurent.pinchart@ideasonboard.com>",
    "date": "2022-07-28T11:13:03",
    "name": "[libcamera-devel] libcamera: Drop unnecessary typename keyword used with std::enable_if_t",
    "commit_ref": "1715b7ed089a8c3009ca39e0bd3081da217c61bc",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0ca96c7e6203e97b77778c17a219765af93f7866",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16859/mbox/",
    "series": [
        {
            "id": 3340,
            "url": "https://patchwork.libcamera.org/api/series/3340/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3340",
            "date": "2022-07-28T11:13:03",
            "name": "[libcamera-devel] libcamera: Drop unnecessary typename keyword used with std::enable_if_t",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3340/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16859/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16859/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 E9E18BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 28 Jul 2022 11:13:08 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4EBB863312;\n\tThu, 28 Jul 2022 13:13:08 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 32AF66330D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Jul 2022 13:13:07 +0200 (CEST)",
            "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7D46556D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Jul 2022 13:13:06 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659006788;\n\tbh=wHogU+HkQWOhak1vnOQFlwh/9EJm4+vAk38LrYeJ28M=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=fDPe0N5GzFdJw/XLNLQgemW4uV9VfKJG65HzxpRfqf+nJy4ZLMzN1ntwN+jM8Wcb+\n\tlc32ktD09iAxgcfsMRNk0MftPN+pyRZx8tZc5zjZ2vYp4fe0eODQZMPNbZF4h1T2ab\n\t01JvoKr9lPU/Id5tVG/XV8RTmXnZvHkkYvOmOv3uZSYndnZF/W2B6dTzWk8pPvIaO0\n\tGEhyktxxtYfYxpivexBnVInd7104K6HknbXiwiq0ezpZgtl0ZJ5Qkl0/VE94V+4MjK\n\tSibPG+xgdD9+IBl71qxTClXCIpHJmvaZaU3i3x3WDxxEEFF/jRk0V7Kmjy4uBwoKBH\n\tjOwWNiZJ+cXaw==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659006786;\n\tbh=wHogU+HkQWOhak1vnOQFlwh/9EJm4+vAk38LrYeJ28M=;\n\th=From:To:Subject:Date:From;\n\tb=W/cELXeNUL+xC7TXlHtT+hqojji+mRwNnBhzYSwvytQgSUD0r9TPOQpqGu7BH7jVS\n\tr5ucIMG8JKDtQLcpQn9RmAm6DE9k4LrTqpllL3LTavhsd+ACKrYFtdyGzjV5Iu+FAV\n\tsgi4gcHTmHedIq3r8PIUz1zPpFzkUwZEMz+udAqo="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"W/cELXeN\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 28 Jul 2022 14:13:03 +0300",
        "Message-Id": "<20220728111303.15241-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] libcamera: Drop unnecessary typename\n\tkeyword used with std::enable_if_t",
        "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>",
        "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Usage of the std::enable_if_t type doesn't need to be prefixed by\ntypename. Drop the unnecessary keyword.\n\nReported-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/base/bound_method.h         |  2 +-\n include/libcamera/base/flags.h                |  8 ++--\n include/libcamera/base/object.h               |  2 +-\n include/libcamera/base/signal.h               |  8 ++--\n include/libcamera/controls.h                  | 38 +++++++++----------\n .../libcamera/internal/ipa_data_serializer.h  |  2 +-\n include/libcamera/internal/yaml_parser.h      |  4 +-\n src/libcamera/yaml_parser.cpp                 |  2 +-\n 8 files changed, 33 insertions(+), 33 deletions(-)\n\n\nbase-commit: c13f86704b129636bb6d84f8b8ca37826ded3238",
    "diff": "diff --git a/include/libcamera/base/bound_method.h b/include/libcamera/base/bound_method.h\nindex e73a4d98ddae..c0275249f389 100644\n--- a/include/libcamera/base/bound_method.h\n+++ b/include/libcamera/base/bound_method.h\n@@ -72,7 +72,7 @@ public:\n \t}\n \tvirtual ~BoundMethodBase() = default;\n \n-\ttemplate<typename T, typename std::enable_if_t<!std::is_same<Object, T>::value> * = nullptr>\n+\ttemplate<typename T, std::enable_if_t<!std::is_same<Object, T>::value> * = nullptr>\n \tbool match(T *obj) { return obj == obj_; }\n \tbool match(Object *object) { return object == object_; }\n \ndiff --git a/include/libcamera/base/flags.h b/include/libcamera/base/flags.h\nindex bff3b93c85a1..a1b404bdf23b 100644\n--- a/include/libcamera/base/flags.h\n+++ b/include/libcamera/base/flags.h\n@@ -147,7 +147,7 @@ struct flags_enable_operators {\n };\n \n template<typename E>\n-typename std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>\n+std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>\n operator|(E lhs, E rhs)\n {\n \tusing type = std::underlying_type_t<E>;\n@@ -155,7 +155,7 @@ operator|(E lhs, E rhs)\n }\n \n template<typename E>\n-typename std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>\n+std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>\n operator&(E lhs, E rhs)\n {\n \tusing type = std::underlying_type_t<E>;\n@@ -163,7 +163,7 @@ operator&(E lhs, E rhs)\n }\n \n template<typename E>\n-typename std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>\n+std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>\n operator^(E lhs, E rhs)\n {\n \tusing type = std::underlying_type_t<E>;\n@@ -171,7 +171,7 @@ operator^(E lhs, E rhs)\n }\n \n template<typename E>\n-typename std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>\n+std::enable_if_t<flags_enable_operators<E>::enable, Flags<E>>\n operator~(E rhs)\n {\n \tusing type = std::underlying_type_t<E>;\ndiff --git a/include/libcamera/base/object.h b/include/libcamera/base/object.h\nindex eef1a2c98ef9..933336361155 100644\n--- a/include/libcamera/base/object.h\n+++ b/include/libcamera/base/object.h\n@@ -32,7 +32,7 @@ public:\n \tvoid postMessage(std::unique_ptr<Message> msg);\n \n \ttemplate<typename T, typename R, typename... FuncArgs, typename... Args,\n-\t\t typename std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>\n+\t\t std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>\n \tR invokeMethod(R (T::*func)(FuncArgs...), ConnectionType type,\n \t\t       Args&&... args)\n \t{\ndiff --git a/include/libcamera/base/signal.h b/include/libcamera/base/signal.h\nindex 91000d0d6349..efb591bc5073 100644\n--- a/include/libcamera/base/signal.h\n+++ b/include/libcamera/base/signal.h\n@@ -44,7 +44,7 @@ public:\n \t}\n \n #ifndef __DOXYGEN__\n-\ttemplate<typename T, typename R, typename std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>\n+\ttemplate<typename T, typename R, std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>\n \tvoid connect(T *obj, R (T::*func)(Args...),\n \t\t     ConnectionType type = ConnectionTypeAuto)\n \t{\n@@ -52,7 +52,7 @@ public:\n \t\tSignalBase::connect(new BoundMethodMember<T, R, Args...>(obj, object, func, type));\n \t}\n \n-\ttemplate<typename T, typename R, typename std::enable_if_t<!std::is_base_of<Object, T>::value> * = nullptr>\n+\ttemplate<typename T, typename R, std::enable_if_t<!std::is_base_of<Object, T>::value> * = nullptr>\n #else\n \ttemplate<typename T, typename R>\n #endif\n@@ -63,7 +63,7 @@ public:\n \n #ifndef __DOXYGEN__\n \ttemplate<typename T, typename Func,\n-\t\t typename std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>\n+\t\t std::enable_if_t<std::is_base_of<Object, T>::value> * = nullptr>\n \tvoid connect(T *obj, Func func, ConnectionType type = ConnectionTypeAuto)\n \t{\n \t\tObject *object = static_cast<Object *>(obj);\n@@ -71,7 +71,7 @@ public:\n \t}\n \n \ttemplate<typename T, typename Func,\n-\t\t typename std::enable_if_t<!std::is_base_of<Object, T>::value> * = nullptr>\n+\t\t std::enable_if_t<!std::is_base_of<Object, T>::value> * = nullptr>\n #else\n \ttemplate<typename T, typename Func>\n #endif\ndiff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex 7920abbad2eb..b1b52acba0fd 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -99,10 +99,10 @@ public:\n \tControlValue();\n \n #ifndef __DOXYGEN__\n-\ttemplate<typename T, typename std::enable_if_t<!details::is_span<T>::value &&\n-\t\t\t\t\t\t       details::control_type<T>::value &&\n-\t\t\t\t\t\t       !std::is_same<std::string, std::remove_cv_t<T>>::value,\n-\t\t\t\t\t\t       std::nullptr_t> = nullptr>\n+\ttemplate<typename T, std::enable_if_t<!details::is_span<T>::value &&\n+\t\t\t\t\t      details::control_type<T>::value &&\n+\t\t\t\t\t      !std::is_same<std::string, std::remove_cv_t<T>>::value,\n+\t\t\t\t\t      std::nullptr_t> = nullptr>\n \tControlValue(const T &value)\n \t\t: type_(ControlTypeNone), numElements_(0)\n \t{\n@@ -110,9 +110,9 @@ public:\n \t\t    &value, 1, sizeof(T));\n \t}\n \n-\ttemplate<typename T, typename std::enable_if_t<details::is_span<T>::value ||\n-\t\t\t\t\t\t       std::is_same<std::string, std::remove_cv_t<T>>::value,\n-\t\t\t\t\t\t       std::nullptr_t> = nullptr>\n+\ttemplate<typename T, std::enable_if_t<details::is_span<T>::value ||\n+\t\t\t\t\t      std::is_same<std::string, std::remove_cv_t<T>>::value,\n+\t\t\t\t\t      std::nullptr_t> = nullptr>\n #else\n \ttemplate<typename T>\n #endif\n@@ -144,9 +144,9 @@ public:\n \t}\n \n #ifndef __DOXYGEN__\n-\ttemplate<typename T, typename std::enable_if_t<!details::is_span<T>::value &&\n-\t\t\t\t\t\t       !std::is_same<std::string, std::remove_cv_t<T>>::value,\n-\t\t\t\t\t\t       std::nullptr_t> = nullptr>\n+\ttemplate<typename T, std::enable_if_t<!details::is_span<T>::value &&\n+\t\t\t\t\t      !std::is_same<std::string, std::remove_cv_t<T>>::value,\n+\t\t\t\t\t      std::nullptr_t> = nullptr>\n \tT get() const\n \t{\n \t\tassert(type_ == details::control_type<std::remove_cv_t<T>>::value);\n@@ -155,9 +155,9 @@ public:\n \t\treturn *reinterpret_cast<const T *>(data().data());\n \t}\n \n-\ttemplate<typename T, typename std::enable_if_t<details::is_span<T>::value ||\n-\t\t\t\t\t\t       std::is_same<std::string, std::remove_cv_t<T>>::value,\n-\t\t\t\t\t\t       std::nullptr_t> = nullptr>\n+\ttemplate<typename T, std::enable_if_t<details::is_span<T>::value ||\n+\t\t\t\t\t      std::is_same<std::string, std::remove_cv_t<T>>::value,\n+\t\t\t\t\t      std::nullptr_t> = nullptr>\n #else\n \ttemplate<typename T>\n #endif\n@@ -172,18 +172,18 @@ public:\n \t}\n \n #ifndef __DOXYGEN__\n-\ttemplate<typename T, typename std::enable_if_t<!details::is_span<T>::value &&\n-\t\t\t\t\t\t       !std::is_same<std::string, std::remove_cv_t<T>>::value,\n-\t\t\t\t\t\t       std::nullptr_t> = nullptr>\n+\ttemplate<typename T, std::enable_if_t<!details::is_span<T>::value &&\n+\t\t\t\t\t      !std::is_same<std::string, std::remove_cv_t<T>>::value,\n+\t\t\t\t\t      std::nullptr_t> = nullptr>\n \tvoid set(const T &value)\n \t{\n \t\tset(details::control_type<std::remove_cv_t<T>>::value, false,\n \t\t    reinterpret_cast<const void *>(&value), 1, sizeof(T));\n \t}\n \n-\ttemplate<typename T, typename std::enable_if_t<details::is_span<T>::value ||\n-\t\t\t\t\t\t       std::is_same<std::string, std::remove_cv_t<T>>::value,\n-\t\t\t\t\t\t       std::nullptr_t> = nullptr>\n+\ttemplate<typename T, std::enable_if_t<details::is_span<T>::value ||\n+\t\t\t\t\t      std::is_same<std::string, std::remove_cv_t<T>>::value,\n+\t\t\t\t\t      std::nullptr_t> = nullptr>\n #else\n \ttemplate<typename T>\n #endif\ndiff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h\nindex a87449c9be48..30bdaebcd830 100644\n--- a/include/libcamera/internal/ipa_data_serializer.h\n+++ b/include/libcamera/internal/ipa_data_serializer.h\n@@ -32,7 +32,7 @@ LOG_DECLARE_CATEGORY(IPADataSerializer)\n namespace {\n \n template<typename T,\n-\t typename std::enable_if_t<std::is_arithmetic_v<T>> * = nullptr>\n+\t std::enable_if_t<std::is_arithmetic_v<T>> * = nullptr>\n void appendPOD(std::vector<uint8_t> &vec, T val)\n {\n \tconstexpr size_t byteWidth = sizeof(val);\ndiff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h\nindex 78c359f749bf..5ba777d364fa 100644\n--- a/include/libcamera/internal/yaml_parser.h\n+++ b/include/libcamera/internal/yaml_parser.h\n@@ -163,7 +163,7 @@ public:\n \n #ifndef __DOXYGEN__\n \ttemplate<typename T,\n-\t\t typename std::enable_if_t<\n+\t\t std::enable_if_t<\n \t\t\t std::is_same_v<bool, T> ||\n \t\t\t std::is_same_v<double, T> ||\n \t\t\t std::is_same_v<int16_t, T> ||\n@@ -185,7 +185,7 @@ public:\n \n #ifndef __DOXYGEN__\n \ttemplate<typename T,\n-\t\t typename std::enable_if_t<\n+\t\t std::enable_if_t<\n \t\t\t std::is_same_v<bool, T> ||\n \t\t\t std::is_same_v<double, T> ||\n \t\t\t std::is_same_v<int16_t, T> ||\ndiff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp\nindex 440e35c47cab..84cb57d6de83 100644\n--- a/src/libcamera/yaml_parser.cpp\n+++ b/src/libcamera/yaml_parser.cpp\n@@ -307,7 +307,7 @@ std::optional<Size> YamlObject::get() const\n #ifndef __DOXYGEN__\n \n template<typename T,\n-\t typename std::enable_if_t<\n+\t std::enable_if_t<\n \t\t std::is_same_v<bool, T> ||\n \t\t std::is_same_v<double, T> ||\n \t\t std::is_same_v<int16_t, T> ||\n",
    "prefixes": [
        "libcamera-devel"
    ]
}