diff --git a/include/bx/error.h b/include/bx/error.h index eaa7eab..a44a3a8 100644 --- a/include/bx/error.h +++ b/include/bx/error.h @@ -38,7 +38,6 @@ namespace bx { BX_CLASS(Error , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -107,7 +106,6 @@ namespace bx BX_CLASS(ErrorScope , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: diff --git a/include/bx/macros.h b/include/bx/macros.h index 9f2be82..dab1ba7 100644 --- a/include/bx/macros.h +++ b/include/bx/macros.h @@ -197,16 +197,24 @@ # define BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC(_x) #endif // BX_COMPILER_ -/// +/// No default constructor. #define BX_CLASS_NO_DEFAULT_CTOR(_class) \ _class() = delete -#define BX_CLASS_NO_COPY(_class) \ +/// No copy constructor. +#define BX_CLASS_NO_COPY_CTOR(_class) \ _class(const _class& _rhs) = delete +/// No copy assignment operator. #define BX_CLASS_NO_COPY_ASSIGNMENT(_class) \ _class& operator=(const _class& _rhs) = delete +/// No copy construcor, and copy assignment operator. +#define BX_CLASS_NO_COPY(_class) \ + BX_CLASS_NO_COPY_CTOR(_class); \ + BX_CLASS_NO_COPY_ASSIGNMENT(_class) + +/// #define BX_CLASS_ALLOCATOR(_class) \ public: void* operator new(size_t _size); \ public: void operator delete(void* _ptr); \ diff --git a/include/bx/mpscqueue.h b/include/bx/mpscqueue.h index 857b56e..7bb083b 100644 --- a/include/bx/mpscqueue.h +++ b/include/bx/mpscqueue.h @@ -19,7 +19,6 @@ namespace bx BX_CLASS(MpScUnboundedQueueT , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -50,7 +49,6 @@ namespace bx BX_CLASS(MpScUnboundedBlockingQueue , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: diff --git a/include/bx/mutex.h b/include/bx/mutex.h index 0dd2994..4713b5d 100644 --- a/include/bx/mutex.h +++ b/include/bx/mutex.h @@ -15,7 +15,6 @@ namespace bx { BX_CLASS(Mutex , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -41,7 +40,6 @@ namespace bx BX_CLASS(MutexScope , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: diff --git a/include/bx/ringbuffer.h b/include/bx/ringbuffer.h index 739c6ef..84eefdd 100644 --- a/include/bx/ringbuffer.h +++ b/include/bx/ringbuffer.h @@ -18,7 +18,6 @@ namespace bx BX_CLASS(RingBufferControl , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -58,7 +57,6 @@ namespace bx BX_CLASS(SpScRingBufferControl , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -99,7 +97,6 @@ namespace bx BX_CLASS(ReadRingBufferT , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -142,7 +139,6 @@ namespace bx BX_CLASS(WriteRingBufferT , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: diff --git a/include/bx/semaphore.h b/include/bx/semaphore.h index 7a0db5c..7748bc8 100644 --- a/include/bx/semaphore.h +++ b/include/bx/semaphore.h @@ -15,7 +15,6 @@ namespace bx { BX_CLASS(Semaphore , NO_COPY - , NO_COPY_ASSIGNMENT ); public: diff --git a/include/bx/spscqueue.h b/include/bx/spscqueue.h index 64dd7c3..eaa8cd2 100644 --- a/include/bx/spscqueue.h +++ b/include/bx/spscqueue.h @@ -18,7 +18,6 @@ namespace bx BX_CLASS(SpScUnboundedQueue , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -60,7 +59,6 @@ namespace bx BX_CLASS(SpScUnboundedQueueT , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -90,7 +88,6 @@ namespace bx BX_CLASS(SpScBlockingUnboundedQueue , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: @@ -121,7 +118,6 @@ namespace bx BX_CLASS(SpScBlockingUnboundedQueueT , NO_DEFAULT_CTOR , NO_COPY - , NO_COPY_ASSIGNMENT ); public: diff --git a/include/bx/thread.h b/include/bx/thread.h index 231ca1c..25a1807 100644 --- a/include/bx/thread.h +++ b/include/bx/thread.h @@ -21,7 +21,6 @@ namespace bx { BX_CLASS(Thread , NO_COPY - , NO_COPY_ASSIGNMENT ); public: