Home > database >  assertion fails: __is_complete_or_unbounded
assertion fails: __is_complete_or_unbounded

Time:12-29

While compiling HHVM, the code fails due to:

/usr/include/c  /10/type_traits:918:52: error: non-constant condition for static assertion
  918 |       static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),

What does __is_complete_or_unbounded actually do/check?

The issue occurs while constructing an object whose last member variable is as follows:

  value_type cell[0]

The constructor does not initialize this member, is this the problem? How would I initialize the value_type variable?

CodePudding user response:

In C , an array cannot have zero size.

From Array declarators documentation:

If the expression is a constant expression, it shall have a value greater than zero.

  • Related