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

34 lines
1.4 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.destructible]
# 18 Concepts library [[concepts]](./#concepts)
## 18.4 Language-related concepts [[concepts.lang]](concepts.lang#concept.destructible)
### 18.4.10 Concept destructible [concept.destructible]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L737)
The [destructible](#concept:destructible "18.4.10Concept destructible[concept.destructible]") concept specifies properties of all types,
instances of which can be destroyed at the end of their lifetime, or reference
types[.](#1.sentence-1)
[🔗](#concept:destructible)
`template<class T>
concept [destructible](#concept:destructible "18.4.10Concept destructible[concept.destructible]") = [is_nothrow_destructible_v](meta.type.synop#lib:is_nothrow_destructible_v "21.3.3Header <type_­traits> synopsis[meta.type.synop]")<T>;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L748)
[*Note [1](#note-1)*:
Unlike the [*Cpp17Destructible*](utility.arg.requirements#:Cpp17Destructible "16.4.4.2Template argument requirements[utility.arg.requirements]") requirements (Table [35](utility.arg.requirements#tab:cpp17.destructible "Table 35: Cpp17Destructible requirements")), this
concept forbids destructors that are potentially throwing, even if a particular
invocation of the destructor does not actually throw[.](#2.sentence-1)
— *end note*]