Files
2025-10-25 03:02:53 +03:00

30 lines
1.2 KiB
Markdown
Raw Permalink 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.

[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.12Concept default_­initializable[concept.default.init]") = [constructible_from](concept.constructible#concept:constructible_from "18.4.11Concept 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)