has_nothrow_copy.qbk 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. [/
  2. Copyright 2007 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_copy has_nothrow_copy]
  8. template <class T>
  9. struct has_nothrow_copy : public __tof {};
  10. template <class T>
  11. struct has_nothrow_copy_constructor : public __tof {};
  12. __inherit If T is a (possibly cv-qualified) type with a non-throwing copy-constructor
  13. then inherits from __true_type, otherwise inherits from __false_type. Type `T`
  14. must be a complete type.
  15. These two traits are synonyms for each other.
  16. __compat Either requires C++11 `noexcept` and `decltype` or else some (unspecified) help from the compiler.
  17. Currently (June 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
  18. Intel-11.0, and Codegear and all recent GCC versions have the necessary compiler __intrinsics to ensure that this
  19. trait "just works". You may test to see if the necessary support is available
  20. by checking to see if `defined(BOOST_HAS_NOTHROW_COPY) || (!defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_NOEXCEPT))` is true.
  21. __header ` #include <boost/type_traits/has_nothrow_copy.hpp>` or ` #include <boost/type_traits.hpp>`
  22. [endsect]