mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-24 09:12:30 +02:00
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:
committed by
Simon Giesecke
parent
86d7de38ca
commit
f60f909899
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user