From patchwork Tue Aug 25 12:34:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 28084 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 CE254C333D for ; Tue, 25 Aug 2026 12:34:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CEC76683EA; Tue, 25 Aug 2026 14:34:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FLaIL40Z"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A47ED6834C for ; Tue, 25 Aug 2026 14:34:16 +0200 (CEST) Received: from pb-laptop.local (185.221.143.32.nat.pool.zt.hu [185.221.143.32]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7C4652EC; Tue, 25 Aug 2026 14:32:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1787661171; bh=RF9CmQDpQ6mD7qYuc2T1IjMsxxSOBLA7NJhJuzVP5SM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FLaIL40ZBN7oF0d+vs2aKR7E1QGJiu59NA0RXDOhwOrdeYjlVPTOAdi/l276MvTRS DBF4Eigr+LCmx5yOuc35OapXBNJPn83hwpaJL7DevL8yhlQIL6EnoCi57h6XD+GOQ7 rL2TvMuAFVQf1rPBndexmREItoZ8J7DFbwjybwlk= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Laurent Pinchart Subject: [PATCH v1 2/2] libcamera: base: span: Deprecate it Date: Tue, 25 Aug 2026 14:34:12 +0200 Message-ID: <20260825123412.837696-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260825123412.837696-1-barnabas.pocze@ideasonboard.com> References: <20260825123412.837696-1-barnabas.pocze@ideasonboard.com> 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" With the switch to C++20, this type has largely become unnecessary, but since users might still depend on it, do not remove it yet, only deprecate it. The tests are also kept for now. Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart --- include/libcamera/base/span.h | 4 ++-- test/span.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/libcamera/base/span.h b/include/libcamera/base/span.h index 5c7a98d8e7..c8da7cfd1c 100644 --- a/include/libcamera/base/span.h +++ b/include/libcamera/base/span.h @@ -86,7 +86,7 @@ struct tuple_size>; } /* namespace utils */ template -class Span +class [[deprecated("Use `std::span` instead")]] Span { public: using element_type = T; @@ -256,7 +256,7 @@ private: }; template -class Span +class [[deprecated("Use `std::span` instead")]] Span { public: using element_type = T; diff --git a/test/span.cpp b/test/span.cpp index 4b9f3279ad..56b29512f0 100644 --- a/test/span.cpp +++ b/test/span.cpp @@ -9,6 +9,7 @@ * Include first to ensure the header is self-contained, as there's no span.cpp * in libcamera. */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include #include