From patchwork Sat Aug 22 20:00:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9366 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id BA9AABD87C for ; Sat, 22 Aug 2020 20:01:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EC93C6271B; Sat, 22 Aug 2020 22:01:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="uL5ydCAh"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AB2CD61EA0 for ; Sat, 22 Aug 2020 22:01:00 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 42E3129E for ; Sat, 22 Aug 2020 22:01:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1598126460; bh=pPHFjf9g/tIc8T1RrucFUbCDGHoXsWg6mnGp6CXiBTA=; h=From:To:Subject:Date:From; b=uL5ydCAh11J0gGeSwRKX0SzbjEX3pHgzRLoc323XZz965kGDmOQQWM/+kL/3rmtk4 8BiLi2Vw1/g/LMW3/G3BM2ZxWD9Jh55M9gVYcLpfjIfSev6xBSk3+nv+IkNHBfhe7A Zc6QcVZXB0qGA7Oq/OcZP2MPwkAkqXdZaQDVXZpU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 22 Aug 2020 23:00:32 +0300 Message-Id: <20200822200037.20892-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/5] libcamera: Switch to C++17 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, In response to a popular request, this patch series moves libcamera from C++14 to C++17. This allows new features of the language (such as [[maybe_unused]]) and the standard library (such as std::clamp()). gcc 5 and gcc 6 can't be supported anymore, which isn't considered as an issue given that all major distributions that we're targetting ship a recent enough compiler. Patch 1/5 switches to C++17. If you're using an existing build directory, you will need to set the cpp_std option with meson configure -Dcpp_std=c++17 Patches 2/5 and 3/5 then update the code base to remove workarounds needed by C++14 and older compilers. Patch 4/5 is a new attempt to drop -Wno-unused-parameter, with the standard [[maybe_unused]] attribute this time instead of commenting out the parameter name to the function. Patch 5/5 extends the usage of [[maybe_unused]] to remove void casts. Laurent Pinchart (5): meson: Switch to C++17 libcamera: Replace utils::clamp() with std::clamp() libcamera: Drop explicit construction of std::queue meson: Remove -Wno-unused-parameter ipa: raspberrypi: Replace void cast with [[maybe_unused]] include/libcamera/bound_method.h | 2 +- include/libcamera/internal/utils.h | 7 ------ include/libcamera/signal.h | 2 +- include/libcamera/span.h | 4 ++-- meson.build | 3 +-- src/android/camera3_hal.cpp | 11 +++++---- src/android/camera_device.cpp | 5 ++-- src/android/camera_ops.cpp | 5 ++-- src/cam/main.cpp | 2 +- src/gstreamer/gstlibcamerapool.cpp | 2 +- src/gstreamer/gstlibcameraprovider.cpp | 2 +- src/gstreamer/gstlibcamerasrc.cpp | 7 ++++-- src/ipa/raspberrypi/controller/algorithm.cpp | 16 +++++-------- src/ipa/raspberrypi/controller/rpi/agc.cpp | 3 ++- src/ipa/raspberrypi/controller/rpi/alsc.cpp | 8 +++---- .../raspberrypi/controller/rpi/contrast.cpp | 4 ++-- src/ipa/raspberrypi/controller/rpi/noise.cpp | 5 ++-- .../raspberrypi/controller/rpi/sharpen.cpp | 5 ++-- src/ipa/raspberrypi/raspberrypi.cpp | 2 +- src/ipa/rkisp1/rkisp1.cpp | 24 ++++++++++--------- src/ipa/vimc/vimc.cpp | 16 ++++++------- src/libcamera/device_enumerator_udev.cpp | 2 +- src/libcamera/ipc_unixsocket.cpp | 2 +- src/libcamera/pipeline/ipu3/cio2.cpp | 4 +--- src/libcamera/pipeline/ipu3/imgu.cpp | 3 ++- src/libcamera/pipeline/ipu3/ipu3.cpp | 12 +++++----- .../pipeline/raspberrypi/raspberrypi.cpp | 10 ++++---- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- src/libcamera/pipeline/rkisp1/timeline.cpp | 2 +- src/libcamera/pipeline/vimc/vimc.cpp | 2 +- src/libcamera/process.cpp | 2 +- src/libcamera/proxy/ipa_proxy_linux.cpp | 23 ++++++++++-------- src/libcamera/utils.cpp | 8 ------- src/libcamera/v4l2_pixelformat.cpp | 2 +- src/libcamera/v4l2_videodevice.cpp | 4 ++-- src/qcam/dng_writer.cpp | 5 ++-- src/qcam/main.cpp | 2 +- src/v4l2/v4l2_camera.cpp | 2 +- test/camera/buffer_import.cpp | 3 ++- test/camera/capture.cpp | 3 ++- test/hotplug-cameras.cpp | 4 ++-- test/ipa/ipa_wrappers_test.cpp | 4 ++-- test/libtest/test.h | 2 +- test/log/log_process.cpp | 3 ++- test/object-invoke.cpp | 2 +- test/process/process_test.cpp | 3 ++- test/timer-thread.cpp | 2 +- test/timer.cpp | 2 +- 48 files changed, 122 insertions(+), 128 deletions(-)