#
Contract assertions allow the programmer to specify properties of the state of the program that are expected to hold at certain points during execution.
Contract assertions are introduced by precondition-specifiers, postcondition-specifiers ([dcl.contract.func]), and assertion-statements ([stmt.contract.assert]).
2
#
Each contract assertion has a contract-assertion predicate, which is an expression of type bool.
[Note 1: 
The value of the predicate is used to identify program states that are expected.
— end note]
An invocation of the macro va_start ([cstdarg.syn]) shall not be a subexpression of the predicate of a contract assertion, no diagnostic required.
[Note 2: 
Within the predicate of a contract assertion, id-expressions referring to variables declared outside the contract assertion are const ([expr.prim.id.unqual]), this is a pointer to const ([expr.prim.this]), and the result object can be named if a result-name-introducer ([dcl.contract.res]) has been specified.
— end note]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant