Files
cppdraft_translate/cppdraft/optional/general.md
2025-10-25 03:02:53 +03:00

26 lines
934 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[optional.general]
# 22 General utilities library [[utilities]](./#utilities)
## 22.5 Optional objects [[optional]](optional#general)
### 22.5.1 General [optional.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L3169)
Subclause [[optional]](optional "22.5Optional objects") describes class template optional that represents
optional objects[.](#1.sentence-1)
An [*optional object*](#def:optional_object "22.5.1General[optional.general]") is an
object that contains the storage for another object and manages the lifetime of
this contained object, if any[.](#1.sentence-2)
The contained object may be initialized after
the optional object has been initialized, and may be destroyed before the
optional object has been destroyed[.](#1.sentence-3)
The initialization state of the contained
object is tracked by the optional object[.](#1.sentence-4)