I would probably replace these with compile-time checks. E.g. using static_assertions::{assert_eq_align, assert_eq_size}.
static_assertions::{assert_eq_align, assert_eq_size}