From patchwork Sun Apr 5 22:27:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26437 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 CF5A4BEFBE for ; Sun, 5 Apr 2026 22:27:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C67E362D7B; Mon, 6 Apr 2026 00:27:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sC/IQrKO"; 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 0409862CE6 for ; Mon, 6 Apr 2026 00:27:06 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-703d-e500--2a1.rev.dnainternet.fi [IPv6:2001:14ba:703d:e500::2a1]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 8DE1263C for ; Mon, 6 Apr 2026 00:25:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1775427940; bh=3aDGbUpZry1wCIYIhyA54LRd8gXkOIMqtkVNOTQZ7Eg=; h=From:To:Subject:Date:From; b=sC/IQrKOaAzgeOlJS9LoSuo9Yd6L2ynUqIWj7UYNMO52Yb7W5ur6CaliNjeGYptRs BzaIrlp7x4TR6V3zaMTRgSJ1GVquYpt1zsJSdJUUe+HZKQeec5x55guy0Xk8TPLLSC w3EX8NEweHhCZiB9gh80APuiLqIJBg3Zo2SUbFYo= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 1/2] Documentation: Update to C++20 Date: Mon, 6 Apr 2026 01:27:04 +0300 Message-ID: <20260405222705.1238116-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.52.0 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" libcamera has switched to C++20, update the coding style documentation that still mentions C++17. Signed-off-by: Laurent Pinchart --- Documentation/coding-style.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst index e0864b78d4b7..5b90a43a6813 100644 --- a/Documentation/coding-style.rst +++ b/Documentation/coding-style.rst @@ -105,7 +105,7 @@ headers, and with double quotes for internal libcamera headers. C++ Specific Rules ------------------ -The code shall be implemented in C++17, with the following caveats: +The code shall be implemented in C++20, with the following caveats: * Type inference (auto and decltype) shall be used with caution, to avoid drifting towards an untyped language. From patchwork Sun Apr 5 22:27:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26438 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 DAC28BEFBE for ; Sun, 5 Apr 2026 22:27:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BAE8D62D7C; Mon, 6 Apr 2026 00:27:09 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="maqx+E5C"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 48AB162CE6 for ; Mon, 6 Apr 2026 00:27:08 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-703d-e500--2a1.rev.dnainternet.fi [IPv6:2001:14ba:703d:e500::2a1]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 048B463C for ; Mon, 6 Apr 2026 00:25:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1775427942; bh=lVOSm1GMOuVZKQhZih5rIZ8ejqyYn0cks9I0zSlFApw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=maqx+E5CN9bd4R3rnpK5FgFAJ6oOmjVTIiqKXek/LZjtwxaEJNgxHlBHwg1yXGQPQ QJz11nFbWq9zbN6ukadJr5PlCnNse5m01e6zXv4cp3zRD31HtQZVrdOVKZPFUyndYo tpQOq7h686xGNHa2mxT5SV+C187Ofsr3sQvreRfQ= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 2/2] meson: Use header for C++ library version check Date: Mon, 6 Apr 2026 01:27:05 +0300 Message-ID: <20260405222705.1238116-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260405222705.1238116-1-laurent.pinchart@ideasonboard.com> References: <20260405222705.1238116-1-laurent.pinchart@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" The ciso646 header has been removed in C++20. Use the version header instead. Signed-off-by: Laurent Pinchart --- meson.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index a6cfdd07605c..a411d171d9db 100644 --- a/meson.build +++ b/meson.build @@ -118,10 +118,9 @@ cpp_arguments = [ '-Wnon-virtual-dtor', ] -# \todo Switch to `version` when moving to C++20 as `ciso646` has been removed in C++20. -if cxx.has_header_symbol('ciso646', '_LIBCPP_VERSION') +if cxx.has_header_symbol('version', '_LIBCPP_VERSION') cxx_stdlib = 'libc++' -elif cxx.has_header_symbol('ciso646', '__GLIBCXX__') +elif cxx.has_header_symbol('version', '__GLIBCXX__') cxx_stdlib = 'libstdc++' else error('C++ standard library cannot be detected')