...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
template <class T>
struct has_nothrow_assign : public true_type-or-false_type
{};
Inherits: If T is a (possibly cv-qualified)
type with a non-throwing assignment-operator 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. Currently (June 2015) compilers more recent than Visual C++
8, GCC-4.3, Greenhills 6.0, Intel-11.0, and Codegear and all recent GCC versions
have the necessary compiler intrinsics
to ensure that this trait "just works". You may test to see if
the necessary support is available by checking to see if defined(BOOST_HAS_NOTHROW_CONSTRUCTOR) || (!defined(BOOST_NO_CXX11_DECLTYPE)
&& !defined(BOOST_NO_CXX11_NOEXCEPT))
is true.
Header: #include
<boost/type_traits/has_nothrow_assign.hpp>
or #include <boost/type_traits.hpp>