Next: , Previous: , Up: Meta-error handling: static_assert   [Contents]


7.1.2 Motivation

Why is this important? Why do we want to learn/teach this topic?

static_assert allows the developer to enforce that conditions which can be checked during compilation will force build errors when violated. Additionally, they are the best mechanism by which a developer can pass useful information to other developers regarding what violation occurred or what must be done, instead.