From patchwork Mon Mar 23 10:27:24 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: 26317 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 6478AC32FA for ; Mon, 23 Mar 2026 10:27:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4BAB462771; Mon, 23 Mar 2026 11:27:35 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OQjVS17+"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3389762771 for ; Mon, 23 Mar 2026 11:27:29 +0100 (CET) Received: from pb-laptop.local (185.221.143.129.nat.pool.zt.hu [185.221.143.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D36A7591 for ; Mon, 23 Mar 2026 11:26:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774261572; bh=PQ6GVCpIIkh4F1O2Lch5iO4mgvIHjVwf5jkItDhKTko=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OQjVS17+ke2ZDauUh4VFS4deqVi9JmgnZ7DD7I/Tjur2Oi+j7ZqxGzsKtH73aD2qG y6veDCy07HWXWVyjKC6wYX/YRHprV9yKdrHFCqX/y4RkWpxwPcjEdBdhMc3vYbaH8E zNAU7i+0+Pd948DjnzaoIBS7H7PimNjiBEVIvYHA= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v2 7/7] libcamera: base: span: Deprecate it Date: Mon, 23 Mar 2026 11:27:24 +0100 Message-ID: <20260323102724.1385487-8-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323102724.1385487-1-barnabas.pocze@ideasonboard.com> References: <20260323102724.1385487-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 --- 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 5c7a98d8e..c8da7cfd1 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 4b9f3279a..56b29512f 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