2 Copyright 2007 John Maddock.
3 Copyright 2013 Antony Polukhin.
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt).
9 [section:has_trivial_move_assign has_trivial_move_assign]
11 struct has_trivial_move_assign : public __tof {};
13 __inherit If T is a (possibly cv-qualified) type with a trivial move assignment-operator
14 then inherits from __true_type, otherwise inherits from __false_type.
16 If a type has a trivial move assignment-operator then the operator has the same effect
17 as copying the bits of one object to the other:
18 calls to the operator can be safely replaced with a call to `memcpy`.
20 __compat If the compiler does not support partial-specialization of class
21 templates, then this template can not be used with function types.
23 Without some (as yet unspecified) help from the compiler,
24 has_trivial_move_assign will never report that a user-defined class or struct has a
25 trivial constructor; this is always safe, if possibly sub-optimal.
26 Currently (February 2013) compilers have no necessary __intrinsics to ensure that this
27 trait "just works". You may also test to see if the necessary __intrinsics are available
28 by checking to see if the macro `BOOST_HAS_TRIVIAL_MOVE_ASSIGN` is defined.
31 __header ` #include <boost/type_traits/has_trivial_move_assign.hpp>` or ` #include <boost/type_traits.hpp>`
35 [:`has_trivial_move_assign<int>` inherits from `__true_type`.]
37 [:`has_trivial_move_assign<char*>::type` is the type `__true_type`.]
39 [:`has_trivial_move_assign<int (*)(long)>::value` is an integral constant
40 expression that evaluates to /true/.]
42 [:`has_trivial_move_assign<MyClass>::value` is an integral constant
43 expression that evaluates to /false/.]
45 [:`has_trivial_move_assign<T>::value_type` is the type `bool`.]