This commit is contained in:
Бранимир Караџић
2022-10-01 08:29:31 -07:00
parent a6968476b3
commit 819a2bf6b0
10 changed files with 40 additions and 21 deletions

View File

@@ -38,7 +38,7 @@ namespace bx
{
BX_CLASS(Error
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -105,8 +105,9 @@ namespace bx
class ErrorScope
{
BX_CLASS(ErrorScope
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:

View File

@@ -15,6 +15,14 @@ namespace bx
template<typename Ty, size_t NumT>
char (&CountOfRequireArrayArgumentT(const Ty (&)[NumT]) )[NumT];
struct Ignore
{
template <typename Ty>
constexpr void operator=(Ty&&) const
{
}
};
template<bool B>
struct isEnabled
{
@@ -148,3 +156,5 @@ namespace bx
}
} // namespace bx
constexpr bx::Ignore _;

View File

@@ -199,13 +199,13 @@
///
#define BX_CLASS_NO_DEFAULT_CTOR(_class) \
private: _class()
_class() = delete
#define BX_CLASS_NO_COPY(_class) \
private: _class(const _class& _rhs)
_class(const _class& _rhs) = delete
#define BX_CLASS_NO_ASSIGNMENT(_class) \
private: _class& operator=(const _class& _rhs)
#define BX_CLASS_NO_COPY_ASSIGNMENT(_class) \
_class& operator=(const _class& _rhs) = delete
#define BX_CLASS_ALLOCATOR(_class) \
public: void* operator new(size_t _size); \

View File

@@ -17,8 +17,9 @@ namespace bx
class MpScUnboundedQueueT
{
BX_CLASS(MpScUnboundedQueueT
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -47,8 +48,9 @@ namespace bx
class MpScUnboundedBlockingQueue
{
BX_CLASS(MpScUnboundedBlockingQueue
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:

View File

@@ -15,7 +15,7 @@ namespace bx
{
BX_CLASS(Mutex
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -41,7 +41,7 @@ namespace bx
BX_CLASS(MutexScope
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:

View File

@@ -16,8 +16,9 @@ namespace bx
class RingBufferControl
{
BX_CLASS(RingBufferControl
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -55,8 +56,9 @@ namespace bx
class SpScRingBufferControl
{
BX_CLASS(SpScRingBufferControl
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -97,7 +99,7 @@ namespace bx
BX_CLASS(ReadRingBufferT
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -140,7 +142,7 @@ namespace bx
BX_CLASS(WriteRingBufferT
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:

View File

@@ -15,7 +15,7 @@ namespace bx
{
BX_CLASS(Semaphore
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:

View File

@@ -16,8 +16,9 @@ namespace bx
class SpScUnboundedQueue
{
BX_CLASS(SpScUnboundedQueue
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -57,8 +58,9 @@ namespace bx
class SpScUnboundedQueueT
{
BX_CLASS(SpScUnboundedQueueT
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -86,8 +88,9 @@ namespace bx
class SpScBlockingUnboundedQueue
{
BX_CLASS(SpScBlockingUnboundedQueue
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:
@@ -116,8 +119,9 @@ namespace bx
class SpScBlockingUnboundedQueueT
{
BX_CLASS(SpScBlockingUnboundedQueueT
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public:

View File

@@ -21,7 +21,7 @@ namespace bx
{
BX_CLASS(Thread
, NO_COPY
, NO_ASSIGNMENT
, NO_COPY_ASSIGNMENT
);
public: