30 lines
1.2 KiB
Markdown
30 lines
1.2 KiB
Markdown
[concept.default.init]
|
||
|
||
# 18 Concepts library [[concepts]](./#concepts)
|
||
|
||
## 18.4 Language-related concepts [[concepts.lang]](concepts.lang#concept.default.init)
|
||
|
||
### 18.4.12 Concept default_initializable [concept.default.init]
|
||
|
||
[ð](#concept:default_initializable)
|
||
|
||
`template<class T>
|
||
constexpr bool is-default-initializable = see below; // exposition only
|
||
|
||
template<class T>
|
||
concept [default_initializable](#concept:default_initializable "18.4.12 Concept default_initializable [concept.default.init]") = [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<T> &&
|
||
requires { T{}; } &&
|
||
is-default-initializable<T>;
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L780)
|
||
|
||
For a type T, *is-default-initializable*<T> is true if and only if the variable definitionT t; is well-formed for some invented variable t;
|
||
otherwise it is false[.](#1.sentence-1)
|
||
|
||
Access checking is performed as if in a context unrelated to T[.](#1.sentence-2)
|
||
|
||
Only the validity of the immediate context of the variable initialization is considered[.](#1.sentence-3)
|