1
0
forked from fsfw/fsfw

copy ctor and assgnment op forbidden

for serial linked lists
This commit is contained in:
2020-04-05 23:03:32 +02:00
parent 42838272a5
commit e791f44c41
3 changed files with 14 additions and 1 deletions

View File

@ -41,6 +41,16 @@
template<typename T, typename count_t = uint8_t>
class SerialLinkedListAdapter: public SinglyLinkedList<T>, public SerializeIF {
public:
/**
* Copying is forbidden by deleting the copy constructor and the copy
* assignment operator because of the pointers to the linked list members.
* Unless the child class implements an own copy constructor or
* copy assignment operator, these operation will throw a compiler error.
* @param
*/
SerialLinkedListAdapter(const SerialLinkedListAdapter &) = delete;
SerialLinkedListAdapter& operator=(const SerialLinkedListAdapter&) = delete;
SerialLinkedListAdapter(typename LinkedElement<T>::Iterator start,
bool printCount = false) :
SinglyLinkedList<T>(start), printCount(printCount) {

View File

@ -5,7 +5,10 @@
#include <cstddef>
#include <type_traits>
#ifndef ssize_t
typedef std::make_signed<std::size_t>::type ssize_t;
#endif
/**
* @defgroup serialize Serialization
* Contains serialisation services.