Problem: missing use of C++11 = delete and = default

Solution: introduce macros ZMQ_DEFAULT and ZMQ_NON_COPYABLE_NOR_MOVABLE
This commit is contained in:
Simon Giesecke
2019-12-08 19:22:04 +01:00
committed by Simon Giesecke
parent 86d7de38ca
commit f60f909899
99 changed files with 178 additions and 269 deletions

View File

@@ -33,6 +33,7 @@
#include <stdlib.h>
#include <vector>
#include "macros.hpp"
#include "stdint.hpp"
#include "platform.hpp"
#include "err.hpp"
@@ -62,11 +63,10 @@ template <typename T, size_t S> class fast_vector_t
}
private:
fast_vector_t (const fast_vector_t &);
fast_vector_t &operator= (const fast_vector_t &);
T _static_buf[S];
T *_buf;
ZMQ_NON_COPYABLE_NOR_MOVABLE (fast_vector_t)
};
template <typename T, size_t S> class resizable_fast_vector_t
@@ -96,11 +96,10 @@ template <typename T, size_t S> class resizable_fast_vector_t
~resizable_fast_vector_t () { delete _dynamic_buf; }
private:
resizable_fast_vector_t (const resizable_fast_vector_t &);
resizable_fast_vector_t &operator= (const resizable_fast_vector_t &);
T _static_buf[S];
std::vector<T> *_dynamic_buf;
ZMQ_NON_COPYABLE_NOR_MOVABLE (resizable_fast_vector_t)
};
#if defined ZMQ_POLL_BASED_ON_POLL