From patchwork Fri Oct 11 14:30:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2160 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EF80161565 for ; Fri, 11 Oct 2019 16:30:32 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7549633A; Fri, 11 Oct 2019 16:30:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1570804232; bh=A8KtOtdvAMM2xe7lHocUTMPauTMfZUIrbIQkSV9lwpE=; h=From:To:Cc:Subject:Date:From; b=DS4sUBAZZuPLf2P2iau8IJU4Qp02GO80Cuj8PDakI4YVMx9h7j5/7iP2k5IAtMuTu m3Z6694yJNvm+yzOXotxh8AZk0w26/FRcZWCnmJe798TYHMaopCyTmcjDZeH1/VcFb GSZrzdGhe9kL/MSKqdxwt2ZbxAc6fnsKbO2ZMFuo= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Oct 2019 17:30:27 +0300 Message-Id: <20191011143027.23310-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libamera: pipeline: rkisp1: timeline: Fix compilation with gcc-[56] 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: , X-List-Received-Date: Fri, 11 Oct 2019 14:30:33 -0000 With gcc 5 and 6, insertion in a std::multimap copies the pair passed as an argument to the insert() method. As the mapped type is a non-copyable std::unique_ptr<>, this fails to compile. Compilation with newer gcc versions succeed due to support for C++-17 and the fix described in https://cplusplus.github.io/LWG/issue2354. To support gcc 5 and 6, fix the issue by using std::multimap::emplace(). Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/rkisp1/timeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp index b98a16689fa9..f6c6434d7b53 100644 --- a/src/libcamera/pipeline/rkisp1/timeline.cpp +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp @@ -123,7 +123,7 @@ void Timeline::scheduleAction(std::unique_ptr action) << ", run now " << utils::time_point_to_string(now); action->run(); } else { - actions_.insert({ deadline, std::move(action) }); + actions_.emplace(deadline, std::move(action)); updateDeadline(); } }