diff --git a/doc/has_nothrow_destruct.qbk b/doc/has_nothrow_destruct.qbk new file mode 100644 index 0000000..3d865c1 --- /dev/null +++ b/doc/has_nothrow_destruct.qbk @@ -0,0 +1,29 @@ +[/ + Copyright 2015 John Maddock. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] + +[section:has_nothrow_destruct has_nothrow_destructor] + + template + struct has_nothrow_destructor : public __tof {}; + +__inherit 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. + +__compat 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 ` or ` #include ` + +[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. +] + +[endsect] + diff --git a/doc/type_traits.qbk b/doc/type_traits.qbk index 60613d1..3c3a28d 100644 --- a/doc/type_traits.qbk +++ b/doc/type_traits.qbk @@ -92,6 +92,7 @@ [def __has_nothrow_copy [link boost_typetraits.reference.has_nothrow_copy has_nothrow_copy]] [def __has_nothrow_default_constructor [link boost_typetraits.reference.has_nothrow_constructor has_nothrow_default_constructor]] [def __has_nothrow_copy_constructor [link boost_typetraits.reference.has_nothrow_copy has_nothrow_copy_constructor]] +[def __has_nothrow_destructor [link boost_typetraits.reference.has_nothrow_destruct has_nothrow_destructor]] [def __is_nothrow_move_constructible [link boost_typetraits.reference.is_nothrow_move_constructible is_nothrow_move_constructible]] [def __has_nothrow_assign [link boost_typetraits.reference.has_nothrow_assign has_nothrow_assign]] [def __is_nothrow_move_assignable [link boost_typetraits.reference.is_nothrow_move_assignable is_nothrow_move_assignable]] @@ -231,6 +232,7 @@ that is the result of the transformation. [include has_nothrow_assign.qbk] [include has_nothrow_constructor.qbk] [include has_nothrow_copy.qbk] +[include has_nothrow_destruct.qbk] [section:has_nothrow_cp_cons has_nothrow_copy_constructor] See __has_nothrow_copy. [endsect] diff --git a/doc/value_traits.qbk b/doc/value_traits.qbk index e3b6c85..c782cdd 100644 --- a/doc/value_traits.qbk +++ b/doc/value_traits.qbk @@ -126,6 +126,9 @@ The following templates describe the general properties of a type. template struct __has_nothrow_copy_constructor; + template + struct __has_nothrow_destructor; + template struct __has_trivial_assign;