From 2aacdcfdd312dabda3d65e683e418e4b3c8c0b04 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 16 Oct 2024 18:44:47 +0900 Subject: [PATCH] updated overly restrictive instance size limitation --- include/nanobind/nb_class.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nanobind/nb_class.h b/include/nanobind/nb_class.h index e1a953fa..4d7e4c14 100644 --- a/include/nanobind/nb_class.h +++ b/include/nanobind/nb_class.h @@ -480,7 +480,7 @@ class class_ : public object { using Base = typename detail::extract::type; using Alias = typename detail::extract::type; - static_assert(sizeof(Alias) < (1 << 24), "Instance size is too big!"); + static_assert(sizeof(Alias) < ((size_t) 1 << 32), "Instance size is too big!"); static_assert(alignof(Alias) < (1 << 8), "Instance alignment is too big!"); static_assert( sizeof...(Ts) == !std::is_same_v + !std::is_same_v,