Namespaces
Variants
Actions

std::contracts::assertion_kind

From cppreference.com
< cpp‎ | contract
 
C++
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
Contract support
Contract-violation information
assertion_kind
(C++26)
Helper functions
 
Defined in header <contracts>
enum class assertion_kind : /* unspecified */ {

    pre = 1,
    post = 2,
    assert = 3

};
(since C++26)

The enumerators of std::contracts::assertion_kind correspond to the syntactic forms of a contract assertion, with meanings listed below:

Enumerator Meaning
pre the contract assertion is a precondition assertion
post the contract assertion is a postcondition assertion
assert the contract assertion is a contract_assert statement

[edit] See also

the type holding the contract-violation information
(class) [edit]
the evaluation semantic when the contract violation occurs
(enum) [edit]
the reason that causes the contract violation
(enum) [edit]

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