From: Wolfgang Bangerth Date: Wed, 29 Nov 2023 20:31:44 +0000 (-0700) Subject: Emplace, not assign, the object in Lazy. X-Git-Tag: relicensing~270^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2e6c7f5cf015e384ee5a8ea271a719ffc5a58d2;p=dealii.git Emplace, not assign, the object in Lazy. --- 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"