From 2ec25017a62d1c910445f4d813853e2e134ef43c Mon Sep 17 00:00:00 2001 From: Max Kahnt <max.kahnt@fu-berlin.de> Date: Fri, 1 Mar 2019 14:07:25 +0100 Subject: [PATCH] Properly forward constructor to CopyOrReference members. --- .../functionals/boxconstrainedquadraticfunctional.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dune/tnnmg/functionals/boxconstrainedquadraticfunctional.hh b/dune/tnnmg/functionals/boxconstrainedquadraticfunctional.hh index ea7d857..8bed37d 100644 --- a/dune/tnnmg/functionals/boxconstrainedquadraticfunctional.hh +++ b/dune/tnnmg/functionals/boxconstrainedquadraticfunctional.hh @@ -254,10 +254,11 @@ public: using LowerObstacle = std::decay_t<L>; using UpperObstacle = std::decay_t<U>; - BoxConstrainedQuadraticFunctional(const Matrix& matrix, const Vector& linearPart, const LowerObstacle& lower, const UpperObstacle& upper) : - Base(matrix, linearPart), - lower_(lower), - upper_(upper) + template <class MM, class VV, class LL, class UU> + BoxConstrainedQuadraticFunctional(MM&& matrix, VV&& linearPart, LL&& lower, UU&& upper) : + Base(std::forward<MM>(matrix), std::forward<VV>(linearPart)), + lower_(std::forward<LL>(lower)), + upper_(std::forward<UU>(upper)) {} Range operator()(const Vector& v) const -- GitLab