Skip to content

Commit e262b7c

Browse files
committed
updated overly restrictive instance size limitation
1 parent 95ae0a2 commit e262b7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/nanobind/nb_class.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ class class_ : public object {
480480
using Base = typename detail::extract<T, detail::is_base, Ts...>::type;
481481
using Alias = typename detail::extract<T, detail::is_alias, Ts...>::type;
482482

483-
static_assert(sizeof(Alias) < (1 << 24), "Instance size is too big!");
483+
static_assert(sizeof(Alias) < (((uint64_t) 1) << 32), "Instance size is too big!");
484484
static_assert(alignof(Alias) < (1 << 8), "Instance alignment is too big!");
485485
static_assert(
486486
sizeof...(Ts) == !std::is_same_v<Base, T> + !std::is_same_v<Alias, T>,

0 commit comments

Comments
 (0)