diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index 2458b75..80d5626 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -38,6 +38,9 @@ for all types (but all have safe fallback positions if this support is unavailable):
- Should evaluate to the alignment requirements of type T. + Should evaluate to the alignment requirements of type T +
++ BOOST_IS_FINAL(T) +
++ Should evaluate to true if T is a class type declared with the final + specifier
![]() |
+Home | +Libraries | +People | +FAQ | +More | +
template <class T>
+struct is_copy_assignable : public true_type-or-false_type
{};
+
+
+ Inherits: If T
+ is CopyAssignable
(i.e. has
+ an accessible explicit or implicit copy assignment operator), 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 copy assignment of T
+ from const T
+ &
is not marked with = delete
,
+ T
does not derives from
+ boost::noncopyable
and is not marked with BOOST_MOVABLE_BUT_NOT_COPYABLE(T)
.
+
+ Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used. +
+
+ If your compiler does not support C++11 deleted functions (= delete
)
+ or does not support SFINAE for the deleted assignments, then derive your
+ classes from boost::noncopyable
or mark them with BOOST_MOVABLE_BUT_NOT_COPYABLE(T)
to show
+ that class is non-assignable.
+
+ Trait does not care about access modifiers, so if you see errors like this: +
+'T::operator=(const T&)' is private +boost/type_traits/is_copy_assignable.hpp:68:5: error: within this context ++
+ then you are trying to call that macro for a structure with private assignment: +
+struct T { + // ... +private: + T &operator=(const T &); + // ... +}; ++
+ To fix that you must modify your structure, explicitly marking it as noncopyable
+ (= delete
,
+ boost::noncopyable
or BOOST_MOVABLE_BUT_NOT_COPYABLE(T)
)
+ or explicitly specializing
+ the trait.
+
+ Header: #include
+ <boost/type_traits/is_copy_assignable.hpp>
+ or #include <boost/type_traits.hpp>
+
+ | + |