C

_Static_assert (C11)

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

_Static_assert(kushti, "mesazh") kontrollon diçka gjatë kompajlimit — p.sh. që një struct ka madhësinë e pritur. Në C23 shkruhet thjesht static_assert.

EnglishEN

_Static_assert(condition, "message") checks something at compile time — e.g. that a struct has the expected size. In C23 it's simply static_assert.

Si ta mendosh

Si inspektimi i projektit para se të fillojë ndërtimi.

Lexoje në anglisht

Like inspecting the plans before construction begins.

Shembull kodic

_Static_assert(sizeof(int) == 4, "Pritet int 32-bit");

Terma të lidhur