forked from boostorg/type_traits
Add docs for undocumented has_nothrow_destructor trait.
This commit is contained in:
29
doc/has_nothrow_destruct.qbk
Normal file
29
doc/has_nothrow_destruct.qbk
Normal file
@ -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 <class T>
|
||||
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 <boost/type_traits/has_nothrow_copy.hpp>` or ` #include <boost/type_traits.hpp>`
|
||||
|
||||
[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]
|
||||
|
@ -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]
|
||||
|
@ -126,6 +126,9 @@ The following templates describe the general properties of a type.
|
||||
template <class T>
|
||||
struct __has_nothrow_copy_constructor;
|
||||
|
||||
template <class T>
|
||||
struct __has_nothrow_destructor;
|
||||
|
||||
template <class T>
|
||||
struct __has_trivial_assign;
|
||||
|
||||
|
Reference in New Issue
Block a user