From 38114d155569ddd74fd2c0fd44ccecaf43f42774 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 3 Mar 2024 15:52:40 +0800 Subject: [PATCH] some fix --- include/pocketpy/vm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pocketpy/vm.h b/include/pocketpy/vm.h index 05b069d9..3ef87d8a 100644 --- a/include/pocketpy/vm.h +++ b/include/pocketpy/vm.h @@ -453,7 +453,7 @@ public: template -inline constexpr bool is_immutable_v = std::is_integral_v || std::is_floating_point_v +inline constexpr bool is_immutable_v = is_integral_v || is_floating_point_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_pointer_v || std::is_enum_v; @@ -528,7 +528,7 @@ __T _py_cast__internal(VM* vm, PyObject* obj) { static_assert(!std::is_rvalue_reference_v<__T>, "rvalue reference is not allowed"); using T = std::decay_t<__T>; - + if constexpr(std::is_same_v || std::is_same_v){ static_assert(!std::is_reference_v<__T>); // str (shortcuts)