Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit f5c5562f6c.
PrevUpHomeNext

has_nothrow_destructor

template <class T>
struct has_nothrow_destructor : public true_type-or-false_type {};

Inherits: If T is a (possibly cv-qualified) type with a non-throwing destructor then inherits from true_type, otherwise inherits from false_type. Type T must be a complete type.

Compiler Compatibility: Either requires C++11 noexcept and decltype or else some (unspecified) help from the compiler. You may test to see if the necessary support is available by checking to see if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_NOEXCEPT) is true.

Header: #include <boost/type_traits/has_nothrow_copy.hpp> or #include <boost/type_traits.hpp>

[Note] Note

Note that destructors are assumed to be non-throwing unless they are explicitly marked otherwise with a throw(something) specification. This is in line with the C++11 standard.


PrevUpHomeNext