holoscan::detail::pod_member_matches_offset
holoscan::detail::pod_member_matches_offset
Verify that a pointer-to-member selects the bytes declared by its companion offset.
C++ has no portable operation that converts a pointer-to-member into an integer offset. Build a valid marker object representation instead: only the claimed field bytes contain the value one, then access the member and require every selected element to observe that marker. This remains a cold constant-expression check and works for admitted scalar, C-array, and std::array members without default-constructing the enclosing payload.