mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 15:20:34 +00:00
More clang-tidy fixes. These escaped before because -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17
, as used in the GitHub Actions, were missing in the interactive run.
This commit is contained in:
parent
2eeac0c369
commit
2c828ff552
@ -10,7 +10,7 @@ namespace helpers {
|
||||
struct movable_int {
|
||||
int valu;
|
||||
movable_int(int v) : valu{v} {}
|
||||
movable_int(movable_int &&other) {
|
||||
movable_int(movable_int &&other) noexcept {
|
||||
valu = other.valu;
|
||||
other.valu = 91;
|
||||
}
|
||||
@ -325,7 +325,7 @@ TEST_CASE("error_cannot_disown_nullptr", "[E]") {
|
||||
TEST_CASE("indestructible_int-from_raw_ptr_unowned+as_raw_ptr_unowned", "[S]") {
|
||||
using zombie = helpers::indestructible_int;
|
||||
// Using placement new instead of plain new, to not trigger leak sanitizer errors.
|
||||
static char memory_block[sizeof(zombie)];
|
||||
static std::aligned_storage<sizeof(zombie), alignof(zombie)>::type memory_block[1];
|
||||
auto *value = new (memory_block) zombie(19);
|
||||
auto hld = smart_holder::from_raw_ptr_unowned(value);
|
||||
REQUIRE(hld.as_raw_ptr_unowned<zombie>()->valu == 19);
|
||||
|
Loading…
Reference in New Issue
Block a user