diff --git a/src/util/lean_obj.cpp b/src/util/lean_obj.cpp index 7fdf64b905..0082753826 100644 --- a/src/util/lean_obj.cpp +++ b/src/util/lean_obj.cpp @@ -40,12 +40,12 @@ size_t obj_header_size(lean_obj * o) { static_assert(sizeof(atomic) == sizeof(lean_obj*), "unexpected atomic size, the object GC assumes these two types have the same size"); inline lean_obj * get_next(lean_obj * o) { - static_assert(o == static_cast(&(o->m_rc)), "the object GC relies on the fact that the first field of a structure is stored at offset 0"); + lean_assert(o == static_cast(&(o->m_rc))); // The object GC relies on the fact that the first field of a structure is stored at offset 0 return *reinterpret_cast(o); } inline void set_next(lean_obj * o, lean_obj * n) { - static_assert(o == static_cast(&(o->m_rc)), "the object GC relies on the fact that the first field of a structure is stored at offset 0"); + lean_assert(o == static_cast(&(o->m_rc))); // The object GC relies on the fact that the first field of a structure is stored at offset 0 *reinterpret_cast(o) = n; }