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 runtime/elem/BlockEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct BlockEvent {
size_t time;

static constexpr size_t kMaxObjectSize = 64;
alignas(std::max_align_t) std::byte data[kMaxObjectSize];
alignas(uint64_t) std::byte data[kMaxObjectSize];
std::type_index typeIndex;

template <typename T>
Expand All @@ -41,7 +41,7 @@ struct BlockEvent {
, typeIndex(std::type_index(typeid(T)))
{
static_assert(sizeof(T) <= kMaxObjectSize, "Type too large for BlockEvent buffer");
static_assert(alignof(T) <= alignof(std::max_align_t), "Type alignment too strict");
static_assert(alignof(T) <= alignof(uint64_t), "Type alignment too strict");
static_assert(std::is_trivially_copyable_v<T>, "Type must be trivially copyable");

new(data) T(std::forward<T>(d));
Expand Down