[{"id":35138,"web_url":"https://patchwork.libcamera.org/comment/35138/","msgid":"<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>","date":"2025-07-25T12:58:06","subject":"Re: [RFC PATCH v2 03/22] 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":"Hi Barnabás\n\nOn Mon, Jul 21, 2025 at 12:46:03PM +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\nOur span.h implementation qualifies in this category as well.\n\nAs I see it\n1) We move span.h in /details/\n2) We move cxx20.h in include/libcamera/base\n\nWhat's your take ?\n\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     |  7 +++++++\n>  2 files changed, 19 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> 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..9836daff9 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n>      'utils.h',\n>  ])\n>\n> +libcamera_base_details_headers = files([\n> +    'details/cxx20.h',\n> +])\n> +\n>  libcamera_base_headers = [\n>      libcamera_base_public_headers,\n>      libcamera_base_private_headers,\n> +    libcamera_base_details_headers,\n>  ]\n>\n>  install_headers(libcamera_base_public_headers,\n>                  subdir : libcamera_base_include_dir)\n> +install_headers(libcamera_base_details_headers,\n> +                subdir : libcamera_base_include_dir / 'details')\n> --\n> 2.50.1\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 1162AC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jul 2025 12:58:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E3011690E3;\n\tFri, 25 Jul 2025 14:58:14 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F14A0690A6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jul 2025 14:58:12 +0200 (CEST)","from ideasonboard.com (mob-5-90-139-29.net.vodafone.it\n\t[5.90.139.29])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E054B7E6;\n\tFri, 25 Jul 2025 14:57:32 +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=\"bLUcWuMC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753448253;\n\tbh=A3A3dP+7Or88ZolTQKTxm3OgB447YTKJWN5WRg/hE0Y=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=bLUcWuMCcE/WaXstWTq/L2XwtQ5h8lHfcdbYWdJJfE5TUQdlnGcxLi2fQ+0CZX9J4\n\tyK92OyuGaMsJFyPbik/EZ2faT9URoPJ/EgZEC6/PsuxVWVGrwxsCatnhgXm/Zn+nUq\n\tVxW/BmJhjVFzaECR4brYIeE/Evs7xelzXI86ViY0=","Date":"Fri, 25 Jul 2025 14:58:06 +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 v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","Message-ID":"<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-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":"<20250721104622.1550908-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":35159,"web_url":"https://patchwork.libcamera.org/comment/35159/","msgid":"<20250727133015.GG27425@pendragon.ideasonboard.com>","date":"2025-07-27T13:30:15","subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n> Hi Barnabás\n> \n> On Mon, Jul 21, 2025 at 12:46:03PM +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> Our span.h implementation qualifies in this category as well.\n> \n> As I see it\n> 1) We move span.h in /details/\n> 2) We move cxx20.h in include/libcamera/base\n> \n> What's your take ?\n\nThe issue with our Span class is that it's part of the public API, while\nI understand libcamera::details::cxx20 to be meant for internal usage.\nAlthough...\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     |  7 +++++++\n> >  2 files changed, 19 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> > 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..9836daff9 100644\n> > --- a/include/libcamera/base/meson.build\n> > +++ b/include/libcamera/base/meson.build\n> > @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n> >      'utils.h',\n> >  ])\n> >\n> > +libcamera_base_details_headers = files([\n> > +    'details/cxx20.h',\n> > +])\n> > +\n> >  libcamera_base_headers = [\n> >      libcamera_base_public_headers,\n> >      libcamera_base_private_headers,\n> > +    libcamera_base_details_headers,\n> >  ]\n> >\n> >  install_headers(libcamera_base_public_headers,\n> >                  subdir : libcamera_base_include_dir)\n> > +install_headers(libcamera_base_details_headers,\n> > +                subdir : libcamera_base_include_dir / 'details')\n\n... this seems to indicate the contrary ? Barnabás, could you please\nexplain what your plan is ?\n\nIf we want to use this in the public API, I think we should shorten the\nnamespace for public classes, possibly to libcamera::cxx20. If it's\npurely internal, we can't move the span class here, and the headers\nshould probably not be installed.","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 9DB30C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Jul 2025 13:30:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5825A69123;\n\tSun, 27 Jul 2025 15:30:40 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C7D8C69080\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Jul 2025 15:30:22 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 5D4C1593;\n\tSun, 27 Jul 2025 15:29:40 +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=\"JCXTDiFy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753622980;\n\tbh=YcA8RZOLYu4w6re3URgYgCqg8fkvUCfYAQr+/oaMq0I=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=JCXTDiFyQYR6x6Rwd8vQBRrA5DF+o6JkAckFeHx+qKCs+KsjzqU8Jri8ve0jBtQ2l\n\t6wZhZZ+KIanunvP0XGqlLzjPpx5hazd2X7pY+A9yZUv/nCsRkPCVcyBegkhi9WVOcg\n\tJi9jq1uu5V1MQlMlWnyQlynBQHF0n5V0jOf6Y1lo=","Date":"Sun, 27 Jul 2025 16:30:15 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","Message-ID":"<20250727133015.GG27425@pendragon.ideasonboard.com>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-4-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>","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":35161,"web_url":"https://patchwork.libcamera.org/comment/35161/","msgid":"<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>","date":"2025-07-27T17:15:56","subject":"Re: [RFC PATCH v2 03/22] 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. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n> On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n>> Hi Barnabás\n>>\n>> On Mon, Jul 21, 2025 at 12:46:03PM +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>> Our span.h implementation qualifies in this category as well.\n>>\n>> As I see it\n>> 1) We move span.h in /details/\n>> 2) We move cxx20.h in include/libcamera/base\n>>\n>> What's your take ?\n> \n> The issue with our Span class is that it's part of the public API, while\n> I understand libcamera::details::cxx20 to be meant for internal usage.\n> Although...\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     |  7 +++++++\n>>>   2 files changed, 19 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>>> 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..9836daff9 100644\n>>> --- a/include/libcamera/base/meson.build\n>>> +++ b/include/libcamera/base/meson.build\n>>> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n>>>       'utils.h',\n>>>   ])\n>>>\n>>> +libcamera_base_details_headers = files([\n>>> +    'details/cxx20.h',\n>>> +])\n>>> +\n>>>   libcamera_base_headers = [\n>>>       libcamera_base_public_headers,\n>>>       libcamera_base_private_headers,\n>>> +    libcamera_base_details_headers,\n>>>   ]\n>>>\n>>>   install_headers(libcamera_base_public_headers,\n>>>                   subdir : libcamera_base_include_dir)\n>>> +install_headers(libcamera_base_details_headers,\n>>> +                subdir : libcamera_base_include_dir / 'details')\n> \n> ... this seems to indicate the contrary ? Barnabás, could you please\n> explain what your plan is ?\n> \n> If we want to use this in the public API, I think we should shorten the\n> namespace for public classes, possibly to libcamera::cxx20. If it's\n> purely internal, we can't move the span class here, and the headers\n> should probably not be installed.\n> \n\nThe plan is that these are not part of the public API, merely implementation\ndetails that need to be available in public header files, so that they can\nbe used from other public libcamera header files. Applications are not supposed\nto use them.\n\n\nRegards,\nBarnabás Pőcze","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 8262DC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Jul 2025 17:16:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 69B2969124;\n\tSun, 27 Jul 2025 19:16:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D04A669080\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Jul 2025 19:16:00 +0200 (CEST)","from [192.168.33.14] (185.221.140.39.nat.pool.zt.hu\n\t[185.221.140.39])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B08634C9;\n\tSun, 27 Jul 2025 19:15:18 +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=\"wXZlk8nB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753636518;\n\tbh=QInz+iaI+T65oDp7VLULHZXL95E/MW45i0EndrSjsJs=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=wXZlk8nBxa4fPQrj1sOUKj4tu56R/cx0femLeGFcR6jSI8bYAeY+2uGPKGle1kk5+\n\tatP//yVppDdlfp/qlk38zHeT96OiKuxuCgXBwDg3XgnzCdgxVvaKjnhhqu8lPtjN4h\n\tyam7omUMFN9RPDzJ5XAU6LooyCIYahxodDJh7xXM=","Message-ID":"<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>","Date":"Sun, 27 Jul 2025 19:15:56 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-4-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250727133015.GG27425@pendragon.ideasonboard.com>","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>"}},{"id":35167,"web_url":"https://patchwork.libcamera.org/comment/35167/","msgid":"<20250727183708.GH30386@pendragon.ideasonboard.com>","date":"2025-07-27T18:37:08","subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, Jul 27, 2025 at 07:15:56PM +0200, Barnabás Pőcze wrote:\n> 2025. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n> > On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n> >> On Mon, Jul 21, 2025 at 12:46:03PM +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> >> Our span.h implementation qualifies in this category as well.\n> >>\n> >> As I see it\n> >> 1) We move span.h in /details/\n> >> 2) We move cxx20.h in include/libcamera/base\n> >>\n> >> What's your take ?\n> > \n> > The issue with our Span class is that it's part of the public API, while\n> > I understand libcamera::details::cxx20 to be meant for internal usage.\n> > Although...\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     |  7 +++++++\n> >>>   2 files changed, 19 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> >>> 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..9836daff9 100644\n> >>> --- a/include/libcamera/base/meson.build\n> >>> +++ b/include/libcamera/base/meson.build\n> >>> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n> >>>       'utils.h',\n> >>>   ])\n> >>>\n> >>> +libcamera_base_details_headers = files([\n> >>> +    'details/cxx20.h',\n> >>> +])\n> >>> +\n> >>>   libcamera_base_headers = [\n> >>>       libcamera_base_public_headers,\n> >>>       libcamera_base_private_headers,\n> >>> +    libcamera_base_details_headers,\n> >>>   ]\n> >>>\n> >>>   install_headers(libcamera_base_public_headers,\n> >>>                   subdir : libcamera_base_include_dir)\n> >>> +install_headers(libcamera_base_details_headers,\n> >>> +                subdir : libcamera_base_include_dir / 'details')\n> > \n> > ... this seems to indicate the contrary ? Barnabás, could you please\n> > explain what your plan is ?\n> > \n> > If we want to use this in the public API, I think we should shorten the\n> > namespace for public classes, possibly to libcamera::cxx20. If it's\n> > purely internal, we can't move the span class here, and the headers\n> > should probably not be installed.\n> \n> The plan is that these are not part of the public API, merely implementation\n> details that need to be available in public header files, so that they can\n> be used from other public libcamera header files. Applications are not supposed\n> to use them.\n\nThen unless I'm mistaken you don't need to install those headers. I also\nwouldn't put this in a \"details\" namespace, libcamera::cxx20::* should\nbe fine.","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 07475BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Jul 2025 18:37:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E73976912B;\n\tSun, 27 Jul 2025 20:37:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 287AC69080\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Jul 2025 20:37:16 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 5D54655A;\n\tSun, 27 Jul 2025 20:36:34 +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=\"r6WAbsZI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753641394;\n\tbh=htgCSfLfHEkYWU5t7/tq3SMyGs9rgItGTiN6zjUNscM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=r6WAbsZI1g7rDZcIJVD4kkQ5uTYvIAAmkBXEF3ufUIOAP8jOyj6KuXNH58xTFFxYt\n\tXnHdbbjPEa+5qS/n6HlLYW1XfCTsM1OwvkNWtUI+npISwwBMXy69GFkwzQMx7FzhAb\n\tkKzPH6huYOtc/m2MieL44BNUYFmsvPWw7tWDVvvc=","Date":"Sun, 27 Jul 2025 21:37:08 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","Message-ID":"<20250727183708.GH30386@pendragon.ideasonboard.com>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-4-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>\n\t<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<3f6c33c3-9432-45a0-919d-d92e0f51c02d@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":35170,"web_url":"https://patchwork.libcamera.org/comment/35170/","msgid":"<f6d3f8f8-e1b1-4251-8111-5525de0556f9@ideasonboard.com>","date":"2025-07-27T18:44:31","subject":"Re: [RFC PATCH v2 03/22] 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":"2025. 07. 27. 20:37 keltezéssel, Laurent Pinchart írta:\n> On Sun, Jul 27, 2025 at 07:15:56PM +0200, Barnabás Pőcze wrote:\n>> 2025. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n>>> On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n>>>> On Mon, Jul 21, 2025 at 12:46:03PM +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>>>> Our span.h implementation qualifies in this category as well.\n>>>>\n>>>> As I see it\n>>>> 1) We move span.h in /details/\n>>>> 2) We move cxx20.h in include/libcamera/base\n>>>>\n>>>> What's your take ?\n>>>\n>>> The issue with our Span class is that it's part of the public API, while\n>>> I understand libcamera::details::cxx20 to be meant for internal usage.\n>>> Although...\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     |  7 +++++++\n>>>>>    2 files changed, 19 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>>>>> 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..9836daff9 100644\n>>>>> --- a/include/libcamera/base/meson.build\n>>>>> +++ b/include/libcamera/base/meson.build\n>>>>> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n>>>>>        'utils.h',\n>>>>>    ])\n>>>>>\n>>>>> +libcamera_base_details_headers = files([\n>>>>> +    'details/cxx20.h',\n>>>>> +])\n>>>>> +\n>>>>>    libcamera_base_headers = [\n>>>>>        libcamera_base_public_headers,\n>>>>>        libcamera_base_private_headers,\n>>>>> +    libcamera_base_details_headers,\n>>>>>    ]\n>>>>>\n>>>>>    install_headers(libcamera_base_public_headers,\n>>>>>                    subdir : libcamera_base_include_dir)\n>>>>> +install_headers(libcamera_base_details_headers,\n>>>>> +                subdir : libcamera_base_include_dir / 'details')\n>>>\n>>> ... this seems to indicate the contrary ? Barnabás, could you please\n>>> explain what your plan is ?\n>>>\n>>> If we want to use this in the public API, I think we should shorten the\n>>> namespace for public classes, possibly to libcamera::cxx20. If it's\n>>> purely internal, we can't move the span class here, and the headers\n>>> should probably not be installed.\n>>\n>> The plan is that these are not part of the public API, merely implementation\n>> details that need to be available in public header files, so that they can\n>> be used from other public libcamera header files. Applications are not supposed\n>> to use them.\n> \n> Then unless I'm mistaken you don't need to install those headers. I also\n> wouldn't put this in a \"details\" namespace, libcamera::cxx20::* should\n> be fine.\n> \n\nThey need to be installed because the plan is that public libcamera headers\nfiles will include them.","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 D63DEBDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Jul 2025 18:44:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8DE856912D;\n\tSun, 27 Jul 2025 20:44:36 +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 D138F69080\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Jul 2025 20:44:34 +0200 (CEST)","from [192.168.33.14] (185.221.140.39.nat.pool.zt.hu\n\t[185.221.140.39])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4D1C955A;\n\tSun, 27 Jul 2025 20:43:53 +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=\"JxJzqTcm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753641833;\n\tbh=RJdFlAq+8B885bfY3LQpohi4ZLCpuZjSkhuPYqojsTI=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=JxJzqTcmUFv9TV8TFJdCSD0gIlVDn4ZHGb0baBSKyjwIZqRoWPUS0PFhbB2faEABw\n\tAIZ37RRqTmfZ40cpZAIZYSbZaPe6uMKC4XD/sQBTuskPBbH59Gwm5LSebtgKrMuGyz\n\t73+sMXaSbIn5R+ijj9PuKzdUKgppnzCiktrbc/dc=","Message-ID":"<f6d3f8f8-e1b1-4251-8111-5525de0556f9@ideasonboard.com>","Date":"Sun, 27 Jul 2025 20:44:31 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-4-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>\n\t<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>\n\t<20250727183708.GH30386@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250727183708.GH30386@pendragon.ideasonboard.com>","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>"}},{"id":35171,"web_url":"https://patchwork.libcamera.org/comment/35171/","msgid":"<20250727185604.GJ30386@pendragon.ideasonboard.com>","date":"2025-07-27T18:56:04","subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, Jul 27, 2025 at 08:44:31PM +0200, Barnabás Pőcze wrote:\n> 2025. 07. 27. 20:37 keltezéssel, Laurent Pinchart írta:\n> > On Sun, Jul 27, 2025 at 07:15:56PM +0200, Barnabás Pőcze wrote:\n> >> 2025. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n> >>> On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n> >>>> On Mon, Jul 21, 2025 at 12:46:03PM +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> >>>> Our span.h implementation qualifies in this category as well.\n> >>>>\n> >>>> As I see it\n> >>>> 1) We move span.h in /details/\n> >>>> 2) We move cxx20.h in include/libcamera/base\n> >>>>\n> >>>> What's your take ?\n> >>>\n> >>> The issue with our Span class is that it's part of the public API, while\n> >>> I understand libcamera::details::cxx20 to be meant for internal usage.\n> >>> Although...\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     |  7 +++++++\n> >>>>>    2 files changed, 19 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> >>>>> 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..9836daff9 100644\n> >>>>> --- a/include/libcamera/base/meson.build\n> >>>>> +++ b/include/libcamera/base/meson.build\n> >>>>> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n> >>>>>        'utils.h',\n> >>>>>    ])\n> >>>>>\n> >>>>> +libcamera_base_details_headers = files([\n> >>>>> +    'details/cxx20.h',\n> >>>>> +])\n> >>>>> +\n> >>>>>    libcamera_base_headers = [\n> >>>>>        libcamera_base_public_headers,\n> >>>>>        libcamera_base_private_headers,\n> >>>>> +    libcamera_base_details_headers,\n> >>>>>    ]\n> >>>>>\n> >>>>>    install_headers(libcamera_base_public_headers,\n> >>>>>                    subdir : libcamera_base_include_dir)\n> >>>>> +install_headers(libcamera_base_details_headers,\n> >>>>> +                subdir : libcamera_base_include_dir / 'details')\n> >>>\n> >>> ... this seems to indicate the contrary ? Barnabás, could you please\n> >>> explain what your plan is ?\n> >>>\n> >>> If we want to use this in the public API, I think we should shorten the\n> >>> namespace for public classes, possibly to libcamera::cxx20. If it's\n> >>> purely internal, we can't move the span class here, and the headers\n> >>> should probably not be installed.\n> >>\n> >> The plan is that these are not part of the public API, merely implementation\n> >> details that need to be available in public header files, so that they can\n> >> be used from other public libcamera header files. Applications are not supposed\n> >> to use them.\n> > \n> > Then unless I'm mistaken you don't need to install those headers. I also\n> > wouldn't put this in a \"details\" namespace, libcamera::cxx20::* should\n> > be fine.\n> \n> They need to be installed because the plan is that public libcamera headers\n> files will include them.\n\nAh, then they *are* part of the public API :-)\n\nI think you can jsut add those headers to libcamera_base_public_headers.","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 05473C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Jul 2025 18:56:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0CEAF69132;\n\tSun, 27 Jul 2025 20:56:14 +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 2B12769080\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Jul 2025 20:56:12 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id C100B55A;\n\tSun, 27 Jul 2025 20:55:29 +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=\"HtuLCVYq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753642530;\n\tbh=9uKkMiyQ8US/HNweDJg/Wd3kWnt7GNfI/rQ6GO9srsM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HtuLCVYqocCRCW2ZC1/9ihm8GnfhITgwS35trvx5Y6zwPMvQdf0unnjplUi84azDZ\n\toGuoIrl9P0Gra1uCF0G0kXU/UbdfCJVC7Rf5PvuPvON4L2ivyeZGk67/+OVCsW0/ph\n\teeg8dXgETwewyNQPP4pV4mRCmMjzjvOiELVlDZJM=","Date":"Sun, 27 Jul 2025 21:56:04 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","Message-ID":"<20250727185604.GJ30386@pendragon.ideasonboard.com>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-4-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>\n\t<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>\n\t<20250727183708.GH30386@pendragon.ideasonboard.com>\n\t<f6d3f8f8-e1b1-4251-8111-5525de0556f9@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<f6d3f8f8-e1b1-4251-8111-5525de0556f9@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":35172,"web_url":"https://patchwork.libcamera.org/comment/35172/","msgid":"<b8989bf6-6a12-40ce-9772-6cf2598339df@ideasonboard.com>","date":"2025-07-27T19:02:10","subject":"Re: [RFC PATCH v2 03/22] 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":"2025. 07. 27. 20:56 keltezéssel, Laurent Pinchart írta:\n> On Sun, Jul 27, 2025 at 08:44:31PM +0200, Barnabás Pőcze wrote:\n>> 2025. 07. 27. 20:37 keltezéssel, Laurent Pinchart írta:\n>>> On Sun, Jul 27, 2025 at 07:15:56PM +0200, Barnabás Pőcze wrote:\n>>>> 2025. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n>>>>> On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n>>>>>> On Mon, Jul 21, 2025 at 12:46:03PM +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>>>>>> Our span.h implementation qualifies in this category as well.\n>>>>>>\n>>>>>> As I see it\n>>>>>> 1) We move span.h in /details/\n>>>>>> 2) We move cxx20.h in include/libcamera/base\n>>>>>>\n>>>>>> What's your take ?\n>>>>>\n>>>>> The issue with our Span class is that it's part of the public API, while\n>>>>> I understand libcamera::details::cxx20 to be meant for internal usage.\n>>>>> Although...\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     |  7 +++++++\n>>>>>>>     2 files changed, 19 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>>>>>>> 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..9836daff9 100644\n>>>>>>> --- a/include/libcamera/base/meson.build\n>>>>>>> +++ b/include/libcamera/base/meson.build\n>>>>>>> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n>>>>>>>         'utils.h',\n>>>>>>>     ])\n>>>>>>>\n>>>>>>> +libcamera_base_details_headers = files([\n>>>>>>> +    'details/cxx20.h',\n>>>>>>> +])\n>>>>>>> +\n>>>>>>>     libcamera_base_headers = [\n>>>>>>>         libcamera_base_public_headers,\n>>>>>>>         libcamera_base_private_headers,\n>>>>>>> +    libcamera_base_details_headers,\n>>>>>>>     ]\n>>>>>>>\n>>>>>>>     install_headers(libcamera_base_public_headers,\n>>>>>>>                     subdir : libcamera_base_include_dir)\n>>>>>>> +install_headers(libcamera_base_details_headers,\n>>>>>>> +                subdir : libcamera_base_include_dir / 'details')\n>>>>>\n>>>>> ... this seems to indicate the contrary ? Barnabás, could you please\n>>>>> explain what your plan is ?\n>>>>>\n>>>>> If we want to use this in the public API, I think we should shorten the\n>>>>> namespace for public classes, possibly to libcamera::cxx20. If it's\n>>>>> purely internal, we can't move the span class here, and the headers\n>>>>> should probably not be installed.\n>>>>\n>>>> The plan is that these are not part of the public API, merely implementation\n>>>> details that need to be available in public header files, so that they can\n>>>> be used from other public libcamera header files. Applications are not supposed\n>>>> to use them.\n>>>\n>>> Then unless I'm mistaken you don't need to install those headers. I also\n>>> wouldn't put this in a \"details\" namespace, libcamera::cxx20::* should\n>>> be fine.\n>>\n>> They need to be installed because the plan is that public libcamera headers\n>> files will include them.\n> \n> Ah, then they *are* part of the public API :-)\n> \n> I think you can jsut add those headers to libcamera_base_public_headers.\n> \n\nI would argue that they are not part of it. They are installed like this because\nof the limitations of the language, not because these functions/types/etc. are\nintended to be used by applications, in fact, they should not even be aware of\ntheir existence. There are no stability guarantees, etc. of any kind, they may\nbe changed, removed, moved arbitrarily between even point releases.","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 4A156BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Jul 2025 19:02:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0697669134;\n\tSun, 27 Jul 2025 21:02:17 +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 06DDF69080\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Jul 2025 21:02:15 +0200 (CEST)","from [192.168.33.14] (185.221.140.39.nat.pool.zt.hu\n\t[185.221.140.39])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 68D1155C;\n\tSun, 27 Jul 2025 21:01:33 +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=\"G/Zp4fHD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753642893;\n\tbh=drGYnA7FD/fvrxOP6THP98I0J4NFxNQZ0ETICbiegT8=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=G/Zp4fHD7ZUnHRjSFCME966OONNbk+pye+XUThbtdjOdC04xCimhhosgA6xVVy6Cm\n\t5TQHobT3kLeAkhjeWnndDbl8MGDUAiJxgLGB1PWpgg+xLlFwAbSB3PxQMO/UmrHQuk\n\tM/D6ZiQRreJGeDzjMMolgKoitfvskqB8gsEaiZt0=","Message-ID":"<b8989bf6-6a12-40ce-9772-6cf2598339df@ideasonboard.com>","Date":"Sun, 27 Jul 2025 21:02:10 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-4-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>\n\t<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>\n\t<20250727183708.GH30386@pendragon.ideasonboard.com>\n\t<f6d3f8f8-e1b1-4251-8111-5525de0556f9@ideasonboard.com>\n\t<20250727185604.GJ30386@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250727185604.GJ30386@pendragon.ideasonboard.com>","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>"}},{"id":35178,"web_url":"https://patchwork.libcamera.org/comment/35178/","msgid":"<u7icr6bdplik2wuxiqf4xcbyeaz5swkkevasq5ihz7nnpywy2t@asissmgz33t3>","date":"2025-07-28T06:37:05","subject":"Re: [RFC PATCH v2 03/22] 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":"Hi Barnabás\n\nOn Sun, Jul 27, 2025 at 09:02:10PM +0200, Barnabás Pőcze wrote:\n> 2025. 07. 27. 20:56 keltezéssel, Laurent Pinchart írta:\n> > On Sun, Jul 27, 2025 at 08:44:31PM +0200, Barnabás Pőcze wrote:\n> > > 2025. 07. 27. 20:37 keltezéssel, Laurent Pinchart írta:\n> > > > On Sun, Jul 27, 2025 at 07:15:56PM +0200, Barnabás Pőcze wrote:\n> > > > > 2025. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n> > > > > > On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n> > > > > > > On Mon, Jul 21, 2025 at 12:46:03PM +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> > > > > > > Our span.h implementation qualifies in this category as well.\n> > > > > > >\n> > > > > > > As I see it\n> > > > > > > 1) We move span.h in /details/\n> > > > > > > 2) We move cxx20.h in include/libcamera/base\n> > > > > > >\n> > > > > > > What's your take ?\n> > > > > >\n> > > > > > The issue with our Span class is that it's part of the public API, while\n> > > > > > I understand libcamera::details::cxx20 to be meant for internal usage.\n> > > > > > Although...\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     |  7 +++++++\n> > > > > > > >     2 files changed, 19 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> > > > > > > > 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..9836daff9 100644\n> > > > > > > > --- a/include/libcamera/base/meson.build\n> > > > > > > > +++ b/include/libcamera/base/meson.build\n> > > > > > > > @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n> > > > > > > >         'utils.h',\n> > > > > > > >     ])\n> > > > > > > >\n> > > > > > > > +libcamera_base_details_headers = files([\n> > > > > > > > +    'details/cxx20.h',\n> > > > > > > > +])\n> > > > > > > > +\n> > > > > > > >     libcamera_base_headers = [\n> > > > > > > >         libcamera_base_public_headers,\n> > > > > > > >         libcamera_base_private_headers,\n> > > > > > > > +    libcamera_base_details_headers,\n> > > > > > > >     ]\n> > > > > > > >\n> > > > > > > >     install_headers(libcamera_base_public_headers,\n> > > > > > > >                     subdir : libcamera_base_include_dir)\n> > > > > > > > +install_headers(libcamera_base_details_headers,\n> > > > > > > > +                subdir : libcamera_base_include_dir / 'details')\n> > > > > >\n> > > > > > ... this seems to indicate the contrary ? Barnabás, could you please\n> > > > > > explain what your plan is ?\n> > > > > >\n> > > > > > If we want to use this in the public API, I think we should shorten the\n> > > > > > namespace for public classes, possibly to libcamera::cxx20. If it's\n> > > > > > purely internal, we can't move the span class here, and the headers\n> > > > > > should probably not be installed.\n> > > > >\n> > > > > The plan is that these are not part of the public API, merely implementation\n> > > > > details that need to be available in public header files, so that they can\n> > > > > be used from other public libcamera header files. Applications are not supposed\n> > > > > to use them.\n> > > >\n> > > > Then unless I'm mistaken you don't need to install those headers. I also\n> > > > wouldn't put this in a \"details\" namespace, libcamera::cxx20::* should\n> > > > be fine.\n> > >\n> > > They need to be installed because the plan is that public libcamera headers\n> > > files will include them.\n> >\n> > Ah, then they *are* part of the public API :-)\n> >\n> > I think you can jsut add those headers to libcamera_base_public_headers.\n> >\n>\n> I would argue that they are not part of it. They are installed like this because\n> of the limitations of the language, not because these functions/types/etc. are\n> intended to be used by applications, in fact, they should not even be aware of\n\nIsn't the point that applications, once the header has been made available\nto them, can decide to use it even if we don't suggest them to do so ?\n\n> their existence. There are no stability guarantees, etc. of any kind, they may\n> be changed, removed, moved arbitrarily between even point releases.","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 0BFECBDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jul 2025 06:37:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 832946913C;\n\tMon, 28 Jul 2025 08:37:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 44B1E69135\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jul 2025 08:37:10 +0200 (CEST)","from ideasonboard.com (mob-5-90-139-29.net.vodafone.it\n\t[5.90.139.29])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D3F98465;\n\tMon, 28 Jul 2025 08:36:27 +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=\"gE4JsmvB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753684588;\n\tbh=4qHaUwyRN/Okoc0Yl1OXsBrBJfFFXq7z0a1u9qyllRA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=gE4JsmvB7QrWEdDtTHcxzayY4aRcKsKTVPK/jgzUVkyVamHPbSr+dkhNijnN62HD2\n\tl8C+OsXt81oEUiKbl+2l/slIKRqcnub4SbkbHw3/W6uXHpAO1UQTlFz0ch5uzoqu4Z\n\tuFiX3+/AVm+ksp3nXcQ6MuiANPFdrhRQGojLrr/M=","Date":"Mon, 28 Jul 2025 08:37:05 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, \n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","Message-ID":"<u7icr6bdplik2wuxiqf4xcbyeaz5swkkevasq5ihz7nnpywy2t@asissmgz33t3>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-4-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>\n\t<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>\n\t<20250727183708.GH30386@pendragon.ideasonboard.com>\n\t<f6d3f8f8-e1b1-4251-8111-5525de0556f9@ideasonboard.com>\n\t<20250727185604.GJ30386@pendragon.ideasonboard.com>\n\t<b8989bf6-6a12-40ce-9772-6cf2598339df@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<b8989bf6-6a12-40ce-9772-6cf2598339df@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":35429,"web_url":"https://patchwork.libcamera.org/comment/35429/","msgid":"<f470f9d9-e76b-4a2d-85fc-8446d66ebfc4@ideasonboard.com>","date":"2025-08-15T09:04:21","subject":"Re: [RFC PATCH v2 03/22] 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":"2025. 07. 28. 8:37 keltezéssel, Jacopo Mondi írta:\n> Hi Barnabás\n> \n> On Sun, Jul 27, 2025 at 09:02:10PM +0200, Barnabás Pőcze wrote:\n>> 2025. 07. 27. 20:56 keltezéssel, Laurent Pinchart írta:\n>>> On Sun, Jul 27, 2025 at 08:44:31PM +0200, Barnabás Pőcze wrote:\n>>>> 2025. 07. 27. 20:37 keltezéssel, Laurent Pinchart írta:\n>>>>> On Sun, Jul 27, 2025 at 07:15:56PM +0200, Barnabás Pőcze wrote:\n>>>>>> 2025. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n>>>>>>> On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n>>>>>>>> On Mon, Jul 21, 2025 at 12:46:03PM +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>>>>>>>> Our span.h implementation qualifies in this category as well.\n>>>>>>>>\n>>>>>>>> As I see it\n>>>>>>>> 1) We move span.h in /details/\n>>>>>>>> 2) We move cxx20.h in include/libcamera/base\n>>>>>>>>\n>>>>>>>> What's your take ?\n>>>>>>>\n>>>>>>> The issue with our Span class is that it's part of the public API, while\n>>>>>>> I understand libcamera::details::cxx20 to be meant for internal usage.\n>>>>>>> Although...\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     |  7 +++++++\n>>>>>>>>>      2 files changed, 19 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>>>>>>>>> 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..9836daff9 100644\n>>>>>>>>> --- a/include/libcamera/base/meson.build\n>>>>>>>>> +++ b/include/libcamera/base/meson.build\n>>>>>>>>> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n>>>>>>>>>          'utils.h',\n>>>>>>>>>      ])\n>>>>>>>>>\n>>>>>>>>> +libcamera_base_details_headers = files([\n>>>>>>>>> +    'details/cxx20.h',\n>>>>>>>>> +])\n>>>>>>>>> +\n>>>>>>>>>      libcamera_base_headers = [\n>>>>>>>>>          libcamera_base_public_headers,\n>>>>>>>>>          libcamera_base_private_headers,\n>>>>>>>>> +    libcamera_base_details_headers,\n>>>>>>>>>      ]\n>>>>>>>>>\n>>>>>>>>>      install_headers(libcamera_base_public_headers,\n>>>>>>>>>                      subdir : libcamera_base_include_dir)\n>>>>>>>>> +install_headers(libcamera_base_details_headers,\n>>>>>>>>> +                subdir : libcamera_base_include_dir / 'details')\n>>>>>>>\n>>>>>>> ... this seems to indicate the contrary ? Barnabás, could you please\n>>>>>>> explain what your plan is ?\n>>>>>>>\n>>>>>>> If we want to use this in the public API, I think we should shorten the\n>>>>>>> namespace for public classes, possibly to libcamera::cxx20. If it's\n>>>>>>> purely internal, we can't move the span class here, and the headers\n>>>>>>> should probably not be installed.\n>>>>>>\n>>>>>> The plan is that these are not part of the public API, merely implementation\n>>>>>> details that need to be available in public header files, so that they can\n>>>>>> be used from other public libcamera header files. Applications are not supposed\n>>>>>> to use them.\n>>>>>\n>>>>> Then unless I'm mistaken you don't need to install those headers. I also\n>>>>> wouldn't put this in a \"details\" namespace, libcamera::cxx20::* should\n>>>>> be fine.\n>>>>\n>>>> They need to be installed because the plan is that public libcamera headers\n>>>> files will include them.\n>>>\n>>> Ah, then they *are* part of the public API :-)\n>>>\n>>> I think you can jsut add those headers to libcamera_base_public_headers.\n>>>\n>>\n>> I would argue that they are not part of it. They are installed like this because\n>> of the limitations of the language, not because these functions/types/etc. are\n>> intended to be used by applications, in fact, they should not even be aware of\n> \n> Isn't the point that applications, once the header has been made available\n> to them, can decide to use it even if we don't suggest them to do so ?\n\nThat's true, but it's a limitation of the language. They can certainly use it,\nbut my point is that libcamera should provide no guarantees regarding these parts.\nYes, you can use it, but that is not supported. I'd argue that the use of \"details\"\nnamespace is quite a common pattern, so this shouldn't be a surprise to anyone familiar.\n\n\n> \n>> their existence. There are no stability guarantees, etc. of any kind, they may\n>> be changed, removed, moved arbitrarily between even point releases.","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 B6246BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Aug 2025 09:04:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6EE0669257;\n\tFri, 15 Aug 2025 11:04:27 +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 9F66769244\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Aug 2025 11:04:25 +0200 (CEST)","from [192.168.33.21] (185.221.141.188.nat.pool.zt.hu\n\t[185.221.141.188])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 73825605;\n\tFri, 15 Aug 2025 11:03:30 +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=\"aif3RgB7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755248610;\n\tbh=8Pe2OZxD9qySH8tbsIHoxk48cAqyI8fiHsY7oTY1qek=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=aif3RgB7EWMUEcc8eD8Rm3iLAtgM+dcCaS1tmbOLWUEOrQacaLkXYDi7mv/M0MiDm\n\t0CgyDKMtXV6+zQUtYB70CqLPCNYoID/xgxVDQiILqNrGm3ip2DPV1OeWevzlf7VCJj\n\tzR/2ffQa6I4ODxOzlEV7d45pccorXrzSINZH9nR0=","Message-ID":"<f470f9d9-e76b-4a2d-85fc-8446d66ebfc4@ideasonboard.com>","Date":"Fri, 15 Aug 2025 11:04:21 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-4-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>\n\t<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>\n\t<20250727183708.GH30386@pendragon.ideasonboard.com>\n\t<f6d3f8f8-e1b1-4251-8111-5525de0556f9@ideasonboard.com>\n\t<20250727185604.GJ30386@pendragon.ideasonboard.com>\n\t<b8989bf6-6a12-40ce-9772-6cf2598339df@ideasonboard.com>\n\t<u7icr6bdplik2wuxiqf4xcbyeaz5swkkevasq5ihz7nnpywy2t@asissmgz33t3>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<u7icr6bdplik2wuxiqf4xcbyeaz5swkkevasq5ihz7nnpywy2t@asissmgz33t3>","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>"}},{"id":35922,"web_url":"https://patchwork.libcamera.org/comment/35922/","msgid":"<175828015242.2127323.1007240219691680723@neptunite.rasen.tech>","date":"2025-09-19T11:09:12","subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2025-08-15 18:04:21)\n> 2025. 07. 28. 8:37 keltezéssel, Jacopo Mondi írta:\n> > Hi Barnabás\n> > \n> > On Sun, Jul 27, 2025 at 09:02:10PM +0200, Barnabás Pőcze wrote:\n> >> 2025. 07. 27. 20:56 keltezéssel, Laurent Pinchart írta:\n> >>> On Sun, Jul 27, 2025 at 08:44:31PM +0200, Barnabás Pőcze wrote:\n> >>>> 2025. 07. 27. 20:37 keltezéssel, Laurent Pinchart írta:\n> >>>>> On Sun, Jul 27, 2025 at 07:15:56PM +0200, Barnabás Pőcze wrote:\n> >>>>>> 2025. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n> >>>>>>> On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n> >>>>>>>> On Mon, Jul 21, 2025 at 12:46:03PM +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> >>>>>>>> Our span.h implementation qualifies in this category as well.\n> >>>>>>>>\n> >>>>>>>> As I see it\n> >>>>>>>> 1) We move span.h in /details/\n> >>>>>>>> 2) We move cxx20.h in include/libcamera/base\n> >>>>>>>>\n> >>>>>>>> What's your take ?\n> >>>>>>>\n> >>>>>>> The issue with our Span class is that it's part of the public API, while\n> >>>>>>> I understand libcamera::details::cxx20 to be meant for internal usage.\n> >>>>>>> Although...\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     |  7 +++++++\n> >>>>>>>>>      2 files changed, 19 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> >>>>>>>>> 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..9836daff9 100644\n> >>>>>>>>> --- a/include/libcamera/base/meson.build\n> >>>>>>>>> +++ b/include/libcamera/base/meson.build\n> >>>>>>>>> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n> >>>>>>>>>          'utils.h',\n> >>>>>>>>>      ])\n> >>>>>>>>>\n> >>>>>>>>> +libcamera_base_details_headers = files([\n> >>>>>>>>> +    'details/cxx20.h',\n> >>>>>>>>> +])\n> >>>>>>>>> +\n> >>>>>>>>>      libcamera_base_headers = [\n> >>>>>>>>>          libcamera_base_public_headers,\n> >>>>>>>>>          libcamera_base_private_headers,\n> >>>>>>>>> +    libcamera_base_details_headers,\n> >>>>>>>>>      ]\n> >>>>>>>>>\n> >>>>>>>>>      install_headers(libcamera_base_public_headers,\n> >>>>>>>>>                      subdir : libcamera_base_include_dir)\n> >>>>>>>>> +install_headers(libcamera_base_details_headers,\n> >>>>>>>>> +                subdir : libcamera_base_include_dir / 'details')\n> >>>>>>>\n> >>>>>>> ... this seems to indicate the contrary ? Barnabás, could you please\n> >>>>>>> explain what your plan is ?\n> >>>>>>>\n> >>>>>>> If we want to use this in the public API, I think we should shorten the\n> >>>>>>> namespace for public classes, possibly to libcamera::cxx20. If it's\n> >>>>>>> purely internal, we can't move the span class here, and the headers\n> >>>>>>> should probably not be installed.\n> >>>>>>\n> >>>>>> The plan is that these are not part of the public API, merely implementation\n> >>>>>> details that need to be available in public header files, so that they can\n> >>>>>> be used from other public libcamera header files. Applications are not supposed\n> >>>>>> to use them.\n> >>>>>\n> >>>>> Then unless I'm mistaken you don't need to install those headers. I also\n> >>>>> wouldn't put this in a \"details\" namespace, libcamera::cxx20::* should\n> >>>>> be fine.\n> >>>>\n> >>>> They need to be installed because the plan is that public libcamera headers\n> >>>> files will include them.\n> >>>\n> >>> Ah, then they *are* part of the public API :-)\n> >>>\n> >>> I think you can jsut add those headers to libcamera_base_public_headers.\n> >>>\n> >>\n> >> I would argue that they are not part of it. They are installed like this because\n> >> of the limitations of the language, not because these functions/types/etc. are\n> >> intended to be used by applications, in fact, they should not even be aware of\n> > \n> > Isn't the point that applications, once the header has been made available\n> > to them, can decide to use it even if we don't suggest them to do so ?\n> \n> That's true, but it's a limitation of the language. They can certainly use it,\n> but my point is that libcamera should provide no guarantees regarding these parts.\n> Yes, you can use it, but that is not supported. I'd argue that the use of \"details\"\n> namespace is quite a common pattern, so this shouldn't be a surprise to anyone familiar.\n\nOk, so the public libcamera headers require them, therefore cxx20.h needs to be\nin the public headers. Since they are in the public headers, applications are\nable use them regardless of if we tell them they cannot use it. This is the\npremise.\n\nSo do we consider cxx20.h to be part of the public API that needs to be checked\nfor changes every time we make a release? And if it changes then we need to\nbump the version number etc etc.\n\n> \n> > \n> >> their existence. There are no stability guarantees, etc. of any kind, they may\n> >> be changed, removed, moved arbitrarily between even point releases.\n> \n\nOr are we permitted to change it anytime we want and just say \"deal with it\" to\napplications that decided to use it against our policy?\n\nI personally don't think that the latter is reasonable. We exposed it as a\npublic API whether it was intended to be used by applications or not. Therefore\nit's probably more reasonable (and responsible) to go the full mile and just\nexpose it as public API and include it in public API versioning/policies.\n\nI understand that it's due to a limitation of the language, but with this\ndirection in design, I think it's the more responsible choice to make it fully\npart of the public API, just like how spans are.\n\nAlso considering that the API surface isn't that big and I don't expect it to\nchange very frequently (maybe grow but not change) I don't think it'll be that\nbig of an issue to support properly.\n\nMy two cents.\n\n\nPaul","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 42A4FC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Sep 2025 11:09:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8142362C3B;\n\tFri, 19 Sep 2025 13:09:21 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 40E8F62C35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Sep 2025 13:09:19 +0200 (CEST)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:ae7e:60b0:e249:fbe5])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 4EF6D50A;\n\tFri, 19 Sep 2025 13:07:58 +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=\"TrFt1Y2G\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758280078;\n\tbh=gJAmZqKZZ29KrjFO1qLZy52E/Dt/2X3b2s3ywoikscE=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=TrFt1Y2GuvQTiTs1D67n5JwoZdeGHSAKhjbjcaaixKSsyM/Pg0kvF/cgPrgReox3W\n\t15qSVw3kFWnZTiTUiaMQc2KVqh7dr2/fe4Zn7wmWYVcQfTjXC/GBEi72WTucYjDzWk\n\t6WoZmOQjIOlrQhoSmRGdSk+xaLLGAbDssP1L7DIY=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<f470f9d9-e76b-4a2d-85fc-8446d66ebfc4@ideasonboard.com>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>\n\t<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>\n\t<20250727183708.GH30386@pendragon.ideasonboard.com>\n\t<f6d3f8f8-e1b1-4251-8111-5525de0556f9@ideasonboard.com>\n\t<20250727185604.GJ30386@pendragon.ideasonboard.com>\n\t<b8989bf6-6a12-40ce-9772-6cf2598339df@ideasonboard.com>\n\t<u7icr6bdplik2wuxiqf4xcbyeaz5swkkevasq5ihz7nnpywy2t@asissmgz33t3>\n\t<f470f9d9-e76b-4a2d-85fc-8446d66ebfc4@ideasonboard.com>","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","From":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Date":"Fri, 19 Sep 2025 20:09:12 +0900","Message-ID":"<175828015242.2127323.1007240219691680723@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","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":35947,"web_url":"https://patchwork.libcamera.org/comment/35947/","msgid":"<0b625344-6f8f-4af0-8213-23710356a3f7@ideasonboard.com>","date":"2025-09-22T11:17:09","subject":"Re: [RFC PATCH v2 03/22] 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":"2025. 09. 19. 13:09 keltezéssel, Paul Elder írta:\n> Quoting Barnabás Pőcze (2025-08-15 18:04:21)\n>> 2025. 07. 28. 8:37 keltezéssel, Jacopo Mondi írta:\n>>> Hi Barnabás\n>>>\n>>> On Sun, Jul 27, 2025 at 09:02:10PM +0200, Barnabás Pőcze wrote:\n>>>> 2025. 07. 27. 20:56 keltezéssel, Laurent Pinchart írta:\n>>>>> On Sun, Jul 27, 2025 at 08:44:31PM +0200, Barnabás Pőcze wrote:\n>>>>>> 2025. 07. 27. 20:37 keltezéssel, Laurent Pinchart írta:\n>>>>>>> On Sun, Jul 27, 2025 at 07:15:56PM +0200, Barnabás Pőcze wrote:\n>>>>>>>> 2025. 07. 27. 15:30 keltezéssel, Laurent Pinchart írta:\n>>>>>>>>> On Fri, Jul 25, 2025 at 02:58:06PM +0200, Jacopo Mondi wrote:\n>>>>>>>>>> On Mon, Jul 21, 2025 at 12:46:03PM +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>>>>>>>>>> Our span.h implementation qualifies in this category as well.\n>>>>>>>>>>\n>>>>>>>>>> As I see it\n>>>>>>>>>> 1) We move span.h in /details/\n>>>>>>>>>> 2) We move cxx20.h in include/libcamera/base\n>>>>>>>>>>\n>>>>>>>>>> What's your take ?\n>>>>>>>>>\n>>>>>>>>> The issue with our Span class is that it's part of the public API, while\n>>>>>>>>> I understand libcamera::details::cxx20 to be meant for internal usage.\n>>>>>>>>> Although...\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     |  7 +++++++\n>>>>>>>>>>>       2 files changed, 19 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>>>>>>>>>>> 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..9836daff9 100644\n>>>>>>>>>>> --- a/include/libcamera/base/meson.build\n>>>>>>>>>>> +++ b/include/libcamera/base/meson.build\n>>>>>>>>>>> @@ -31,10 +31,17 @@ libcamera_base_private_headers = files([\n>>>>>>>>>>>           'utils.h',\n>>>>>>>>>>>       ])\n>>>>>>>>>>>\n>>>>>>>>>>> +libcamera_base_details_headers = files([\n>>>>>>>>>>> +    'details/cxx20.h',\n>>>>>>>>>>> +])\n>>>>>>>>>>> +\n>>>>>>>>>>>       libcamera_base_headers = [\n>>>>>>>>>>>           libcamera_base_public_headers,\n>>>>>>>>>>>           libcamera_base_private_headers,\n>>>>>>>>>>> +    libcamera_base_details_headers,\n>>>>>>>>>>>       ]\n>>>>>>>>>>>\n>>>>>>>>>>>       install_headers(libcamera_base_public_headers,\n>>>>>>>>>>>                       subdir : libcamera_base_include_dir)\n>>>>>>>>>>> +install_headers(libcamera_base_details_headers,\n>>>>>>>>>>> +                subdir : libcamera_base_include_dir / 'details')\n>>>>>>>>>\n>>>>>>>>> ... this seems to indicate the contrary ? Barnabás, could you please\n>>>>>>>>> explain what your plan is ?\n>>>>>>>>>\n>>>>>>>>> If we want to use this in the public API, I think we should shorten the\n>>>>>>>>> namespace for public classes, possibly to libcamera::cxx20. If it's\n>>>>>>>>> purely internal, we can't move the span class here, and the headers\n>>>>>>>>> should probably not be installed.\n>>>>>>>>\n>>>>>>>> The plan is that these are not part of the public API, merely implementation\n>>>>>>>> details that need to be available in public header files, so that they can\n>>>>>>>> be used from other public libcamera header files. Applications are not supposed\n>>>>>>>> to use them.\n>>>>>>>\n>>>>>>> Then unless I'm mistaken you don't need to install those headers. I also\n>>>>>>> wouldn't put this in a \"details\" namespace, libcamera::cxx20::* should\n>>>>>>> be fine.\n>>>>>>\n>>>>>> They need to be installed because the plan is that public libcamera headers\n>>>>>> files will include them.\n>>>>>\n>>>>> Ah, then they *are* part of the public API :-)\n>>>>>\n>>>>> I think you can jsut add those headers to libcamera_base_public_headers.\n>>>>>\n>>>>\n>>>> I would argue that they are not part of it. They are installed like this because\n>>>> of the limitations of the language, not because these functions/types/etc. are\n>>>> intended to be used by applications, in fact, they should not even be aware of\n>>>\n>>> Isn't the point that applications, once the header has been made available\n>>> to them, can decide to use it even if we don't suggest them to do so ?\n>>\n>> That's true, but it's a limitation of the language. They can certainly use it,\n>> but my point is that libcamera should provide no guarantees regarding these parts.\n>> Yes, you can use it, but that is not supported. I'd argue that the use of \"details\"\n>> namespace is quite a common pattern, so this shouldn't be a surprise to anyone familiar.\n> \n> Ok, so the public libcamera headers require them, therefore cxx20.h needs to be\n> in the public headers. Since they are in the public headers, applications are\n> able use them regardless of if we tell them they cannot use it. This is the\n> premise.\n> \n> So do we consider cxx20.h to be part of the public API that needs to be checked\n> for changes every time we make a release? And if it changes then we need to\n> bump the version number etc etc.\n> \n>>\n>>>\n>>>> their existence. There are no stability guarantees, etc. of any kind, they may\n>>>> be changed, removed, moved arbitrarily between even point releases.\n>>\n> \n> Or are we permitted to change it anytime we want and just say \"deal with it\" to\n> applications that decided to use it against our policy?\n\nThat is exactly what I suggesting here.\n\n\n> \n> I personally don't think that the latter is reasonable. We exposed it as a\n> public API whether it was intended to be used by applications or not. Therefore\n> it's probably more reasonable (and responsible) to go the full mile and just\n> expose it as public API and include it in public API versioning/policies.\n> \n> I understand that it's due to a limitation of the language, but with this\n> direction in design, I think it's the more responsible choice to make it fully\n> part of the public API, just like how spans are.\n> \n> Also considering that the API surface isn't that big and I don't expect it to\n> change very frequently (maybe grow but not change) I don't think it'll be that\n> big of an issue to support properly.\n\nI don't really see the point of libcamera offering a small set of incomplete C++20\npolyfills as part of its public interface. I don't really see why anyone would\neven use them in the first place, so my preference is avoiding any commitment to\nkeeping these things stable and present.\n\n\n> \n> My two cents.\n> \n> \n> Paul","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 7395ABDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 22 Sep 2025 11:17:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E9A376B5F3;\n\tMon, 22 Sep 2025 13:17:20 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 725F362C35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Sep 2025 13:17:18 +0200 (CEST)","from [192.168.33.12] (185.221.142.115.nat.pool.zt.hu\n\t[185.221.142.115])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B06B522E;\n\tMon, 22 Sep 2025 13:15:55 +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=\"MrdY47fG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758539755;\n\tbh=uasxO2s/iMnpBoeWwwfAsRv3yeU2h6wNX7GQkQTVUew=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=MrdY47fGJW/BVHw9LgqMsi2tSgij0o566ztm8S9CyD0CqU6gKW7arXwS7V1S7wFm+\n\t8oHLHBE7C1zpGylnYpMssODlHM1HbCdEOzKpH2f4D/rxiyCUmeGuJovPw19fqnDxRw\n\tOgSHPivaJPNK/YqoQOKAXrE4ekPPaRe37YqFEIyE=","Message-ID":"<0b625344-6f8f-4af0-8213-23710356a3f7@ideasonboard.com>","Date":"Mon, 22 Sep 2025 13:17:09 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 03/22] libcamera: base: Add file for C++20\n\tpolyfills","To":"Paul Elder <paul.elder@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<lqpqwsba7c7uytt7jl4dwvomi3t5xij5gnk2jnly66gennsps7@adyrc3k3tb3i>\n\t<20250727133015.GG27425@pendragon.ideasonboard.com>\n\t<3f6c33c3-9432-45a0-919d-d92e0f51c02d@ideasonboard.com>\n\t<20250727183708.GH30386@pendragon.ideasonboard.com>\n\t<f6d3f8f8-e1b1-4251-8111-5525de0556f9@ideasonboard.com>\n\t<20250727185604.GJ30386@pendragon.ideasonboard.com>\n\t<b8989bf6-6a12-40ce-9772-6cf2598339df@ideasonboard.com>\n\t<u7icr6bdplik2wuxiqf4xcbyeaz5swkkevasq5ihz7nnpywy2t@asissmgz33t3>\n\t<f470f9d9-e76b-4a2d-85fc-8446d66ebfc4@ideasonboard.com>\n\t<XFs01yxeMlZjxiNkqiBXFukPMBw_rGCCiqzeNjgq0V-oDKmCftHSZ9oBdr1pKBnSIFna-k9AWpoNX00-h4VGKA==@protonmail.internalid>\n\t<175828015242.2127323.1007240219691680723@neptunite.rasen.tech>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<175828015242.2127323.1007240219691680723@neptunite.rasen.tech>","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>"}}]