From f2e6c7f5cf015e384ee5a8ea271a719ffc5a58d2 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 29 Nov 2023 13:31:44 -0700 Subject: [PATCH] Emplace, not assign, the object in Lazy. --- include/deal.II/base/lazy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/deal.II/base/lazy.h b/include/deal.II/base/lazy.h index 84975826a1..abee357210 100644 --- a/include/deal.II/base/lazy.h +++ b/include/deal.II/base/lazy.h @@ -379,7 +379,7 @@ inline DEAL_II_ALWAYS_INLINE // if (!object_is_initialized.load(std::memory_order_relaxed)) { - object = std::move(creator()); + object.emplace(std::move(creator())); // // Flip the object_is_initialized boolean with "release" -- 2.39.5