| Home | Libraries | People | FAQ | More

### is_nothrow_move_constructible

    template <class T>
    struct is_nothrow_move_constructible : public true_type-or-false_type {};

Inherits: If T is a (possibly cv-qualified) type with a non-throwing move-constructor or a type without move-constructor but with non-throwing copy-constructor, then inherits from true_type, otherwise inherits from false_type. Type `T` must be a complete type.

In other words, inherits from true_type only if expression `T(std::move(variable1))` won't throw (`variable1` is a variable of type `T`).

Compiler Compatibility: Without some (C++11 noexcept shall work correctly) help from the compiler, `is_nothrow_move_constructible` will never report that a class or struct has a non-throwing copy-constructor; this is always safe, if possibly sub-optimal. Currently (February 2013) MSVC-12.0, Clang and GCC 4.7 have the necessary compiler support to ensure that this trait "just works".

Header: `#include <boost/type_traits/is_nothrow_move_constructible.hpp>` or `#include <boost/type_traits.hpp>`