Namespaces
Variants
Views
Actions

cpp/named req/Destructible

From cppreference.com
< cpp‎ | named req
Revision as of 12:10, 28 December 2013 by Cubbi (Talk | contribs)

Template:cpp/concept/title Template:cpp/concept/navbar

Specifies that an instance of the type can be destructed.

Requirements

The type T satisfies Destructible if

Given

  • u, a expression of type T

The following expressions must be valid and have their specified effects

Expression Post-conditions
u.~T() All resources owned by u are reclaimed, no exceptions are thrown.

Notes

Destructors are called implicitly at the end of object lifetime such as when leaving scope or by the delete-expression. Explicit destructor call as shown in the type requirement table is rare.

See also

checks if a type has a non-deleted destructor
(class template) [edit]