Skip to content

Commit

Permalink
updated overly restrictive instance size limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
wjakob committed Oct 16, 2024
1 parent 95ae0a2 commit 2aacdcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/nanobind/nb_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ class class_ : public object {
using Base = typename detail::extract<T, detail::is_base, Ts...>::type;
using Alias = typename detail::extract<T, detail::is_alias, Ts...>::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<Base, T> + !std::is_same_v<Alias, T>,
Expand Down

0 comments on commit 2aacdcf

Please sign in to comment.