Skip to content

Commit a2dddb4

Browse files
committed
drop is_standard_layout assertions; see #5824 (comment)
1 parent a2c8422 commit a2dddb4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

include/pybind11/detail/argument_vector.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ union inline_array_or_vector {
117117
// of bytes. See
118118
// https://dev-discuss.pytorch.org/t/unionizing-for-profit-how-to-exploit-the-power-of-unions-in-c/444#the-memcpy-loophole-4
119119
bool result = false;
120-
static_assert(std::is_standard_layout<inline_array>::value,
121-
"untagged union implementation relies on this");
122-
static_assert(std::is_standard_layout<heap_vector>::value,
123-
"untagged union implementation relies on this");
124120
static_assert(offsetof(inline_array, is_inline) == 0,
125121
"untagged union implementation relies on this");
126122
static_assert(offsetof(heap_vector, is_inline) == 0,

0 commit comments

Comments
 (0)