Registry / utility / constexpr-contracts

constexpr-contracts

JSON →
library2020-08-09vcpkgunverified

A constexpr-friendly, optimisation-friendly contracts library.

vcpkg install constexpr-contracts
INSTALL
IMPORT
SIG · CONSTEXPR-CONTRACT
C
constexpr-contracts
utilitycppv2020-08-09
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

constexpr-contracts/contracts.hpp
#include <constexpr-contracts/contracts.hpp>

Use a precondition contract to ensure divisor is non-zero.

#include <constexpr-contracts/contracts.hpp> #include <cassert> int divide(int a, int b) { CONTRACT_PRECONDITION(b != 0); return a / b; } int main() { assert(divide(10, 2) == 5); return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2020-08-09latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

constexpr-contracts — pip install constexpr-contracts · libregistry