Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions concurrentqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ class ConcurrentQueue

enum InnerQueueContext { implicit_context = 0, explicit_context = 1 };

struct MOODYCAMEL_ALIGNAS(MOODYCAMEL_ALIGNOF(T)) Block
struct Block
{
Block()
: next(nullptr), elementsCompletelyDequeued(0), freeListRefs(0), freeListNext(nullptr), shouldBeOnFreeList(false), dynamicallyAllocated(true)
Expand Down Expand Up @@ -1600,7 +1600,7 @@ class ConcurrentQueue
// IMPORTANT: This must be the first member in Block, so that if T depends on a specific alignment,
// that alignment will be preserved. Apparently clang actually generates code that uses this assumption
// for AVX instructions in some cases.
char elements[sizeof(T) * BLOCK_SIZE];
MOODYCAMEL_ALIGNAS(MOODYCAMEL_ALIGNOF(T)) char elements[sizeof(T) * BLOCK_SIZE];
public:
Block* next;
std::atomic<size_t> elementsCompletelyDequeued;
Expand Down