From: Wolfgang Bangerth Date: Wed, 29 Nov 2023 20:34:06 +0000 (-0700) Subject: Ensure that the std::optional in Lazy is not yet used. X-Git-Tag: relicensing~270^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0c5b8a89c1aa04f6474e6a1c0cc6396ce71dec0;p=dealii.git Ensure that the std::optional in Lazy is not yet used. --- 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())); //