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=refs%2Fpull%2F16306%2Fhead;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())); //