{"id":26317,"url":"https://patchwork.libcamera.org/api/1.1/patches/26317/?format=json","web_url":"https://patchwork.libcamera.org/patch/26317/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260323102724.1385487-8-barnabas.pocze@ideasonboard.com>","date":"2026-03-23T10:27:24","name":"[RFC,v2,7/7] libcamera: base: span: Deprecate it","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"8199cc98fba831597eedd203912561ae762f4dde","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/1.1/people/216/?format=json","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/26317/mbox/","series":[{"id":5837,"url":"https://patchwork.libcamera.org/api/1.1/series/5837/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5837","date":"2026-03-23T10:27:17","name":"C++20 migration","version":2,"mbox":"https://patchwork.libcamera.org/series/5837/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26317/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26317/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 6478AC32FA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Mar 2026 10:27:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4BAB462771;\n\tMon, 23 Mar 2026 11:27:35 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3389762771\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2026 11:27:29 +0100 (CET)","from pb-laptop.local (185.221.143.129.nat.pool.zt.hu\n\t[185.221.143.129])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D36A7591\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2026 11:26:12 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"OQjVS17+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774261572;\n\tbh=PQ6GVCpIIkh4F1O2Lch5iO4mgvIHjVwf5jkItDhKTko=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=OQjVS17+ke2ZDauUh4VFS4deqVi9JmgnZ7DD7I/Tjur2Oi+j7ZqxGzsKtH73aD2qG\n\ty6veDCy07HWXWVyjKC6wYX/YRHprV9yKdrHFCqX/y4RkWpxwPcjEdBdhMc3vYbaH8E\n\tzNAU7i+0+Pd948DjnzaoIBS7H7PimNjiBEVIvYHA=","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","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","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"With the switch to C++20, this type has largely become unnecessary,\nbut since users might still depend on it, do not remove it yet, only\ndeprecate it. The tests are also kept for now.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n include/libcamera/base/span.h | 4 ++--\n test/span.cpp                 | 1 +\n 2 files changed, 3 insertions(+), 2 deletions(-)","diff":"diff --git a/include/libcamera/base/span.h b/include/libcamera/base/span.h\nindex 5c7a98d8e..c8da7cfd1 100644\n--- a/include/libcamera/base/span.h\n+++ b/include/libcamera/base/span.h\n@@ -86,7 +86,7 @@ struct tuple_size<Span<T, dynamic_extent>>;\n } /* namespace utils */\n \n template<typename T, std::size_t Extent>\n-class Span\n+class [[deprecated(\"Use `std::span` instead\")]] Span\n {\n public:\n \tusing element_type = T;\n@@ -256,7 +256,7 @@ private:\n };\n \n template<typename T>\n-class Span<T, dynamic_extent>\n+class [[deprecated(\"Use `std::span` instead\")]] Span<T, dynamic_extent>\n {\n public:\n \tusing element_type = T;\ndiff --git a/test/span.cpp b/test/span.cpp\nindex 4b9f3279a..56b29512f 100644\n--- a/test/span.cpp\n+++ b/test/span.cpp\n@@ -9,6 +9,7 @@\n  * Include first to ensure the header is self-contained, as there's no span.cpp\n  * in libcamera.\n  */\n+#pragma GCC diagnostic ignored \"-Wdeprecated-declarations\"\n #include <libcamera/base/span.h>\n \n #include <array>\n","prefixes":["RFC","v2","7/7"]}