From 21c533cfcea20179fa0874b8e09e04de54471b6d Mon Sep 17 00:00:00 2001 From: pleroy Date: Sat, 6 Jan 2024 10:54:13 +0100 Subject: [PATCH] Fix a dangling reference. --- numerics/matrix_computations_body.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/numerics/matrix_computations_body.hpp b/numerics/matrix_computations_body.hpp index 1a4fb0e009..da7ffcc1cc 100644 --- a/numerics/matrix_computations_body.hpp +++ b/numerics/matrix_computations_body.hpp @@ -259,7 +259,8 @@ void Premultiply(HouseholderReflection const& P, Matrix& A) { // A becomes A P. template void PostMultiply(Matrix& A, HouseholderReflection const& P) { - auto const βᵗv = TransposedView{P.β * P.v}; // NOLINT + auto const βv = P.β * P.v; + auto const βᵗv = TransposedView{βv}; // NOLINT auto const Av = A * P.v; A -= Av * βᵗv; }