important bugfix for TCP server #618

Merged
gaisser merged 5 commits from mueller/tcp-server-bugfix into development 2022-05-09 16:59:55 +02:00
1 changed files with 2 additions and 3 deletions
Showing only changes of commit 3448292e8a - Show all commits

View File

@ -2,6 +2,7 @@
#define FIXEDARRAYLIST_H_
#include <cmath>
#include <limits>
#include "ArrayList.h"
/**
@ -9,10 +10,8 @@
*/
template <typename T, size_t MAX_SIZE, typename count_t = uint8_t>
class FixedArrayList : public ArrayList<T, count_t> {
#if !defined(_MSC_VER) && !defined(__clang__)
static_assert(MAX_SIZE <= (std::pow(2, sizeof(count_t) * 8) - 1),
static_assert(MAX_SIZE <= std::numeric_limits<count_t>::max(),
"count_t is not large enough to hold MAX_SIZE");
#endif
private:
T data[MAX_SIZE];