]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Emplace, not assign, the object in Lazy<T>.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 29 Nov 2023 20:31:44 +0000 (13:31 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 29 Nov 2023 20:31:44 +0000 (13:31 -0700)
include/deal.II/base/lazy.h

index 84975826a16d4388943ea271af10e13a7168a860..abee357210067b199e248889285a734dce856e20 100644 (file)
@@ -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"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.