From patchwork Mon Jul 6 11:38:59 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: 27251 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 8AC8DC330F for ; Mon, 6 Jul 2026 11:39:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4954666031; Mon, 6 Jul 2026 13:39:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kJknxjPB"; dkim-atps=neutral Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B1F136600A for ; Mon, 6 Jul 2026 13:39:16 +0200 (CEST) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-4703bc0a99aso1579564f8f.3 for ; Mon, 06 Jul 2026 04:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783337956; x=1783942756; 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=kJknxjPBBPUXDRJVtWLj9UPfx0c6GtDN34wHMUVbnR1lF3+j/S8MwMxFvWXNxuYDjQ w9H9cXZ87m/RrndEZxqR8RYmu9kk7qopDwUr4mD64kLjEPZFzskuOhxaicG/wVldwEZO sjUs5GoNGAhrYvdX7+CQNPZ20M0uieyZ3vpZuDZzfRgFouS/qcK+teT64IPHMCLRALF0 sIlZEoi8wcimZyGrr3eN5AdU0yNlq0DXur1K8kaN2TACbGJTbcLVlw4qrpqXJj1BYAeu LeB8ktKMP85qwuD6pjyod6i8VuVTrNf5FZ7zT4yBMKws5X332Y1gMBAya7bX+AKcYggh SZ6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783337956; x=1783942756; 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=mflwEr9nVdeEZBFBqIboLkWBCFzRb+wbuSeC3mO6QuYqwXLSDolnHy2bJm505q1Bor iA2NJ6pGt7w1OzzdOlngXytIMr0Xc4IOXCbgP5r36Z1CawPgAziGiDHrllBDOaKc7lfL 2zuuiVDwWEjRmC78eH36KMxVBJmure2VhomabnmL2+vXAeUt88c+eQ/fufHndZ8xE3+s ORctZNktFZTu1J8Xsw/k+DQfVBBGJ80Ox/ROhCdXPcK5/tm0H0DoGknj1tKHS0BjtWr1 aNSV5LFK7ldzsKem+iG0bsvin32WIbIb01qAJoOma9IU7q1EXgna6jJaQqrtT0wIBU2Y /M1w== X-Gm-Message-State: AOJu0YzliBdALzRP+BH7NoDT+EbvZJEjlI7iSpWOohLYV7ucB6XlV8Kg ieUekxaZrxeDF5XB7fjnWumVMed7ATHlXU0UU6D+xgkMjArc8+ow55MKjhT1nmzI1voi+tN4UK6 Lpohu X-Gm-Gg: AfdE7cmQH20s+fd/09bDOMkieKUf74f0/xB/69BWyvEIajcfF8BYWWd7alArnvsiZts HmXVE7K7OOST7PM697/fk36PqVCjB/2viYBwR5go3dJGfNbHBp8M43FLGY7ZAlCHHY1TMD9G/h8 3DtPcLcMDhXuHmsgJ1hRV8jLilj7vdwCgG346zyRSHcGh/RdxnoiOYBr8FXXty7CsXiwf5WxA37 1BuK3OHUZf0nhKq0NXIienYHbKjK4DUWSABLhuNzX+6Uy6zW428yRxq4DLtk2xvCHBUt0vACrQb XuUG0vc1jDUoyPCfoK9rqLVHmloX5pMX1FhK/OIBYbm7zRPIYh65vPOewdaek4bYSUsbq5h6/rE L6TDeUwpK8pVD0auKSXvOO8V95wTupVGYtfIGM7zLINd1TrGSVlej8XYGjHafyVBuJJr5qjMcWy DsuN/Iv37rfhc76ePGBgOcD301ABRQ X-Received: by 2002:a05:6000:29d3:b0:472:67de:27c2 with SMTP id ffacd0b85a97d-47aab76fe87mr7454974f8f.40.1783337956188; Mon, 06 Jul 2026 04:39:16 -0700 (PDT) Received: from inspiron14p-linux ([109.77.44.220]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47a9de1e6ccsm24796084f8f.5.2026.07.06.04.39.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 04:39:15 -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 v5 6/7] libcamera: base: shared_fd: Add hash template Date: Mon, 6 Jul 2026 12:38:59 +0100 Message-ID: <20260706113900.2530549-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260706113900.2530549-1-bryan.odonoghue@linaro.org> References: <20260706113900.2530549-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()); + } +};