[{"id":29397,"web_url":"https://patchwork.libcamera.org/comment/29397/","msgid":"<20240502231341.GG4959@pendragon.ideasonboard.com>","date":"2024-05-02T23:13:41","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Barnabás,\n\nThank you for the patch.\n\nOn Tue, Apr 30, 2024 at 07:26:21PM +0000, Barnabás Pőcze wrote:\n> C++20 deprecated implicit capture of `this` via `[=]`.\n> Fix that by explicitly capturing the necessary variables.\n> \n> Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nIt would be nice if there was a way to enable this warning even with\nC++17, but it's covered by -Wdeprecated :-S\n\n> ---\n>  src/apps/cam/camera_session.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n> index 334d2ed8..d1f65a99 100644\n> --- a/src/apps/cam/camera_session.cpp\n> +++ b/src/apps/cam/camera_session.cpp\n> @@ -382,7 +382,7 @@ void CameraSession::requestComplete(Request *request)\n>  \t * Defer processing of the completed request to the event loop, to avoid\n>  \t * blocking the camera manager thread.\n>  \t */\n> -\tEventLoop::instance()->callLater([=]() { processRequest(request); });\n> +\tEventLoop::instance()->callLater([this, request]() { processRequest(request); });\n>  }\n>  \n>  void CameraSession::processRequest(Request *request)","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 1CFA6C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 May 2024 23:13:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3FC8563418;\n\tFri,  3 May 2024 01:13:50 +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 549DF62C9F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 01:13:48 +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 ESMTPSA id 37994593;\n\tFri,  3 May 2024 01:12:50 +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=\"XG/M4yhO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1714691570;\n\tbh=v5FjCunhwnSdm7T2kX2MClASi9PEhCjQTLW5Z0J3KzM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=XG/M4yhODkBiHJt5N9sPc4y4lRb2ZXlvYeTuqUdpOHt9m+mLqia+lsFkHfZEpDj7q\n\tTpe1IfGROEKgGRzmofHAPMN8phgAjjy4IEEJffQ7ZYMoENFgkvLKIJeyt2oC/kohs2\n\tLK625Mp6cgb+3PaNMDRd0lL8BcRWdPbyeLNes960=","Date":"Fri, 3 May 2024 02:13:41 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Message-ID":"<20240502231341.GG4959@pendragon.ideasonboard.com>","References":"<20240430192620.779489-1-pobrn@protonmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20240430192620.779489-1-pobrn@protonmail.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":29398,"web_url":"https://patchwork.libcamera.org/comment/29398/","msgid":"<pE2O6sCBRetaznEH0wHh72PkLLhubhVo_988i3J4QlLi0LGrP3pGMMfZ-bz9QwX3gmWPlOwGA433FfQ138DywIgUNapVJcTQwixCIhm4r0k=@protonmail.com>","date":"2024-05-02T23:40:42","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"Hi\n\n\n2024. május 3., péntek 1:13 keltezéssel, Laurent Pinchart <laurent.pinchart@ideasonboard.com> írta:\n\n> Hi Barnabás,\n> \n> Thank you for the patch.\n> \n> On Tue, Apr 30, 2024 at 07:26:21PM +0000, Barnabás Pőcze wrote:\n> > C++20 deprecated implicit capture of `this` via `[=]`.\n> > Fix that by explicitly capturing the necessary variables.\n> >\n> > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> It would be nice if there was a way to enable this warning even with\n> C++17, but it's covered by -Wdeprecated :-S\n\nIn the CI one could do builds with `meson setup ... -D cpp_std=c++20`.\n\nIt almost builds, there is one other issue still:\n\n/libcamera/src/apps/qcam/main_window.cpp:193:38: error: bitwise operation between different enumeration types ‘Qt::Modifier’ and ‘Qt::Key’ is deprecated [-Werror=deprecated-enum-enum-conversion]\n  193 |         action->setShortcut(Qt::CTRL | Qt::Key_Q);\n      |                             ~~~~~~~~~^~~~~~~~~~~\n\n\n> \n> > ---\n> >  src/apps/cam/camera_session.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n> > index 334d2ed8..d1f65a99 100644\n> > --- a/src/apps/cam/camera_session.cpp\n> > +++ b/src/apps/cam/camera_session.cpp\n> > @@ -382,7 +382,7 @@ void CameraSession::requestComplete(Request *request)\n> >  \t * Defer processing of the completed request to the event loop, to avoid\n> >  \t * blocking the camera manager thread.\n> >  \t */\n> > -\tEventLoop::instance()->callLater([=]() { processRequest(request); });\n> > +\tEventLoop::instance()->callLater([this, request]() { processRequest(request); });\n> >  }\n> >\n> >  void CameraSession::processRequest(Request *request)\n> \n> --\n> Regards,\n> \n> Laurent Pinchart\n> \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 D155BBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 May 2024 23:40:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E754E6340B;\n\tFri,  3 May 2024 01:40:50 +0200 (CEST)","from mail-40134.protonmail.ch (mail-40134.protonmail.ch\n\t[185.70.40.134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5EA6362C9F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 01:40:49 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"u+d/o/xC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1714693247; x=1714952447;\n\tbh=kVYjkye9Tga3e/6E++CQ8Bi7SfNwDOm2d5AqZQfv9TM=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=u+d/o/xCf4nrJyc0RwdFyvp51sNBY3W1LKa/Jw3ZnsBm4De4qp++5ahdGzzV06Eum\n\tnpsC/M+GLB6Q47f1AHV89MTzUEVXBBG7tRZWwSDorIvFMoaAvdH0n3QPNyBGSIz3xK\n\tw73OaD1exelXQS/W2ep9/DT5Uxu6Wu13l+9J+Rd/38kKe/0AmPBTxJilrXc+mFIaYT\n\tLs/5MKeL9lqhea4lUatzAoD1c+Tm144983KDRvRvylpLY2z4N8ZPxNE4N06lML7A3n\n\tl2UQCuFCx6TDiOvVsM5bXlfuk/Ty9G+8CSL2O1HJPaXs4m4gXfnVcv1UiYhgndXQIw\n\t1cz3YA15wTBvg==","Date":"Thu, 02 May 2024 23:40:42 +0000","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Message-ID":"<pE2O6sCBRetaznEH0wHh72PkLLhubhVo_988i3J4QlLi0LGrP3pGMMfZ-bz9QwX3gmWPlOwGA433FfQ138DywIgUNapVJcTQwixCIhm4r0k=@protonmail.com>","In-Reply-To":"<20240502231341.GG4959@pendragon.ideasonboard.com>","References":"<20240430192620.779489-1-pobrn@protonmail.com>\n\t<20240502231341.GG4959@pendragon.ideasonboard.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"930ec82f595b4f5440714dccea59cf2e7c335e3d","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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":29400,"web_url":"https://patchwork.libcamera.org/comment/29400/","msgid":"<20240502235845.GI4959@pendragon.ideasonboard.com>","date":"2024-05-02T23:58:45","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Barnabás,\n\nOn Thu, May 02, 2024 at 11:40:42PM +0000, Barnabás Pőcze wrote:\n> 2024. május 3., péntek 1:13 keltezéssel, Laurent Pinchart írta:\n> > On Tue, Apr 30, 2024 at 07:26:21PM +0000, Barnabás Pőcze wrote:\n> > > C++20 deprecated implicit capture of `this` via `[=]`.\n> > > Fix that by explicitly capturing the necessary variables.\n> > >\n> > > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> > \n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > It would be nice if there was a way to enable this warning even with\n> > C++17, but it's covered by -Wdeprecated :-S\n> \n> In the CI one could do builds with `meson setup ... -D cpp_std=c++20`.\n\nThat's a good idea.\n\n> It almost builds, there is one other issue still:\n> \n> /libcamera/src/apps/qcam/main_window.cpp:193:38: error: bitwise operation between different enumeration types ‘Qt::Modifier’ and ‘Qt::Key’ is deprecated [-Werror=deprecated-enum-enum-conversion]\n>   193 |         action->setShortcut(Qt::CTRL | Qt::Key_Q);\n>       |                             ~~~~~~~~~^~~~~~~~~~~\n\nI'm working on fixing that one :-)\n\n> > > ---\n> > >  src/apps/cam/camera_session.cpp | 2 +-\n> > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n> > > index 334d2ed8..d1f65a99 100644\n> > > --- a/src/apps/cam/camera_session.cpp\n> > > +++ b/src/apps/cam/camera_session.cpp\n> > > @@ -382,7 +382,7 @@ void CameraSession::requestComplete(Request *request)\n> > >  \t * Defer processing of the completed request to the event loop, to avoid\n> > >  \t * blocking the camera manager thread.\n> > >  \t */\n> > > -\tEventLoop::instance()->callLater([=]() { processRequest(request); });\n> > > +\tEventLoop::instance()->callLater([this, request]() { processRequest(request); });\n> > >  }\n> > >\n> > >  void CameraSession::processRequest(Request *request)","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 8FED7C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 May 2024 23:58:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B9A7C6341A;\n\tFri,  3 May 2024 01:58:54 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8DF9463416\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 01:58:53 +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 ESMTPSA id 76CFB593;\n\tFri,  3 May 2024 01:57: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=\"tf7wHrmN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1714694275;\n\tbh=bIn5ktenKil/J4fSWyeSdwuuLwONT/V1ahjA6SFGbOg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tf7wHrmNMAG7JCmAcQJ7OwREqL7Yb5vzZSmzCPDCqFBQX7iO2HP2483zt3KcFU4C/\n\tJkGLYKH44JqTceYL31fp2Hct+zfdaFBC4s/a775Tn2GIVRE/tGiAxE0VvtR6ZcVAF3\n\t4tZtSc2bPd/+eIZRiEZ+BUGN/2VNHIk1dHmaMjzo=","Date":"Fri, 3 May 2024 02:58:45 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Message-ID":"<20240502235845.GI4959@pendragon.ideasonboard.com>","References":"<20240430192620.779489-1-pobrn@protonmail.com>\n\t<20240502231341.GG4959@pendragon.ideasonboard.com>\n\t<pE2O6sCBRetaznEH0wHh72PkLLhubhVo_988i3J4QlLi0LGrP3pGMMfZ-bz9QwX3gmWPlOwGA433FfQ138DywIgUNapVJcTQwixCIhm4r0k=@protonmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<pE2O6sCBRetaznEH0wHh72PkLLhubhVo_988i3J4QlLi0LGrP3pGMMfZ-bz9QwX3gmWPlOwGA433FfQ138DywIgUNapVJcTQwixCIhm4r0k=@protonmail.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":29404,"web_url":"https://patchwork.libcamera.org/comment/29404/","msgid":"<20240503031252.GB23175@pendragon.ideasonboard.com>","date":"2024-05-03T03:12:52","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, May 03, 2024 at 02:58:45AM +0300, Laurent Pinchart wrote:\n> On Thu, May 02, 2024 at 11:40:42PM +0000, Barnabás Pőcze wrote:\n> > 2024. május 3., péntek 1:13 keltezéssel, Laurent Pinchart írta:\n> > > On Tue, Apr 30, 2024 at 07:26:21PM +0000, Barnabás Pőcze wrote:\n> > > > C++20 deprecated implicit capture of `this` via `[=]`.\n> > > > Fix that by explicitly capturing the necessary variables.\n> > > >\n> > > > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> > > \n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > \n> > > It would be nice if there was a way to enable this warning even with\n> > > C++17, but it's covered by -Wdeprecated :-S\n> > \n> > In the CI one could do builds with `meson setup ... -D cpp_std=c++20`.\n> \n> That's a good idea.\n\nThe result is surprising:\n\nhttps://gitlab.freedesktop.org/pinchartl/libcamera/-/jobs/58304138\n\nI don't think I'll have time to investigate this very soon.\n\n> > It almost builds, there is one other issue still:\n> > \n> > /libcamera/src/apps/qcam/main_window.cpp:193:38: error: bitwise operation between different enumeration types ‘Qt::Modifier’ and ‘Qt::Key’ is deprecated [-Werror=deprecated-enum-enum-conversion]\n> >   193 |         action->setShortcut(Qt::CTRL | Qt::Key_Q);\n> >       |                             ~~~~~~~~~^~~~~~~~~~~\n> \n> I'm working on fixing that one :-)\n\nThe fix is on the list.\n\n> > > > ---\n> > > >  src/apps/cam/camera_session.cpp | 2 +-\n> > > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > > >\n> > > > diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n> > > > index 334d2ed8..d1f65a99 100644\n> > > > --- a/src/apps/cam/camera_session.cpp\n> > > > +++ b/src/apps/cam/camera_session.cpp\n> > > > @@ -382,7 +382,7 @@ void CameraSession::requestComplete(Request *request)\n> > > >  \t * Defer processing of the completed request to the event loop, to avoid\n> > > >  \t * blocking the camera manager thread.\n> > > >  \t */\n> > > > -\tEventLoop::instance()->callLater([=]() { processRequest(request); });\n> > > > +\tEventLoop::instance()->callLater([this, request]() { processRequest(request); });\n> > > >  }\n> > > >\n> > > >  void CameraSession::processRequest(Request *request)","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 B2A49BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 May 2024 03:13:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A912D63418;\n\tFri,  3 May 2024 05:13:00 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 408A262C9F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 05:12:59 +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 ESMTPSA id 0563B593;\n\tFri,  3 May 2024 05:12:00 +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=\"kXHydJg/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1714705921;\n\tbh=vq3Pyzs4LOoBXOqTx7youS/JJb4Pu9q1sW+szPGzByM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=kXHydJg/xwwrk7QlDcqxwWHraRkFN1DuKrpK4eLbVWH4onD/rtNH0uPBujjaGzYGD\n\tNVcuAovsRtHm1U6saJaeBAWs8QQdeJVCimt7ae5xc4IhLKtIIJu/UBam5pB3K/eC9i\n\tXEM0APO5G5GDE+wv8r8jQo4S/qWWk/IwhP9bMzuc=","Date":"Fri, 3 May 2024 06:12:52 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Message-ID":"<20240503031252.GB23175@pendragon.ideasonboard.com>","References":"<20240430192620.779489-1-pobrn@protonmail.com>\n\t<20240502231341.GG4959@pendragon.ideasonboard.com>\n\t<pE2O6sCBRetaznEH0wHh72PkLLhubhVo_988i3J4QlLi0LGrP3pGMMfZ-bz9QwX3gmWPlOwGA433FfQ138DywIgUNapVJcTQwixCIhm4r0k=@protonmail.com>\n\t<20240502235845.GI4959@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20240502235845.GI4959@pendragon.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":29410,"web_url":"https://patchwork.libcamera.org/comment/29410/","msgid":"<f703b3bb-b6ea-4d70-a4cf-f48d79761806@ideasonboard.com>","date":"2024-05-03T10:54:47","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Barnabás\n\nOn 01/05/24 12:56 am, Barnabás Pőcze wrote:\n> C++20 deprecated implicit capture of `this` via `[=]`.\n> Fix that by explicitly capturing the necessary variables.\n>\n> Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n\nThank you for the patch.\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\nThere is one more instance of \"[=]\" which I think is also a similar \ncandidate...\n\n                 auto encoder = std::find_if(encoders.begin(), \nencoders.end(),\n                                             [=](const Encoder &e) {\n                                                     return e.id() == \nencoderId;\n                                             });\n\nin src/apps/cam/drm.cpp\n\nIt can be a patch squashed in this one, or a patch on top (I prefer the \nformer though).\n\n> ---\n>   src/apps/cam/camera_session.cpp | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n> index 334d2ed8..d1f65a99 100644\n> --- a/src/apps/cam/camera_session.cpp\n> +++ b/src/apps/cam/camera_session.cpp\n> @@ -382,7 +382,7 @@ void CameraSession::requestComplete(Request *request)\n>   \t * Defer processing of the completed request to the event loop, to avoid\n>   \t * blocking the camera manager thread.\n>   \t */\n> -\tEventLoop::instance()->callLater([=]() { processRequest(request); });\n> +\tEventLoop::instance()->callLater([this, request]() { processRequest(request); });\n>   }\n>   \n>   void CameraSession::processRequest(Request *request)\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 9BA2FC3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 May 2024 10:54:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BE00C6340B;\n\tFri,  3 May 2024 12:54:55 +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 0E51861A8A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 12:54:54 +0200 (CEST)","from [192.168.1.105] (unknown [103.86.18.247])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7A885BD1;\n\tFri,  3 May 2024 12:53:54 +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=\"Gjv98uW+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1714733635;\n\tbh=pgy00nE5oCRZCool+IlZXgJz7fAizwpHBLbjPZ65NkI=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=Gjv98uW+qLx37uyTdZn7ceU2n64FGhkZb5r6+BgLvjxIQR5RghhKY0KBj3ipVgFrF\n\tTInZmXZJ5oeT5qepdEpz4uatjkPPgygdkfVNAG5wQlxUoZLHj1WMTngtemqb/pXZCq\n\tGItzWg19wTDpvQ4FSFK55FIA/AsnPs5bcwQhYPGQ=","Message-ID":"<f703b3bb-b6ea-4d70-a4cf-f48d79761806@ideasonboard.com>","Date":"Fri, 3 May 2024 16:24:47 +0530","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Content-Language":"en-US","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20240430192620.779489-1-pobrn@protonmail.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","In-Reply-To":"<20240430192620.779489-1-pobrn@protonmail.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":29411,"web_url":"https://patchwork.libcamera.org/comment/29411/","msgid":"<20240503120203.GA13904@pendragon.ideasonboard.com>","date":"2024-05-03T12:02:03","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nOn Fri, May 03, 2024 at 04:24:47PM +0530, Umang Jain wrote:\n> Hi Barnabás\n> \n> On 01/05/24 12:56 am, Barnabás Pőcze wrote:\n> > C++20 deprecated implicit capture of `this` via `[=]`.\n> > Fix that by explicitly capturing the necessary variables.\n> >\n> > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> \n> Thank you for the patch.\n> \n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> \n> There is one more instance of \"[=]\" which I think is also a similar \n> candidate...\n> \n>                  auto encoder = std::find_if(encoders.begin(), \n> encoders.end(),\n>                                              [=](const Encoder &e) {\n>                                                      return e.id() == \n> encoderId;\n>                                              });\n> \n> in src/apps/cam/drm.cpp\n\nThat lambda function doesn't capture 'this'. 'e' is a parameter to the\nfunction, and 'encoderId' is a local variable.\n\n> It can be a patch squashed in this one, or a patch on top (I prefer the \n> former though).\n> \n> > ---\n> >   src/apps/cam/camera_session.cpp | 2 +-\n> >   1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n> > index 334d2ed8..d1f65a99 100644\n> > --- a/src/apps/cam/camera_session.cpp\n> > +++ b/src/apps/cam/camera_session.cpp\n> > @@ -382,7 +382,7 @@ void CameraSession::requestComplete(Request *request)\n> >   \t * Defer processing of the completed request to the event loop, to avoid\n> >   \t * blocking the camera manager thread.\n> >   \t */\n> > -\tEventLoop::instance()->callLater([=]() { processRequest(request); });\n> > +\tEventLoop::instance()->callLater([this, request]() { processRequest(request); });\n> >   }\n> >   \n> >   void CameraSession::processRequest(Request *request)","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 578BFBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 May 2024 12:02:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3ECA363418;\n\tFri,  3 May 2024 14:02:13 +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 69A0861A8A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 14:02:11 +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 ESMTPSA id EF0493A3;\n\tFri,  3 May 2024 14:01:12 +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=\"nSE9Otpw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1714737673;\n\tbh=Aba2dfgYGDPsZtPMoCQ9Nb8IBckYT9kmgBlES/7SFVc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=nSE9OtpwzlNfxSF58cgb6ZdA/HV9FoWX3zwr6Pgq0dyI6DsBi2x2tFsucbKE8QQqf\n\tX588BJPAQfObcgozKVMP66UiiU0PoX1sei1G2S89v9T80CUI+FVRklyY4owiOAXxaQ\n\tl3J5xdS+IF7kjmMs5LukfeEn77N0T3MDFVLY2NMU=","Date":"Fri, 3 May 2024 15:02:03 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Message-ID":"<20240503120203.GA13904@pendragon.ideasonboard.com>","References":"<20240430192620.779489-1-pobrn@protonmail.com>\n\t<f703b3bb-b6ea-4d70-a4cf-f48d79761806@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<f703b3bb-b6ea-4d70-a4cf-f48d79761806@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":29412,"web_url":"https://patchwork.libcamera.org/comment/29412/","msgid":"<610411c6-23e6-4ae6-b483-4d0eeda96339@ideasonboard.com>","date":"2024-05-03T12:04:56","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi,\n\nOn 03/05/24 5:32 pm, Laurent Pinchart wrote:\n> Hi Umang,\n>\n> On Fri, May 03, 2024 at 04:24:47PM +0530, Umang Jain wrote:\n>> Hi Barnabás\n>>\n>> On 01/05/24 12:56 am, Barnabás Pőcze wrote:\n>>> C++20 deprecated implicit capture of `this` via `[=]`.\n>>> Fix that by explicitly capturing the necessary variables.\n>>>\n>>> Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n>> Thank you for the patch.\n>>\n>> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n>>\n>> There is one more instance of \"[=]\" which I think is also a similar\n>> candidate...\n>>\n>>                   auto encoder = std::find_if(encoders.begin(),\n>> encoders.end(),\n>>                                               [=](const Encoder &e) {\n>>                                                       return e.id() ==\n>> encoderId;\n>>                                               });\n>>\n>> in src/apps/cam/drm.cpp\n> That lambda function doesn't capture 'this'. 'e' is a parameter to the\n> function, and 'encoderId' is a local variable.\n\nAh yes, that's correct. Got confused on looking at 'encoderId'\n\nSorry for the noise.\n>\n>> It can be a patch squashed in this one, or a patch on top (I prefer the\n>> former though).\n>>\n>>> ---\n>>>    src/apps/cam/camera_session.cpp | 2 +-\n>>>    1 file changed, 1 insertion(+), 1 deletion(-)\n>>>\n>>> diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n>>> index 334d2ed8..d1f65a99 100644\n>>> --- a/src/apps/cam/camera_session.cpp\n>>> +++ b/src/apps/cam/camera_session.cpp\n>>> @@ -382,7 +382,7 @@ void CameraSession::requestComplete(Request *request)\n>>>    \t * Defer processing of the completed request to the event loop, to avoid\n>>>    \t * blocking the camera manager thread.\n>>>    \t */\n>>> -\tEventLoop::instance()->callLater([=]() { processRequest(request); });\n>>> +\tEventLoop::instance()->callLater([this, request]() { processRequest(request); });\n>>>    }\n>>>    \n>>>    void CameraSession::processRequest(Request *request)","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 E1C44C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 May 2024 12:05:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 25FC76341A;\n\tFri,  3 May 2024 14:05:04 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 98DA563415\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 14:05:02 +0200 (CEST)","from [192.168.1.105] (unknown [103.86.18.247])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7071D675;\n\tFri,  3 May 2024 14:04:02 +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=\"uTJeICUA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1714737844;\n\tbh=5e7dkLbWOgepfnCyAUZ/4wFCOInFQuBh4o6rKV1EHPc=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=uTJeICUA7iBHINFLM5OHD1/oATzVt7pMxAmXN0nfy0DaZiangJb0w4WjrasDojhBP\n\tHtBlxafbjq5hfUBgd20sUG5lnanHS9nx9MLdpNzr1CJjIMXF+32t6A5plQ83mws8SN\n\tLFyuqZsOs4lRdY5dUYuRgGQ3AShs6kbWJsOUeL6Y=","Message-ID":"<610411c6-23e6-4ae6-b483-4d0eeda96339@ideasonboard.com>","Date":"Fri, 3 May 2024 17:34:56 +0530","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20240430192620.779489-1-pobrn@protonmail.com>\n\t<f703b3bb-b6ea-4d70-a4cf-f48d79761806@ideasonboard.com>\n\t<20240503120203.GA13904@pendragon.ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","In-Reply-To":"<20240503120203.GA13904@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":29420,"web_url":"https://patchwork.libcamera.org/comment/29420/","msgid":"<qiE7B4008q4aQT5Lt7mQfzGURjfgHEWbj-wbDeYVIfgbT0JigZh4Uz-yucArEJW4u0vjUgyuC_UluFcMYDsvRA8RHf9GPvaiiG9p3BQvjyM=@protonmail.com>","date":"2024-05-03T17:25:17","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"Hi\n\n\n2024. május 3., péntek 5:12 keltezéssel, Laurent Pinchart <laurent.pinchart@ideasonboard.com> írta:\n\n> On Fri, May 03, 2024 at 02:58:45AM +0300, Laurent Pinchart wrote:\n> > On Thu, May 02, 2024 at 11:40:42PM +0000, Barnabás Pőcze wrote:\n> > > 2024. május 3., péntek 1:13 keltezéssel, Laurent Pinchart írta:\n> > > > On Tue, Apr 30, 2024 at 07:26:21PM +0000, Barnabás Pőcze wrote:\n> > > > > C++20 deprecated implicit capture of `this` via `[=]`.\n> > > > > Fix that by explicitly capturing the necessary variables.\n> > > > >\n> > > > > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> > > >\n> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > >\n> > > > It would be nice if there was a way to enable this warning even with\n> > > > C++17, but it's covered by -Wdeprecated :-S\n> > >\n> > > In the CI one could do builds with `meson setup ... -D cpp_std=c++20`.\n> >\n> > That's a good idea.\n> \n> The result is surprising:\n> \n> https://gitlab.freedesktop.org/pinchartl/libcamera/-/jobs/58304138\n> \n> I don't think I'll have time to investigate this very soon.\n\nI have run into this as well, but it has \"disappeared\" after some time. Now I have\ntaken a closer look. The issue appears to be that the \"span\" test creating a test executable\nnamed `span` in the `test` directory coupled with the `-I<build dir>/test` argument\nadded by meson leads to the executable being included.\n\n  $ g++ -Isubprojects/libcamera/test/camera-sensor.p -Isubprojects/libcamera/test [...] -c ../subprojects/libcamera/test/camera-sensor.cpp\n  In file included from /usr/include/c++/13.2.1/format:44,\n                   from /usr/include/c++/13.2.1/bits/chrono_io.h:39,\n                   from /usr/include/c++/13.2.1/chrono:3370,\n                   from ../subprojects/libcamera/include/libcamera/base/utils.h:11,\n                   from ../subprojects/libcamera/test/camera-sensor.cpp:13:\n  subprojects/libcamera/test/span:1:1: error: stray ‘\\177’ in program\n      1 | <U+007F>ELF [...]\n\n> [...]\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 AC558BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 May 2024 17:25:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4BD4163418;\n\tFri,  3 May 2024 19:25:23 +0200 (CEST)","from mail-40133.protonmail.ch (mail-40133.protonmail.ch\n\t[185.70.40.133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7CFD361A8A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 19:25:21 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"CuZvYwng\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1714757120; x=1715016320;\n\tbh=y4ELUzphjFMdB1KS+6InGq16I92IjMim9uuvz81NfFE=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=CuZvYwngmuCW9wUb8y8uUZ5/sGNMvmXXyEvUTYYbrkuetCmCnUfvwgWaLcSvduRDw\n\tkcb3ZKuip2P979EIjVUesXkAxRc2uRi8JP1jIveQwKK3mW+tZaHXwGPqkZgGzHEKwQ\n\tZwzA+hHGlSu4pFVe7sbgc7ABFUGQO6QDelWuR90VupPxau9YN6Mre1LCN452sPxK3v\n\tv/gjOEdAgl+FSJg5CVGAA4tU+IiE7fC9CPGeX4jjZNmOqHN6r6Waw0ge/bMDm7SFhw\n\tQOUJlqiXoP/G/rJ9TkLvQwv9dmZs1PT9qcNTUHs4vnoGblVrhhwlArPmeHjGx9hCjr\n\tPsZlxJ1OHBCNQ==","Date":"Fri, 03 May 2024 17:25:17 +0000","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Message-ID":"<qiE7B4008q4aQT5Lt7mQfzGURjfgHEWbj-wbDeYVIfgbT0JigZh4Uz-yucArEJW4u0vjUgyuC_UluFcMYDsvRA8RHf9GPvaiiG9p3BQvjyM=@protonmail.com>","In-Reply-To":"<20240503031252.GB23175@pendragon.ideasonboard.com>","References":"<20240430192620.779489-1-pobrn@protonmail.com>\n\t<20240502231341.GG4959@pendragon.ideasonboard.com>\n\t<pE2O6sCBRetaznEH0wHh72PkLLhubhVo_988i3J4QlLi0LGrP3pGMMfZ-bz9QwX3gmWPlOwGA433FfQ138DywIgUNapVJcTQwixCIhm4r0k=@protonmail.com>\n\t<20240502235845.GI4959@pendragon.ideasonboard.com>\n\t<20240503031252.GB23175@pendragon.ideasonboard.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"9be986b55d5a6a864fd47e8ebc09e1c77ddcd904","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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":29421,"web_url":"https://patchwork.libcamera.org/comment/29421/","msgid":"<20240503173946.GA9072@pendragon.ideasonboard.com>","date":"2024-05-03T17:39:46","subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, May 03, 2024 at 05:25:17PM +0000, Barnabás Pőcze wrote:\n> Hi\n> \n> \n> 2024. május 3., péntek 5:12 keltezéssel, Laurent Pinchart <laurent.pinchart@ideasonboard.com> írta:\n> \n> > On Fri, May 03, 2024 at 02:58:45AM +0300, Laurent Pinchart wrote:\n> > > On Thu, May 02, 2024 at 11:40:42PM +0000, Barnabás Pőcze wrote:\n> > > > 2024. május 3., péntek 1:13 keltezéssel, Laurent Pinchart írta:\n> > > > > On Tue, Apr 30, 2024 at 07:26:21PM +0000, Barnabás Pőcze wrote:\n> > > > > > C++20 deprecated implicit capture of `this` via `[=]`.\n> > > > > > Fix that by explicitly capturing the necessary variables.\n> > > > > >\n> > > > > > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> > > > >\n> > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > >\n> > > > > It would be nice if there was a way to enable this warning even with\n> > > > > C++17, but it's covered by -Wdeprecated :-S\n> > > >\n> > > > In the CI one could do builds with `meson setup ... -D cpp_std=c++20`.\n> > >\n> > > That's a good idea.\n> > \n> > The result is surprising:\n> > \n> > https://gitlab.freedesktop.org/pinchartl/libcamera/-/jobs/58304138\n> > \n> > I don't think I'll have time to investigate this very soon.\n> \n> I have run into this as well, but it has \"disappeared\" after some time. Now I have\n> taken a closer look. The issue appears to be that the \"span\" test creating a test executable\n> named `span` in the `test` directory coupled with the `-I<build dir>/test` argument\n> added by meson leads to the executable being included.\n\nAhhhhh... Thanks for investigating. This is the first time I find a real\ndrawback of the extension-less headers for C++ :-(\n\nI'll try to post a fix.\n\n>   $ g++ -Isubprojects/libcamera/test/camera-sensor.p -Isubprojects/libcamera/test [...] -c ../subprojects/libcamera/test/camera-sensor.cpp\n>   In file included from /usr/include/c++/13.2.1/format:44,\n>                    from /usr/include/c++/13.2.1/bits/chrono_io.h:39,\n>                    from /usr/include/c++/13.2.1/chrono:3370,\n>                    from ../subprojects/libcamera/include/libcamera/base/utils.h:11,\n>                    from ../subprojects/libcamera/test/camera-sensor.cpp:13:\n>   subprojects/libcamera/test/span:1:1: error: stray ‘\\177’ in program\n>       1 | <U+007F>ELF [...]\n> \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 5E1CEC3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 May 2024 17:39:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 88B9B6340B;\n\tFri,  3 May 2024 19:39:56 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 832DC61A8A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 May 2024 19:39:54 +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 ESMTPSA id E3ADA593;\n\tFri,  3 May 2024 19:38: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=\"t5Rk3s9A\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1714757936;\n\tbh=DWYLu+uvh5rTremXO6oqDPq+xQeYrrvFeyc+ViunyCQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=t5Rk3s9Av0V0GOTnsO9H+AwTSvzxFR99Op5Mu4NBBfsXFjrt4DeoKj/kQDhjgqMhF\n\tO5wTtextfyhX1TZN5U4axQNJqx72PtBgPLoVp4DeLajGYv8xQ36ere7hQRFcyTURvo\n\t8Fhp6Ijw0Z6szYdVewvG0pESC/wX1bgFBtve+Uqo=","Date":"Fri, 3 May 2024 20:39:46 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] apps: cam: Fix C++20 deprecation warning","Message-ID":"<20240503173946.GA9072@pendragon.ideasonboard.com>","References":"<20240430192620.779489-1-pobrn@protonmail.com>\n\t<20240502231341.GG4959@pendragon.ideasonboard.com>\n\t<pE2O6sCBRetaznEH0wHh72PkLLhubhVo_988i3J4QlLi0LGrP3pGMMfZ-bz9QwX3gmWPlOwGA433FfQ138DywIgUNapVJcTQwixCIhm4r0k=@protonmail.com>\n\t<20240502235845.GI4959@pendragon.ideasonboard.com>\n\t<20240503031252.GB23175@pendragon.ideasonboard.com>\n\t<qiE7B4008q4aQT5Lt7mQfzGURjfgHEWbj-wbDeYVIfgbT0JigZh4Uz-yucArEJW4u0vjUgyuC_UluFcMYDsvRA8RHf9GPvaiiG9p3BQvjyM=@protonmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<qiE7B4008q4aQT5Lt7mQfzGURjfgHEWbj-wbDeYVIfgbT0JigZh4Uz-yucArEJW4u0vjUgyuC_UluFcMYDsvRA8RHf9GPvaiiG9p3BQvjyM=@protonmail.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>"}}]