19 #define BOOST_TEST_MODULE ( UncopiableAndUnmovableClass_test )
25 #include <boost/test/unit_test.hpp>
28 #include <type_traits>
33 static_assert( std::is_copy_constructible_v<lar::PolymorphicClass>);
34 static_assert( std::is_copy_assignable_v <lar::PolymorphicClass>);
35 static_assert( std::is_move_constructible_v<lar::PolymorphicClass>);
36 static_assert( std::is_move_assignable_v <lar::PolymorphicClass>);
38 static_assert(!std::is_copy_constructible_v<lar::PolymorphicUncopiableClass>);
39 static_assert(!std::is_copy_assignable_v <lar::PolymorphicUncopiableClass>);
40 static_assert( std::is_move_constructible_v<lar::PolymorphicUncopiableClass>);
41 static_assert( std::is_move_assignable_v <lar::PolymorphicUncopiableClass>);
43 static_assert( std::is_copy_constructible_v<lar::PolymorphicUnmovableClass>);
44 static_assert( std::is_copy_assignable_v <lar::PolymorphicUnmovableClass>);
45 static_assert(!std::is_move_constructible_v<lar::PolymorphicUnmovableClass>);
46 static_assert(!std::is_move_assignable_v <lar::PolymorphicUnmovableClass>);
48 static_assert(!std::is_copy_constructible_v<lar::PolymorphicUncopiableAndUnmovableClass>);
49 static_assert(!std::is_copy_assignable_v <lar::PolymorphicUncopiableAndUnmovableClass>);
50 static_assert(!std::is_move_constructible_v<lar::PolymorphicUncopiableAndUnmovableClass>);
51 static_assert(!std::is_move_assignable_v <lar::PolymorphicUncopiableAndUnmovableClass>);
80 MovableDerived(MovableDerived&&):
93 AssignableDerived&
operator=(AssignableDerived
const&) {
return *
this; }
94 AssignableDerived&
operator=(AssignableDerived&&) {
return *
this; }
An empty class that can't be copied nor moved.
Defines classes that can't be copied nor moved.
UncopiableClass & operator=(UncopiableClass const &)=delete