...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 is_nothrow_swappable : public true_type-or-false_type
{};
Inherits: If the expression swap(declval<T&>(),
declval<T&>())
(in a context where std::swap
is visible) is valid and non-throwing,
inherits from true_type,
otherwise from false_type.
Compiler Compatibility: This trait requires C++11 for full support. Without C++11 it will inherit from true_type for scalar types (including integral, floating point, enumeration, pointer and pointer-to-member types), and from false_type for anything else.
Header: #include
<boost/type_traits/is_nothrow_swappable.hpp>
or #include <boost/type_traits.hpp>