Go to the source code of this file.
◆ ARENE_INTERNAL_CONTRACT_CHECK
| #define ARENE_INTERNAL_CONTRACT_CHECK |
( |
| violation_type, |
|
|
| message, |
|
|
| condition ) |
Value: \
do { \
} else { \
ARENE_INTERNAL_CONTRACT_VIOLATION(violation_type, (message)); \
} \
} while (false)
#define ARENE_EXPECT(...)
A macro to use in an if statement to declare that the expression is expected to be true more often th...
Definition expect.hpp:56
Check if a contract condition is true and call the violation handler if not.
- Parameters
-
| violation_type | The type of contract being checked |
| message | The message to report if the condition is not true |
| condition | The condition to check |
◆ ARENE_INTERNAL_CONTRACT_VIOLATION
| #define ARENE_INTERNAL_CONTRACT_VIOLATION |
( |
| violation_type, |
|
|
| message ) |
Value: \
class arene_contract_info_wrapper { \
public: \
\
static constexpr auto arene_contract_make_info() noexcept \
-> ::
arene::base::contract_detail::contract_violation_info { \
return { \
static_cast<::arene::base::detail::raw_c_string>(__FILE__), \
static_cast<::arene::base::detail::raw_c_string>(
ARENE_STRINGIZE(__LINE__)), \
static_cast<::arene::base::detail::raw_c_string>(message), \
::arene::base::contract_detail::contract_type::violation_type \
}; \
} \
}; \
::arene::base::contract_detail::contract_violation_wrapper( \
::arene::base::contract_detail::info_holder<arene_contract_info_wrapper>::value \
)
Definition accumulate.hpp:36
#define ARENE_STRINGIZE(...)
Definition stringize.hpp:32
Call the contract violation handler for a violated contract.
- Parameters
-
| violation_type | The type of contract violated |
| message | The violation message |
◆ ARENE_INVARIANT
| #define ARENE_INVARIANT |
( |
| condition | ) |
|
Check that an invariant holds, and terminate the application if it does not.
- Parameters
-
| condition | The macro arguments must be a single expression that can be contextually converted to bool. The invariant holds if the expression evaluates to true. |
◆ ARENE_INVARIANT_UNREACHABLE
| #define ARENE_INVARIANT_UNREACHABLE |
( |
| message | ) |
|
Terminate the application if this line is ever executed. The supplied message will be output in that case.
- Parameters
-
| message | The message to output |
◆ ARENE_PRECONDITION
| #define ARENE_PRECONDITION |
( |
| condition | ) |
|
Check that a precondition holds, and terminate the application if it does not.
- Parameters
-
| condition | The macro arguments must be a single expression that can be contextually converted to bool. The precondition holds if the expression evaluates to true. |