Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix make_pod static asserts #1312

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/support.h
Expand Up @@ -77,7 +77,8 @@ struct make_pod {
// Using a union is a C++ trick to achieve this.
template <class V>
union helper {
static_assert(std::is_pod<P>::value, "type P must a pod type");
static_assert(std::is_trivially_copyable<V>::value, "type V must be trivially copyable");
static_assert(std::is_standard_layout<P>::value && std::is_trivial<P>::value, "type P must a pod type");
static_assert(sizeof(V) == sizeof(P), "type P must be same size as type V");
static_assert(alignof(V) == alignof(P),
"alignment of type P must be compatible with that of type V");
Expand Down