From patchwork Tue Jan 6 16:57:35 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: 25633 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 98D56BDCBF for ; Tue, 6 Jan 2026 16:58:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD63B61FBC; Tue, 6 Jan 2026 17:58:02 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="kgqg4ARy"; 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 A4B9F61FBB for ; Tue, 6 Jan 2026 17:57:58 +0100 (CET) Received: from pb-laptop.local (185.221.143.114.nat.pool.zt.hu [185.221.143.114]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A1810581; Tue, 6 Jan 2026 17:57:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1767718657; bh=HpL9nwKiEV/kFGATM9qZ6WShd3CqncqXLsxA9TlcVKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kgqg4ARygsdzxvcIvgl6H2WKbAXnD7scx1u8zAVdakQWT4okjoJ5l8qSFhViC035a Bmpy8m7Rm8vGMps2YgvH14iCTZ5ftDtNaQQWg7/aBASBqFzIKV//8E5Ef1ulCziENZ noGuIZ01CvwV8MPmGAWe9wrNs7BcsbUJpHpnhoiE= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham Subject: [PATCH v4 03/22] libcamera: base: Add file for C++20 polyfills Date: Tue, 6 Jan 2026 17:57:35 +0100 Message-ID: <20260106165754.1759831-4-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106165754.1759831-1-barnabas.pocze@ideasonboard.com> References: <20260106165754.1759831-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" Add `cxx20.h` that will contain (possibly limited) C++17 implementations of some C++20 standard library features. Signed-off-by: Barnabás Pőcze Acked-by: Kieran Bingham --- include/libcamera/base/internal/cxx20.h | 18 ++++++++++++++++++ include/libcamera/base/meson.build | 7 +++++++ 2 files changed, 25 insertions(+) create mode 100644 include/libcamera/base/internal/cxx20.h diff --git a/include/libcamera/base/internal/cxx20.h b/include/libcamera/base/internal/cxx20.h new file mode 100644 index 000000000..70a43f83c --- /dev/null +++ b/include/libcamera/base/internal/cxx20.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2025, Ideas on Board Oy + * + * C++20 polyfills + */ + +#pragma once + +/** + * \internal + * \file cxx20.h + * \brief C++17 implementations of certain C++20 types and functions + */ + +namespace libcamera::internal::cxx20 { + +} /* namespace libcamera::internal::cxx20 */ diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build index f84b51419..bb4ed556b 100644 --- a/include/libcamera/base/meson.build +++ b/include/libcamera/base/meson.build @@ -32,10 +32,17 @@ libcamera_base_private_headers = files([ 'utils.h', ]) +libcamera_base_internal_headers = files([ + 'internal/cxx20.h', +]) + libcamera_base_headers = [ libcamera_base_public_headers, libcamera_base_private_headers, + libcamera_base_internal_headers, ] install_headers(libcamera_base_public_headers, subdir : libcamera_base_include_dir) +install_headers(libcamera_base_internal_headers, + subdir : libcamera_base_include_dir / 'internal')