17#ifndef TOOLBOX_IO_EVENT_HPP
18#define TOOLBOX_IO_EVENT_HPP
30static_assert(std::is_standard_layout_v<MsgEvent> && std::is_trivial_v<MsgEvent>);
31static_assert(
sizeof(
MsgEvent) +
sizeof(std::int64_t) == 1536);
33template <
typename DataT>
36 static_assert(
alignof(
DataT) <= 8);
37 static_assert(std::is_nothrow_default_constructible_v<DataT>);
38 static_assert(std::is_trivially_copyable_v<DataT>);
46 static_assert(
alignof(
DataT) <= 8);
47 static_assert(std::is_nothrow_constructible_v<
DataT,
ArgsT...>);
48 static_assert(std::is_trivially_copyable_v<DataT>);
53template <
typename DataT>
56 return *
reinterpret_cast<const DataT*
>(
ev.data);
59template <
typename DataT>
62 return *
reinterpret_cast<DataT*
>(
ev.data);