From 350f2f40e928ca3adb454526d0a78de5f4d62c4e Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Thu, 6 Jul 2023 01:09:49 +0800 Subject: [PATCH] ... --- include/pocketpy/cffi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pocketpy/cffi.h b/include/pocketpy/cffi.h index 51938496..ed9895d2 100644 --- a/include/pocketpy/cffi.h +++ b/include/pocketpy/cffi.h @@ -82,7 +82,7 @@ struct C99Struct{ } template - C99Struct(std::nullopt_t _, const T& data): C99Struct(sizeof(T)){ + C99Struct(std::monostate _, const T& data): C99Struct(sizeof(T)){ static_assert(std::is_pod_v); static_assert(!std::is_pointer_v); memcpy(p, &data, this->size); @@ -163,7 +163,7 @@ T to_c99_struct(VM* vm, PyObject* var){ template std::enable_if_t && !std::is_pointer_v, PyObject*> py_var(VM* vm, const T& data){ - return VAR_T(C99Struct, std::nullopt, data); + return VAR_T(C99Struct, std::monostate(), data); } /*****************************************************************/ struct NativeProxyFuncCBase {