From d0c5b8a89c1aa04f6474e6a1c0cc6396ce71dec0 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 29 Nov 2023 13:34:06 -0700 Subject: [PATCH] Ensure that the std::optional in Lazy is not yet used. --- include/deal.II/base/lazy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/deal.II/base/lazy.h b/include/deal.II/base/lazy.h index abee357210..3e8715916d 100644 --- a/include/deal.II/base/lazy.h +++ b/include/deal.II/base/lazy.h @@ -379,6 +379,7 @@ inline DEAL_II_ALWAYS_INLINE // if (!object_is_initialized.load(std::memory_order_relaxed)) { + Assert(object.has_value() == false, ExcInternalError()); object.emplace(std::move(creator())); // -- 2.39.5