From patchwork Mon Jul 6 11:01:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 27243 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 03F10C330F for ; Mon, 6 Jul 2026 11:01:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9B14766033; Mon, 6 Jul 2026 13:01:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gnLOmaGz"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 959106600A for ; Mon, 6 Jul 2026 13:01:36 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-493ce08a75bso11843845e9.1 for ; Mon, 06 Jul 2026 04:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783335696; x=1783940496; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iBRWJUBS/Uq8NB/fn6jxhZu1bX+RaDP4LLlVacS3Kt8=; b=gnLOmaGzWzRQ87zJ2YLDGOctGXtRC3h28pOtxPgCrhuZbnkG9PRBKdyPD+8+GzpvQ5 bx1yxdhFojmu8Pnag8ATm8PZJYzl2HMl/LF5yg/GrYiMMg6txLYqwdkIP7zFE32thzNG p4CKhoo5tIaPujGT+WQvRlvLwwtNZCtlT16bUjZj7BfzkN8K4e3h3RtFbNkqvD0Hq/BA wygopG28onD7OlwwwN6n3RBtcndxYmfmFP7WArsSyvCENmMv08y8gnR1hFtn637swbNO Czslz63vN7dViTwJkMdjfZ3pGu4KpeA8Xui2SWu/0gsyejwyGiyXCCe1P8KWVKltB5b1 Q/jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783335696; x=1783940496; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=iBRWJUBS/Uq8NB/fn6jxhZu1bX+RaDP4LLlVacS3Kt8=; b=g/2YaqQwueqxJkYIGRoqcK7sZOseosEeiX5aXd1CgiTs/YxxSKSt+PS7STw4wn4hfJ BjJr/gES2wGPlV3Q5+EC53nQYGKXq8dG2vG0yWFTRjZ+bxonO92qKn+NJJlutybOqYId C6wVDW5c4rX06BxXbaJD3T28tplQMAQGXh5dYDkmdu/rzw1/DJP0Y69X+bSf2eajsjsG 3fdWhqvmP38zXIZXJmUh2kKmt8Jb/wGPllxl+5f8sIjV+ZS0wJWJFcJd1p1mlVEKAuUQ pFaAuuawxVbOQPKb6J72vXtEffhOTw1qbu4qbxto0o20MDaoEu+wpswsFqiL0Evmvmkt KU7Q== X-Gm-Message-State: AOJu0Yw6iN/+Ctkku192X2DbgqJv131UbwFNdG5apGjB3JhFka+8o4vY AOZEEJMJ2ygAjI3abugwMnqPmAW7uaWpvGt3bRWBsd8M+8X0I4M3B383fw0DOSnTxvbDoDBa45/ omKtZ X-Gm-Gg: AfdE7ckTeveeXkbo+oTP+mm7zfCOqRM3c52tXniljOpZ/0fZFyQt+NZzPlM8VHcb+7v erZXFX9aUaKJ6TE6sE8s3n65vfoRMkQlJ87CZGTDDMpI3Ii70yKgCvF1fCUof+E2fGbnRa0wgHq JAZMY14x8NUEuqWKOg/jp/Yn3u54ZWYfH3YfLwnHTVvpTS3FiIelavfQ+aLR5OglpzncmudrhYU ud7lkQasBX9iMs8OcexzR9cQnDhvZOkNa+dMcsxcdz+3pH8a/J8qKK39Uh63Do4qYACI0eN1IdR a9xqvOFzphSpPhCmgUY6QpvdKp8l81vLFD878jezVVvn1yfcfFcDd2voff6Gznsa02YD93c6UGx 2wO1PZ0dnnbMULb38yRSIUK+92RxrD5BI/QT4tbiQxVnTmzi3D/PqVDgAwLNO/jva6o8sqhK9iw SakXYO3i0C6SXdCZbTU8oUwirC3XiO X-Received: by 2002:a05:600c:3b10:b0:492:3e44:214b with SMTP id 5b1f17b1804b1-493d11d7373mr109945035e9.13.1783335696148; Mon, 06 Jul 2026 04:01:36 -0700 (PDT) Received: from inspiron14p-linux ([109.77.44.220]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa0960634sm25190846f8f.26.2026.07.06.04.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 04:01:35 -0700 (PDT) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: bryan.odonoghue@linaro.org, pavel@ucw.cz, Robert Mader , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v4 6/7] libcamera: base: shared_fd: Add hash template Date: Mon, 6 Jul 2026 12:01:19 +0100 Message-ID: <20260706110120.2509826-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260706110120.2509826-1-bryan.odonoghue@linaro.org> References: <20260706110120.2509826-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Robert Mader Suggested-by: Barnabás Pőcze Signed-off-by: Robert Mader Signed-off-by: Bryan O'Donoghue --- Documentation/Doxyfile-common.in | 2 ++ include/libcamera/base/shared_fd.h | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/Doxyfile-common.in b/Documentation/Doxyfile-common.in index f11ec593d..c0696496c 100644 --- a/Documentation/Doxyfile-common.in +++ b/Documentation/Doxyfile-common.in @@ -75,3 +75,5 @@ PREDEFINED = __DOXYGEN__ \ @PREDEFINED@ HAVE_DOT = YES + +BUILTIN_STL_SUPPORT = YES diff --git a/include/libcamera/base/shared_fd.h b/include/libcamera/base/shared_fd.h index 61fe11c1d..65b1044c7 100644 --- a/include/libcamera/base/shared_fd.h +++ b/include/libcamera/base/shared_fd.h @@ -7,6 +7,7 @@ #pragma once +#include #include namespace libcamera { @@ -57,3 +58,11 @@ static inline bool operator!=(const SharedFD &lhs, const SharedFD &rhs) } } /* namespace libcamera */ + +template<> +struct std::hash : private std::hash { + auto operator()(const libcamera::SharedFD &x) const noexcept + { + return std::hash::operator()(x.get()); + } +};