From c157d85de6264c21923ab7fc48a616d6d36808d9 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 26 May 2024 16:20:49 +0800 Subject: [PATCH] Update vm.h --- include/pocketpy/vm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/pocketpy/vm.h b/include/pocketpy/vm.h index d3931e90..9408658a 100644 --- a/include/pocketpy/vm.h +++ b/include/pocketpy/vm.h @@ -446,6 +446,7 @@ public: template void new_stack_object(Type type, Args&&... args){ static_assert(std::is_same_v>); + static_assert(std::is_trivially_destructible_v); PyObject* p = new(__stack_alloc(py_sizeof)) PyObject(type); p->placement_new(std::forward(args)...); vm->s_data.emplace(p->type, p);