C++

static_assert

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

ShpjegimiSQ

static_assert(kushti, "mesazh") kontrollon diçka gjatë kompajlimit — p.sh. që një tip ka madhësinë e duhur. Po dështoi, programi s'kompajlohet fare.

EnglishEN

static_assert(condition, "message") checks something at compile time — e.g. that a type has the right size. If it fails, the program won't compile at all.

Si ta mendosh

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

Lexoje në anglisht

Like inspecting the plans before construction starts.

Shembull kodicpp

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

Terma të lidhur