285 mutable
std::optional<T>
object;
311 std::is_move_assignable_v<T>))
319 std::is_move_assignable_v<T>))
321 :
object(other.
object)
329 std::is_move_assignable_v<T>))
331 :
object(
std::move(other.
object))
340 other.object_is_initialized.store(
false);
341 other.object.reset();
347 std::is_move_assignable_v<T>))
350 object = other.object;
358 std::is_move_assignable_v<T>))
361 object = std::move(other.object);
369 other.object_is_initialized.store(
false);
370 other.object.reset();
378 std::is_move_assignable_v<T>))
388 std::is_move_assignable_v<T>))
389template <
typename Callable>
413#ifdef DEAL_II_HAVE_CXX20
430 object.emplace(std::move(creator()));
446 "The internal std::optional<T> object does not contain a valid object "
447 "even though we have just initialized it."));
453 std::is_move_assignable_v<T>))
468 std::is_move_assignable_v<T>))
474 "value() has been called but the contained object has not been "
475 "initialized. Did you forget to call 'ensure_initialized()' first?"));
477 return object.value();
483 std::is_move_assignable_v<T>))
489 "value() has been called but the contained object has not been "
490 "initialized. Did you forget to call 'ensure_initialized()' first?"));
492 return object.value();
498 std::is_move_assignable_v<T>))
499template <
typename Callable>
501 const Callable &creator)
const
505 return object.value();
511 std::is_move_assignable_v<T>))
512template <
typename Callable>
514 const Callable &creator)
518 return object.value();
524 std::is_move_assignable_v<T>))
528 sizeof(*this) -
sizeof(
object);