Init
This commit is contained in:
28
cppdraft/optional/nullopt.md
Normal file
28
cppdraft/optional/nullopt.md
Normal file
@@ -0,0 +1,28 @@
|
||||
[optional.nullopt]
|
||||
|
||||
# 22 General utilities library [[utilities]](./#utilities)
|
||||
|
||||
## 22.5 Optional objects [[optional]](optional#nullopt)
|
||||
|
||||
### 22.5.5 No-value state indicator [optional.nullopt]
|
||||
|
||||
[ð](#lib:nullopt_t)
|
||||
|
||||
`struct nullopt_t{see below};
|
||||
inline constexpr nullopt_t nullopt(unspecified);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L4998)
|
||||
|
||||
The struct nullopt_t is an empty class type used as a unique type to indicate the state of not containing a value for optional objects[.](#1.sentence-1)
|
||||
|
||||
In particular, optional<T> has a constructor with nullopt_t as a single argument;
|
||||
this indicates that an optional object not containing a value shall be constructed[.](#1.sentence-2)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L5003)
|
||||
|
||||
Type nullopt_t shall not have a default constructor or an initializer-list constructor, and shall not be an aggregate[.](#2.sentence-1)
|
||||
Reference in New Issue
Block a user