[{"id":34440,"web_url":"https://patchwork.libcamera.org/comment/34440/","msgid":"<3fropjxveeemp4rmglnjoh7a3hebqvupdj4offfhzw7vugch6t@dtlbcs35ax77>","date":"2025-06-10T16:08:27","subject":"Re: [RFC PATCH v1 03/23] libcamera: base: Add file for C++20\n\tpolyfills","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"I was wondering where std::polyfill was then I realized what it means\n:)\n\nOn Fri, Jun 06, 2025 at 06:41:36PM +0200, Barnabás Pőcze wrote:\n> Add `cxx20.h` that will contain (possibly limited) C++17 implementations\n> of some C++20 standard library features.\n>\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  include/libcamera/base/details/cxx20.h | 12 ++++++++++++\n>  include/libcamera/base/meson.build     |  1 +\n>  2 files changed, 13 insertions(+)\n>  create mode 100644 include/libcamera/base/details/cxx20.h\n>\n> diff --git a/include/libcamera/base/details/cxx20.h b/include/libcamera/base/details/cxx20.h\n\nnit: do we need the 'details' subfolder or namespacing would be\nenough ?\n\n> new file mode 100644\n> index 000000000..0d6173d1b\n> --- /dev/null\n> +++ b/include/libcamera/base/details/cxx20.h\n> @@ -0,0 +1,12 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2025, Ideas on Board Oy\n> + *\n> + * C++20 polyfills\n> + */\n> +\n> +#pragma once\n> +\n> +namespace libcamera::details::cxx20 {\n> +\n> +} /* namespace libcamera::details::cxx20 */\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index f28ae4d42..9b93b89c3 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -5,6 +5,7 @@ libcamera_base_include_dir = libcamera_include_dir / 'base'\n>  libcamera_base_public_headers = files([\n>      'bound_method.h',\n>      'class.h',\n> +    'details/cxx20.h',\n>      'flags.h',\n>      'object.h',\n>      'shared_fd.h',\n> --\n> 2.49.0\n>","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 2C17EC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 Jun 2025 16:08:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EBECD68DBD;\n\tTue, 10 Jun 2025 18:08:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CCDE61869\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Jun 2025 18:08:31 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 211EE982;\n\tTue, 10 Jun 2025 18:08:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"PZvmV3Ly\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1749571704;\n\tbh=v5D1rkkCrEkgDuNIPGTw0wseeCPftCRWIvTehItP5sI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PZvmV3LyrufyFf3BfWUawXLM8MM1hW5gZamKOci9fvdMJWn5XGIaEGNVzVGV3uLj0\n\trCYGcRYOqQWqHXjlhH04T0O51gKOlmL0ldejm/Ee0LBjEjimb2YCrqUfM3PNwzrl+Y\n\ttkab/f37qxy3ERFGI2Jx8XQ6zeEoTRGaAQ2cXSEk=","Date":"Tue, 10 Jun 2025 18:08:27 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v1 03/23] libcamera: base: Add file for C++20\n\tpolyfills","Message-ID":"<3fropjxveeemp4rmglnjoh7a3hebqvupdj4offfhzw7vugch6t@dtlbcs35ax77>","References":"<20250606164156.1442682-1-barnabas.pocze@ideasonboard.com>\n\t<20250606164156.1442682-4-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20250606164156.1442682-4-barnabas.pocze@ideasonboard.com>","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>"}},{"id":34611,"web_url":"https://patchwork.libcamera.org/comment/34611/","msgid":"<38b985ba-b84a-4aa4-9859-c2f0943351f1@ideasonboard.com>","date":"2025-06-23T14:22:00","subject":"Re: [RFC PATCH v1 03/23] libcamera: base: Add file for C++20\n\tpolyfills","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 06. 10. 18:08 keltezéssel, Jacopo Mondi írta:\n> I was wondering where std::polyfill was then I realized what it means\n> :)\n> \n> On Fri, Jun 06, 2025 at 06:41:36PM +0200, Barnabás Pőcze wrote:\n>> Add `cxx20.h` that will contain (possibly limited) C++17 implementations\n>> of some C++20 standard library features.\n>>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>>   include/libcamera/base/details/cxx20.h | 12 ++++++++++++\n>>   include/libcamera/base/meson.build     |  1 +\n>>   2 files changed, 13 insertions(+)\n>>   create mode 100644 include/libcamera/base/details/cxx20.h\n>>\n>> diff --git a/include/libcamera/base/details/cxx20.h b/include/libcamera/base/details/cxx20.h\n> \n> nit: do we need the 'details' subfolder or namespacing would be\n> enough ?\n\nSince this file only has internal things, my preference is to keep\nthem in a separate subdirectory. This is what other C++ projects\nalso do: e.g. boost, abseil, folly. Whether it's \"detail\", \"details\",\n\"internal\", or else is debatable, but I think it makes sense to keep\nthem separate.\n\n\nRegards,\nBarnabás Pőcze\n\n\n> \n>> new file mode 100644\n>> index 000000000..0d6173d1b\n>> --- /dev/null\n>> +++ b/include/libcamera/base/details/cxx20.h\n>> @@ -0,0 +1,12 @@\n>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>> +/*\n>> + * Copyright (C) 2025, Ideas on Board Oy\n>> + *\n>> + * C++20 polyfills\n>> + */\n>> +\n>> +#pragma once\n>> +\n>> +namespace libcamera::details::cxx20 {\n>> +\n>> +} /* namespace libcamera::details::cxx20 */\n>> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n>> index f28ae4d42..9b93b89c3 100644\n>> --- a/include/libcamera/base/meson.build\n>> +++ b/include/libcamera/base/meson.build\n>> @@ -5,6 +5,7 @@ libcamera_base_include_dir = libcamera_include_dir / 'base'\n>>   libcamera_base_public_headers = files([\n>>       'bound_method.h',\n>>       'class.h',\n>> +    'details/cxx20.h',\n>>       'flags.h',\n>>       'object.h',\n>>       'shared_fd.h',\n>> --\n>> 2.49.0\n>>","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 82C79BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Jun 2025 14:22:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 74A6B68DE5;\n\tMon, 23 Jun 2025 16:22:05 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4281768DCE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jun 2025 16:22:04 +0200 (CEST)","from [192.168.33.21] (185.221.143.107.nat.pool.zt.hu\n\t[185.221.143.107])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 68908D77;\n\tMon, 23 Jun 2025 16:21:47 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"LpUzu4Nj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750688507;\n\tbh=eUvYXd1d4fvmaSxbh6fmVTG2ryQF3BBtbugsd7Uklfk=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=LpUzu4Nj3rChyiltHg0lYiYL+QJn1iIx3XPo5l1bgYIMFs7ipYJ+jz1w1/UO6CkTb\n\tPKbimQmDyv7v0ltCs1MnLyZmqokmbYbXp3av9KjkjnCBzPBni5ztuRfqGFjLrbhzaZ\n\tvBXCwkynNvwG+lNJNRVuY4H0UtS7gg0NSYupBDdg=","Message-ID":"<38b985ba-b84a-4aa4-9859-c2f0943351f1@ideasonboard.com>","Date":"Mon, 23 Jun 2025 16:22:00 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v1 03/23] libcamera: base: Add file for C++20\n\tpolyfills","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20250606164156.1442682-1-barnabas.pocze@ideasonboard.com>\n\t<20250606164156.1442682-4-barnabas.pocze@ideasonboard.com>\n\t<3fropjxveeemp4rmglnjoh7a3hebqvupdj4offfhzw7vugch6t@dtlbcs35ax77>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<3fropjxveeemp4rmglnjoh7a3hebqvupdj4offfhzw7vugch6t@dtlbcs35ax77>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}}]