Skip to content
Commit 8311c83f authored by Florian Weimer's avatar Florian Weimer
Browse files

array_length: Make usable as a constant expression

Do not use a statement expression in array_length, so that
array_length can be used at file scope and as a constant expression.
Instead, put the _Static_assert into a struct (as a declaration),
and nest this in the expression using a sizeof expression.
parent 94b63e66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment