Skip to content

Commit

Permalink
Introduce PYBIND11_SMART_HOLDER_PADDING_ON (as the only way to turn o…
Browse files Browse the repository at this point in the history
…n padding).
  • Loading branch information
rwgk committed Jul 20, 2024
1 parent 5566c63 commit df54a82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/pybind11/detail/smart_holder_poc.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ inline bool is_std_default_delete(const std::type_info &rtti_deleter) {
|| rtti_deleter == typeid(std::default_delete<T const>);
}

#if !defined(NDEBUG) || true // BAKEIN_WIP: Stress test.
// Meant to help detecting invalid `reinterpret_cast`s or similar.
#ifdef PYBIND11_SMART_HOLDER_PADDING_ON
# define PYBIND11_SMART_HOLDER_PADDING(N) int PADDING_##N##_[11]
#else
# define PYBIND11_SMART_HOLDER_PADDING(N)
Expand Down

0 comments on commit df54a82

Please sign in to comment.