has_nothrow_destruct.qbk 1.1 KB

1234567891011121314151617181920212223242526272829
  1. [/
  2. Copyright 2015 John Maddock.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:has_nothrow_destruct has_nothrow_destructor]
  8. template <class T>
  9. struct has_nothrow_destructor : public __tof {};
  10. __inherit If T is a (possibly cv-qualified) type with a non-throwing destructor
  11. then inherits from __true_type, otherwise inherits from __false_type. Type `T`
  12. must be a complete type.
  13. __compat Either requires C++11 `noexcept` and `decltype` or else some (unspecified) help from the compiler.
  14. You may test to see if the necessary support is available
  15. by checking to see if `!defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_NOEXCEPT)` is true.
  16. __header ` #include <boost/type_traits/has_nothrow_copy.hpp>` or ` #include <boost/type_traits.hpp>`
  17. [note
  18. Note that destructors are assumed to be non-throwing unless they are explicitly marked otherwise with a `throw(something)` specification.
  19. This is in line with the C++11 standard.
  20. ]
  21. [endsect]