NO_COPY_CLASS c++11

This commit is contained in:
2020-07-17 11:46:21 +03:00
parent 1a3096c48b
commit 33a6382f4d
8 changed files with 24 additions and 34 deletions

View File

@@ -96,9 +96,7 @@
#endif
#ifdef PIP_CXX11_SUPPORT
# include <functional>
#endif
#include <functional>
#include <cstddef>
#ifdef WINDOWS
@@ -220,8 +218,8 @@
#define PRIVATEWB __privateinitializer__.p
#define NO_COPY_CLASS(name) \
explicit name(const name & ); \
void operator =(const name & );
name(const name&) = delete; \
name& operator=(const name&) = delete;
#ifdef FREERTOS
# define PIP_MIN_MSLEEP 10.
@@ -255,15 +253,9 @@ typedef unsigned long long ullong;
typedef long long llong;
typedef long double ldouble;
#ifdef PIP_CXX11_SUPPORT
#define piMove(v) std::move(v)
#else
#define piMove(v) v
#endif
/*! \brief Templated function for swap two values
* \details Example:\n \snippet piincludes.cpp swap */
template<typename T> inline void piSwap(T & f, T & s) {T t(piMove(f)); f = piMove(s); s = piMove(t);}
template<typename T> inline void piSwap(T & f, T & s) {T t(std::move(f)); f = std::move(s); s = std::move(t);}
/*! \brief Templated function for swap two values without "="
* \details Example:\n \snippet piincludes.cpp swapBinary */